mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
global, nuke: adding support for first workfile creation
This commit is contained in:
parent
0993fa447d
commit
b2eb14914b
5 changed files with 39 additions and 21 deletions
|
|
@ -2682,11 +2682,12 @@ def start_workfile_template_builder():
|
|||
build_workfile_template
|
||||
)
|
||||
|
||||
# to avoid looping of the callback, remove it!
|
||||
# nuke.removeOnCreate(start_workfile_template_builder, nodeClass="Root")
|
||||
log.info("Starting workfile template builder...")
|
||||
build_workfile_template(run_from_callback=True)
|
||||
|
||||
# to avoid looping of the callback, remove it!
|
||||
log.info("Starting workfile template builder...")
|
||||
build_workfile_template(workfile_creation_enabled=True)
|
||||
|
||||
nuke.removeOnCreate(start_workfile_template_builder, nodeClass="Root")
|
||||
|
||||
@deprecated
|
||||
def recreate_instance(origin_node, avalon_data=None):
|
||||
|
|
|
|||
|
|
@ -155,8 +155,8 @@ def add_nuke_callbacks():
|
|||
# Set context settings.
|
||||
nuke.addOnCreate(
|
||||
workfile_settings.set_context_settings, nodeClass="Root")
|
||||
nuke.addOnCreate(start_workfile_template_builder, nodeClass="Root")
|
||||
nuke.addOnCreate(workfile_settings.set_favorites, nodeClass="Root")
|
||||
nuke.addOnCreate(start_workfile_template_builder, nodeClass="Root")
|
||||
nuke.addOnCreate(process_workfile_builder, nodeClass="Root")
|
||||
|
||||
# fix ffmpeg settings on script
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ class NukeTemplateBuilder(AbstractTemplateBuilder):
|
|||
|
||||
return True
|
||||
|
||||
|
||||
class NukePlaceholderPlugin(PlaceholderPlugin):
|
||||
node_color = 4278190335
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ def has_unsaved_changes():
|
|||
|
||||
def save_file(filepath):
|
||||
path = filepath.replace("\\", "/")
|
||||
nuke.scriptSaveAs(path)
|
||||
nuke.scriptSaveAs(path, overwrite=1)
|
||||
nuke.Root()["name"].setValue(path)
|
||||
nuke.Root()["project_directory"].setValue(os.path.dirname(path))
|
||||
nuke.Root().setModified(False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue