mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
nuke: capture exception so popup is not rised
This commit is contained in:
parent
0019ff6f7d
commit
105e03344c
1 changed files with 7 additions and 1 deletions
|
|
@ -23,6 +23,9 @@ from openpype.client import (
|
||||||
|
|
||||||
from openpype.host import HostDirmap
|
from openpype.host import HostDirmap
|
||||||
from openpype.tools.utils import host_tools
|
from openpype.tools.utils import host_tools
|
||||||
|
from openpype.pipeline.workfile.workfile_template_builder import (
|
||||||
|
TemplateProfileNotFound
|
||||||
|
)
|
||||||
from openpype.lib import (
|
from openpype.lib import (
|
||||||
env_value_to_bool,
|
env_value_to_bool,
|
||||||
Logger,
|
Logger,
|
||||||
|
|
@ -2684,7 +2687,10 @@ def start_workfile_template_builder():
|
||||||
|
|
||||||
# to avoid looping of the callback, remove it!
|
# to avoid looping of the callback, remove it!
|
||||||
log.info("Starting workfile template builder...")
|
log.info("Starting workfile template builder...")
|
||||||
build_workfile_template(workfile_creation_enabled=True)
|
try:
|
||||||
|
build_workfile_template(workfile_creation_enabled=True)
|
||||||
|
except TemplateProfileNotFound:
|
||||||
|
log.warning("Template profile not found. Skipping...")
|
||||||
|
|
||||||
# remove callback since it would be duplicating the workfile
|
# remove callback since it would be duplicating the workfile
|
||||||
nuke.removeOnCreate(start_workfile_template_builder, nodeClass="Root")
|
nuke.removeOnCreate(start_workfile_template_builder, nodeClass="Root")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue