Merge pull request #2866 from pypeclub/bugfix/nuke-gizmo-precollect-fix

Nuke: gizmo precollect fix
This commit is contained in:
Jakub Ježek 2022-03-10 16:51:02 +01:00 committed by GitHub
commit 6ff66735e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -80,7 +80,7 @@ class PreCollectNukeInstances(pyblish.api.ContextPlugin):
# Add all nodes in group instances.
if node.Class() == "Group":
# only alter families for render family
if "write" in families_ak.lower():
if families_ak and "write" in families_ak.lower():
target = node["render"].value()
if target == "Use existing frames":
# Local rendering

View file

@ -34,9 +34,9 @@ class ValidateWriteLegacy(pyblish.api.InstancePlugin):
# test if render in family test knob
# and only one item should be available
assert len(family_test) == 1, msg + " > More avalon attributes"
assert "render" in node[family_test[0]].value(), msg + \
assert "render" in node[family_test[0]].value() \
or "still" in node[family_test[0]].value(), msg + \
" > Not correct family"
# test if `file` knob in node, this way old
# non-group-node write could be detected
assert "file" not in node.knobs(), msg + \
@ -74,6 +74,8 @@ class ValidateWriteLegacy(pyblish.api.InstancePlugin):
Create_name = "CreateWriteRender"
elif family == "prerender":
Create_name = "CreateWritePrerender"
elif family == "still":
Create_name = "CreateWriteStill"
# get appropriate plugin class
creator_plugin = None