nuke: fixes of publishing workflow for nuke 12

This commit is contained in:
Jakub Jezek 2023-01-16 14:12:30 +01:00
parent 4c1e34a2db
commit 4bcd90b415
No known key found for this signature in database
GPG key ID: 730D7C02726179A7
3 changed files with 5 additions and 6 deletions

View file

@ -896,7 +896,9 @@ def get_view_process_node():
ipn_orig = None ipn_orig = None
for v in nuke.allNodes(filter="Viewer"): for v in nuke.allNodes(filter="Viewer"):
ipn = v['input_process_node'].getValue() ipn = v['input_process_node'].getValue()
if "VIEWER_INPUT" not in ipn: if ipn:
if "VIEWER_INPUT" not in ipn:
return
ipn_orig = nuke.toNode(ipn) ipn_orig = nuke.toNode(ipn)
ipn_orig.setSelected(True) ipn_orig.setSelected(True)

View file

@ -33,12 +33,10 @@ class NukeRenderLocal(publish.Extractor):
if x.Class() == "Write": if x.Class() == "Write":
node = x node = x
self.log.debug("instance collected: {}".format(instance.data))
first_frame = instance.data.get("frameStartHandle", None) first_frame = instance.data.get("frameStartHandle", None)
last_frame = instance.data.get("frameEndHandle", None) last_frame = instance.data.get("frameEndHandle", None)
node_subset_name = instance.data.get("name", None) node_subset_name = instance.data["subset"]
self.log.info("Starting render") self.log.info("Starting render")
self.log.info("Start frame: {}".format(first_frame)) self.log.info("Start frame: {}".format(first_frame))
@ -65,7 +63,7 @@ class NukeRenderLocal(publish.Extractor):
# Render frames # Render frames
nuke.execute( nuke.execute(
node_subset_name, str(node_subset_name),
int(first_frame), int(first_frame),
int(last_frame) int(last_frame)
) )

View file

@ -37,7 +37,6 @@ class CollectFromCreateContext(pyblish.api.ContextPlugin):
context.data["projectName"] = project_name context.data["projectName"] = project_name
for created_instance in create_context.instances: for created_instance in create_context.instances:
self.log.info(f"created_instance:: {created_instance}")
instance_data = created_instance.data_to_store() instance_data = created_instance.data_to_store()
if instance_data["active"]: if instance_data["active"]:
thumbnail_path = thumbnail_paths_by_instance_id.get( thumbnail_path = thumbnail_paths_by_instance_id.get(