-
Notifications
You must be signed in to change notification settings - Fork 34
Added setting for disabling forcing context settings #193
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
base: develop
Are you sure you want to change the base?
Changes from 3 commits
44db8cf
08e116e
d12bc95
30fc7b8
7554bc0
827bb73
0b2081b
b17af25
5c5010d
4c462ea
8a76ee9
a7e3930
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -55,6 +55,7 @@ | |||||
| check_inventory_versions, | ||||||
| set_avalon_knob_data, | ||||||
| read_avalon_data, | ||||||
| set_context_settings_if_new, | ||||||
| on_script_load, | ||||||
| dirmap_file_name_filter, | ||||||
| add_scripts_menu, | ||||||
|
|
@@ -162,14 +163,11 @@ def add_nuke_callbacks(project_settings: dict = None): | |||||
| project_settings = get_current_project_settings() | ||||||
|
|
||||||
| nuke_settings = project_settings["nuke"] | ||||||
| workfile_settings = WorkfileSettings() | ||||||
|
|
||||||
| # Set context settings. | ||||||
| nuke.addOnCreate( | ||||||
| workfile_settings.set_context_settings, nodeClass="Root") | ||||||
| nuke.addOnCreate(set_context_settings_if_new, nodeClass="Root") | ||||||
|
|
||||||
| # adding favorites to file browser | ||||||
| nuke.addOnCreate(workfile_settings.set_favorites, nodeClass="Root") | ||||||
| nuke.addOnCreate(WorkfileSettings().set_favorites, nodeClass="Root") | ||||||
|
|
||||||
| # template builder callbacks | ||||||
| nuke.addOnCreate(start_workfile_template_builder, nodeClass="Root") | ||||||
|
|
@@ -181,8 +179,9 @@ def add_nuke_callbacks(project_settings: dict = None): | |||||
| nuke.addOnScriptLoad(check_inventory_versions) | ||||||
| nuke.addOnScriptSave(check_inventory_versions) | ||||||
|
|
||||||
| # set apply all workfile settings on script load and save | ||||||
| nuke.addOnScriptLoad(WorkfileSettings().set_context_settings) | ||||||
| if nuke_settings["general"]["set_context_settings_on_script_open"]: | ||||||
| # set apply all workfile settings on script load and save | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pretty sure this comment above it was just wrong?
Suggested change
|
||||||
| nuke.addOnScriptLoad(WorkfileSettings().set_context_settings) | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pretty sure this is actually wrong - and apparently always has been? Because this initializes
Suggested change
|
||||||
|
|
||||||
| if nuke_settings["dirmap"]["enabled"]: | ||||||
| log.info("Added Nuke's dir-mapping callback ...") | ||||||
|
|
||||||
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.
Pretty sure this is actually wrong - and apparently always has been?
Because this initializes
WorkfileSettingsDIRECTLY here - and not on the callback. As such, this is set to the context of AYON when Nuke is launched. If you open a workfile in a different context, it'd still be applying the workfile settings of the context you launched into.@jakubjezek001 right?