From 4bcd90b4152cc336067e74886602b8f3ddb6e9f4 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Mon, 16 Jan 2023 14:12:30 +0100 Subject: [PATCH] nuke: fixes of publishing workflow for nuke 12 --- openpype/hosts/nuke/api/lib.py | 4 +++- openpype/hosts/nuke/plugins/publish/extract_render_local.py | 6 ++---- openpype/plugins/publish/collect_from_create_context.py | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/openpype/hosts/nuke/api/lib.py b/openpype/hosts/nuke/api/lib.py index f2872675ca..c3059aa048 100644 --- a/openpype/hosts/nuke/api/lib.py +++ b/openpype/hosts/nuke/api/lib.py @@ -896,7 +896,9 @@ def get_view_process_node(): ipn_orig = None for v in nuke.allNodes(filter="Viewer"): 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.setSelected(True) diff --git a/openpype/hosts/nuke/plugins/publish/extract_render_local.py b/openpype/hosts/nuke/plugins/publish/extract_render_local.py index 811b2d4ffb..81fe8cd528 100644 --- a/openpype/hosts/nuke/plugins/publish/extract_render_local.py +++ b/openpype/hosts/nuke/plugins/publish/extract_render_local.py @@ -33,12 +33,10 @@ class NukeRenderLocal(publish.Extractor): if x.Class() == "Write": node = x - self.log.debug("instance collected: {}".format(instance.data)) - first_frame = instance.data.get("frameStartHandle", 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("Start frame: {}".format(first_frame)) @@ -65,7 +63,7 @@ class NukeRenderLocal(publish.Extractor): # Render frames nuke.execute( - node_subset_name, + str(node_subset_name), int(first_frame), int(last_frame) ) diff --git a/openpype/plugins/publish/collect_from_create_context.py b/openpype/plugins/publish/collect_from_create_context.py index 9a740c10cd..d3398c885e 100644 --- a/openpype/plugins/publish/collect_from_create_context.py +++ b/openpype/plugins/publish/collect_from_create_context.py @@ -37,7 +37,6 @@ class CollectFromCreateContext(pyblish.api.ContextPlugin): context.data["projectName"] = project_name for created_instance in create_context.instances: - self.log.info(f"created_instance:: {created_instance}") instance_data = created_instance.data_to_store() if instance_data["active"]: thumbnail_path = thumbnail_paths_by_instance_id.get(