-
Notifications
You must be signed in to change notification settings - Fork 14
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
Improve selection handling in NukeWriteCreator #65
base: develop
Are you sure you want to change the base?
Improve selection handling in NukeWriteCreator #65
Conversation
- Added early return for no selection case. - Simplified logic to raise error only if selected nodes are missing. - Handled headless mode by defaulting pre_create_data when absent.
if not pre_create_data: | ||
# add no selection for headless | ||
pre_create_data = { | ||
"use_selection": False | ||
} |
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.
This seems odd to do. Especially because this doesn't necessarily differentiate between "headless" (e.g. Nuke without UI) or running the creator through a script, like e.g. template placeholders.
If the issue is to solve template placeholders, then you may be better off making sure that the Loader used there actually clears the selection? (I mean, fix that in the Nuke Workfile Template Builder itself)
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.
I don't understand what is odd? This is defeault behavior for calling create
without pre create data. Yes, it is for template builder, but for headless scripts too. If you need different behavior for headless scripts, you can pass in pre-create attributes... If anybody does have headless scripts, then they already fill pre-create attributes, otherwise the create would crash.
The code looks OK and confirmed I have been able to test it locally. |
Changelog Description
closes #56
Testing steps