Skip to content

Public setter on PortModel.DefaultValue  #11118

@teocomi

Description

@teocomi

I'd like to set default inputs for a custom NodeModel node such as in:

https://github.com/DynamoDS/Dynamo/blob/master/src/Libraries/CoreNodeModels/Range.cs#L33

Currently this can be done in the main constructor via InPorts.Add(new PortModel(PortType.Input, this, new PortData("","", defaultValue))); but not in the JsonConstructor because PortModel.DefaultValue has an internal setter.

I believe this is a bug and the setter should be made public so that default values can be set correctly also when opening saved definitions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Improvementdeveloper experiencemore high-level issues that are more specific to individuals actively developing on Dynamo.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions