Skip to content

Conversation

@radumg
Copy link
Owner

@radumg radumg commented Jul 17, 2017

Purpose

Added a public static property called PublicPreferenceSettings to DynamoModel class, so that nodes and other components that are not fully aware of the context they're executed in can still access these properties.

The property should be thread-safe as it's read-only :

  • read : public access
  • write : private access

Also added lines to update the static property whenever the instance-based PreferenceSettings gets updated within the DynamoModel class.

Tested by

  • building
  • running DynamoSandbox
  • changing Dynamo settings (such as show connectors or adding a new custom package path)
  • nodes reading the static property see the updates

Declarations

Check these if you believe they are true

  • The code base is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning, and are documented in the API Changes document.

Reviewers

@radumg

FYIs

radumg added 6 commits July 16, 2017 12:32
it also propagates changes made to settings in Dynamo
- renamed static prop to PublicPreferenceSettings, essentially adding `Public` in front of existing field
- added lines to update the static prop where the `PreferenceSettings` gets updated in the model
- set static prop to be public GET, private SET
- tested with build, changes are picked up by Python nodes just fine
@radumg radumg self-assigned this Jul 17, 2017
@radumg radumg merged commit ce1f9cb into PythonTemplate Jul 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants