New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Gaffer.NodeAlgo.applyUserDefaults() #1045
Conversation
Nodes created via the NodeMenu apply default values to their plugs, using the "userDefault" key in the Metadata. Fixes GafferHQ#1038.
The other algo functions implemented in C++ aren't namespaced like this, so for example it's |
I guess if the modules stay small and dedicated topics, as in your |
Should it maybe be namespaced as |
You could inject it in with I agree that |
Sounds like a plan. |
node = GafferTest.AddNode() | ||
|
||
self.assertEqual( node["op1"].getValue(), 0 ) | ||
Gaffer.Metadata.registerPlugValue( GafferTest.AddNode.staticTypeId(), "op1", "userDefault", IECore.IntData( 7 ) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor note for future reference - it's possible to pass just 7
and the IntData
will be constructed for you behind the scenes.
Added Gaffer.NodeAlgo.applyUserDefaults()
Nodes created via the
NodeMenu
apply default values to their plugs, using theuserDefault
key in theMetadata
.Fixes #1038.