This commit is contained in:
Jakub Jezek 2023-03-06 17:07:56 +01:00
parent b2eb14914b
commit af39368838
No known key found for this signature in database
GPG key ID: 730D7C02726179A7
3 changed files with 6 additions and 8 deletions

View file

@ -2682,11 +2682,11 @@ def start_workfile_template_builder():
build_workfile_template
)
# to avoid looping of the callback, remove it!
log.info("Starting workfile template builder...")
build_workfile_template(workfile_creation_enabled=True)
# remove callback since it would be duplicating the workfile
nuke.removeOnCreate(start_workfile_template_builder, nodeClass="Root")
@deprecated

View file

@ -1,8 +1,5 @@
import os
import collections
import nuke
from openpype.pipeline import registered_host
from openpype.pipeline.workfile.workfile_template_builder import (
AbstractTemplateBuilder,
@ -15,7 +12,6 @@ from openpype.pipeline.workfile.workfile_template_builder import (
from openpype.tools.workfile_template_build import (
WorkfileBuildPlaceholderDialog,
)
from openpype.host import IWorkfileHost
from .lib import (
find_free_space_to_paste_nodes,
get_extreme_positions,

View file

@ -461,8 +461,9 @@ class AbstractTemplateBuilder(object):
hosts to decide if they want to remove
placeholder after it is used.
create_first_version (bool): create first version of a workfile
workfile_creation_enabled (bool): If True, it might create first version
but ignore process if version is created
workfile_creation_enabled (bool): If True, it might create
first version but ignore
process if version is created
"""
template_preset = self.get_template_preset()
@ -478,7 +479,8 @@ class AbstractTemplateBuilder(object):
# check if first version is created
created_version_workfile = self.create_first_workfile_version()
# if first version is created, import template and populate placeholders
# if first version is created, import template
# and populate placeholders
if (
create_first_version
and workfile_creation_enabled