nuke: collect workfile adding KnownPublishErrorl when untitled

This commit is contained in:
Jakub Jezek 2022-08-15 11:55:16 +02:00
parent 9fbbdad0fd
commit dd2becdb79
No known key found for this signature in database
GPG key ID: 730D7C02726179A7

View file

@ -8,6 +8,7 @@ from openpype.hosts.nuke.api.lib import (
add_publish_knob,
get_avalon_knob_data
)
from openpype.pipeline import KnownPublishError
class CollectWorkfile(pyblish.api.ContextPlugin):
@ -22,6 +23,12 @@ class CollectWorkfile(pyblish.api.ContextPlugin):
current_file = os.path.normpath(nuke.root().name())
if current_file.lower() == "root":
raise KnownPublishError(
"Workfile is not correct file name. \n"
"Use workfile tool to manage the name correctly."
)
knob_data = get_avalon_knob_data(root)
add_publish_knob(root)