-
Notifications
You must be signed in to change notification settings - Fork 49
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
Implement Nuke's lib.read
#476
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Avoid using `nuke.Text_Knob` since it could be a layout divider if the init value is an empty string.
houndci-bot
reviewed
Nov 28, 2019
tokejepsen
approved these changes
Nov 30, 2019
Looks good! Nice work @davidlatwe |
This will be merged tomorrow if no other objections 🚀 |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
The Avalon data read-write methods implemented in Nuke was driven by prefixing knob name so to differ which knob is node's default and which is user-defined.
But the prefix may change, and the logic was not the same as other hosts, so if there's a way to differ user-defined and default knobs without prefixing knob name, I think we should opt that in.
Changes
For unifying host implementation and pattern, adding
lib.read
to retrieve user-defined knobs from any given node, just like in other hosts. For layout type knob, likenuke.Tab_Knob
, divider knob (nuke.Text_Knob
with empty string value), and unnamed knob will be ignored.Backward compatible for knobs which prefixed with
"avalon:"
or"ak:"
. (Resolved this comment)Added
flags
optional arg onlib.Knobby
for setting knob flag. Current read-only string data imprinting was implemented by usingnuke.Text_Knob
. Butnuke.Text_Knob
could be a layout divider if the initial value is an empty string, which could be confused with other read-only string data while reading. This change reduced the confusion by enabling knob flag setting while imprinting (e.g.nuke.String_Knob
+nuke.READ_ONLY
) .