From 989ec8beb2947c8abef969c9e2922bea0eec2f8f Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 4 Jan 2024 18:03:05 +0800 Subject: [PATCH 01/20] make sure the default shader assigned to the redshift proxy --- openpype/hosts/maya/plugins/load/load_redshift_proxy.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py index b3fbfb2ed9..0ed09c6007 100644 --- a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py +++ b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py @@ -137,6 +137,14 @@ class RedshiftProxyLoader(load.LoaderPlugin): cmds.connectAttr("{}.outMesh".format(rs_mesh), "{}.inMesh".format(mesh_shape)) + # TODO: use the assigned shading group as shaders if existed + # assign default shader to redshift proxy + shader_grp = next( + (shader_group for shader_group in cmds.ls(type="shadingEngine") + if shader_group=="initialShadingGroup") + ) + cmds.sets(mesh_shape, forceElement=shader_grp) + group_node = cmds.group(empty=True, name="{}_GRP".format(name)) mesh_transform = cmds.listRelatives(mesh_shape, parent=True, fullPath=True) From fba52796d61c9968543a5ccaec3b4cf23459535d Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 4 Jan 2024 18:04:03 +0800 Subject: [PATCH 02/20] assign the textures when the initial shading group is located --- openpype/hosts/maya/plugins/load/load_redshift_proxy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py index 0ed09c6007..340533ccbd 100644 --- a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py +++ b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py @@ -143,7 +143,8 @@ class RedshiftProxyLoader(load.LoaderPlugin): (shader_group for shader_group in cmds.ls(type="shadingEngine") if shader_group=="initialShadingGroup") ) - cmds.sets(mesh_shape, forceElement=shader_grp) + if shader_grp: + cmds.sets(mesh_shape, forceElement=shader_grp) group_node = cmds.group(empty=True, name="{}_GRP".format(name)) mesh_transform = cmds.listRelatives(mesh_shape, From a7efe2ea759a6775c42bb0b53a3992201e0f00a3 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 4 Jan 2024 18:14:26 +0800 Subject: [PATCH 03/20] hound --- openpype/hosts/maya/plugins/load/load_redshift_proxy.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py index 340533ccbd..f67fe1c529 100644 --- a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py +++ b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py @@ -139,10 +139,9 @@ class RedshiftProxyLoader(load.LoaderPlugin): # TODO: use the assigned shading group as shaders if existed # assign default shader to redshift proxy - shader_grp = next( - (shader_group for shader_group in cmds.ls(type="shadingEngine") - if shader_group=="initialShadingGroup") - ) + shader_grp = next((shader_group for shader_group + in cmds.ls(type="shadingEngine") + if shader_group=="initialShadingGroup")) if shader_grp: cmds.sets(mesh_shape, forceElement=shader_grp) From 3af7795f19e93082824e0162f0436687f13dee51 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 4 Jan 2024 18:18:13 +0800 Subject: [PATCH 04/20] hound --- .../hosts/maya/plugins/load/load_redshift_proxy.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py index f67fe1c529..7f88f1b152 100644 --- a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py +++ b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py @@ -139,11 +139,11 @@ class RedshiftProxyLoader(load.LoaderPlugin): # TODO: use the assigned shading group as shaders if existed # assign default shader to redshift proxy - shader_grp = next((shader_group for shader_group - in cmds.ls(type="shadingEngine") - if shader_group=="initialShadingGroup")) - if shader_grp: - cmds.sets(mesh_shape, forceElement=shader_grp) + shader_grp = next( + (shader_group for shader_group in cmds.ls(type="shadingEngine") + if shader_group == "initialShadingGroup") + ) + cmds.sets(mesh_shape, forceElement=shader_grp) group_node = cmds.group(empty=True, name="{}_GRP".format(name)) mesh_transform = cmds.listRelatives(mesh_shape, From bcea8967acab10bbc406fdfb0d7db4b12680f121 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 4 Jan 2024 19:18:33 +0800 Subject: [PATCH 05/20] code tweaks on shader_grp's variable --- openpype/hosts/maya/plugins/load/load_redshift_proxy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py index 7f88f1b152..7b657f9184 100644 --- a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py +++ b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py @@ -140,8 +140,9 @@ class RedshiftProxyLoader(load.LoaderPlugin): # TODO: use the assigned shading group as shaders if existed # assign default shader to redshift proxy shader_grp = next( - (shader_group for shader_group in cmds.ls(type="shadingEngine") - if shader_group == "initialShadingGroup") + (shader_group for shader_group in + cmds.ls("initialShadingGroup", type="shadingEngine") + ) ) cmds.sets(mesh_shape, forceElement=shader_grp) From b40cba08016a9607d4e5f82ac534e0970079bae8 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 4 Jan 2024 19:20:43 +0800 Subject: [PATCH 06/20] hound --- openpype/hosts/maya/plugins/load/load_redshift_proxy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py index 7b657f9184..33f39ebf38 100644 --- a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py +++ b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py @@ -140,8 +140,9 @@ class RedshiftProxyLoader(load.LoaderPlugin): # TODO: use the assigned shading group as shaders if existed # assign default shader to redshift proxy shader_grp = next( - (shader_group for shader_group in - cmds.ls("initialShadingGroup", type="shadingEngine") + ( + shader_group for shader_group in + cmds.ls("initialShadingGroup", type="shadingEngine") ) ) cmds.sets(mesh_shape, forceElement=shader_grp) From 584341dcef9a4d4185ba1d159d60fcba9d0dc755 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 4 Jan 2024 19:30:43 +0800 Subject: [PATCH 07/20] code tweaks on default shader grp --- openpype/hosts/maya/plugins/load/load_redshift_proxy.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py index 33f39ebf38..40385f34d6 100644 --- a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py +++ b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py @@ -139,13 +139,8 @@ class RedshiftProxyLoader(load.LoaderPlugin): # TODO: use the assigned shading group as shaders if existed # assign default shader to redshift proxy - shader_grp = next( - ( - shader_group for shader_group in - cmds.ls("initialShadingGroup", type="shadingEngine") - ) - ) - cmds.sets(mesh_shape, forceElement=shader_grp) + if cmds.ls("initialShadingGroup", type="shadingEngine"): + cmds.sets(mesh_shape, forceElement="initialShadingGroup") group_node = cmds.group(empty=True, name="{}_GRP".format(name)) mesh_transform = cmds.listRelatives(mesh_shape, From fd87751c36dc2c1fe1565dc8d782d8dcd786bf3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Sat, 6 Jan 2024 00:01:14 +0100 Subject: [PATCH 08/20] :art: add split export support for redshift --- .../plugins/publish/collect_redshift_rop.py | 19 +++++++++++++++++++ .../publish/submit_houdini_render_deadline.py | 10 ++++++++++ server_addon/deadline/server/version.py | 2 +- server_addon/houdini/server/version.py | 2 +- 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py b/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py index 0acddab011..cd3bb2bb7a 100644 --- a/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py +++ b/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py @@ -45,6 +45,25 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin): beauty_suffix = rop.evalParm("RS_outputBeautyAOVSuffix") render_products = [] + # Store whether we are splitting the render job (export + render) + split_render = bool(rop.parm("RS_archive_enable").eval()) + instance.data["splitRender"] = split_render + export_prefix = None + export_products = [] + if split_render: + export_prefix = evalParmNoFrame( + rop, "RS_archive_file", pad_character="0" + ) + beauty_export_product = self.get_render_product_name( + prefix=export_prefix, + suffix=None) + export_products.append(beauty_export_product) + self.log.debug( + "Found export product: {}".format(beauty_export_product) + ) + instance.data["ifdFile"] = beauty_export_product + instance.data["exportFiles"] = list(export_products) + # Default beauty AOV beauty_product = self.get_render_product_name( prefix=default_prefix, suffix=beauty_suffix diff --git a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py index c8960185b2..0bfb37ee1c 100644 --- a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py @@ -41,6 +41,11 @@ class VrayRenderPluginInfo(): SeparateFilesPerFrame = attr.ib(default=True) +@attr.s +class RedshiftRenderPluginInfo(): + SceneFile = attr.ib(default=None) + Version = attr.ib(default=None) + class HoudiniSubmitDeadline( abstract_submit_deadline.AbstractSubmitDeadline, OpenPypePyblishPluginMixin @@ -262,6 +267,11 @@ class HoudiniSubmitDeadline( plugin_info = VrayRenderPluginInfo( InputFilename=instance.data["ifdFile"], ) + elif family == "redshift_rop": + plugin_info = RedshiftRenderPluginInfo( + SceneFile=instance.data["ifdFile"], + Version=os.getenv("REDSHIFT_VERSION", "3.5.22"), + ) else: self.log.error( "Family '%s' not supported yet to split render job", diff --git a/server_addon/deadline/server/version.py b/server_addon/deadline/server/version.py index 1276d0254f..0a8da88258 100644 --- a/server_addon/deadline/server/version.py +++ b/server_addon/deadline/server/version.py @@ -1 +1 @@ -__version__ = "0.1.5" +__version__ = "0.1.6" diff --git a/server_addon/houdini/server/version.py b/server_addon/houdini/server/version.py index 6232f7ab18..5635676f6b 100644 --- a/server_addon/houdini/server/version.py +++ b/server_addon/houdini/server/version.py @@ -1 +1 @@ -__version__ = "0.2.10" +__version__ = "0.2.11" From 9df4160595cd6678a6501bdc2dc79e40ba4b264b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 6 Jan 2024 03:25:49 +0000 Subject: [PATCH 09/20] chore(): update bug report / version --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 132e960885..2e854061d5 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -35,6 +35,7 @@ body: label: Version description: What version are you running? Look to OpenPype Tray options: + - 3.18.3-nightly.1 - 3.18.2 - 3.18.2-nightly.6 - 3.18.2-nightly.5 @@ -134,7 +135,6 @@ body: - 3.15.6-nightly.3 - 3.15.6-nightly.2 - 3.15.6-nightly.1 - - 3.15.5 validations: required: true - type: dropdown From 18e1f62ba29ff796e35b6e8da6bba3ce1f113e29 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Mon, 8 Jan 2024 11:27:43 +0200 Subject: [PATCH 10/20] add split setting in redshift rop creator --- .../plugins/create/create_redshift_rop.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py index 1b8826a932..d790aaa340 100644 --- a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py +++ b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py @@ -15,6 +15,9 @@ class CreateRedshiftROP(plugin.HoudiniCreator): icon = "magic" ext = "exr" + # Default to split export and render jobs + split_render = True + def create(self, subset_name, instance_data, pre_create_data): instance_data.pop("active", None) @@ -76,6 +79,16 @@ class CreateRedshiftROP(plugin.HoudiniCreator): camera = node.path() parms.update({ "RS_renderCamera": camera or ""}) + + if pre_create_data.get("split_render"): + rs_filepath = \ + "{export_dir}{subset_name}/{subset_name}.$F4.rs".format( + export_dir=hou.text.expandString("$HIP/pyblish/rs/"), + subset_name=subset_name, + ) + parms["RS_archive_enable"] = 1 + parms["RS_archive_file"] = rs_filepath + instance_node.setParms(parms) # Lock some Avalon attributes @@ -102,6 +115,9 @@ class CreateRedshiftROP(plugin.HoudiniCreator): BoolDef("farm", label="Submitting to Farm", default=True), + BoolDef("split_render", + label="Split export and render jobs", + default=self.split_render), EnumDef("image_format", image_format_enum, default=self.ext, From 808a2b7031d0ec81516ee170fd3bcef1fa5e3b1c Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Mon, 8 Jan 2024 11:43:04 +0200 Subject: [PATCH 11/20] BigRoy's comments --- .../plugins/create/create_redshift_rop.py | 16 +++++++++------- .../plugins/publish/collect_redshift_rop.py | 1 - 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py index d790aaa340..097c703283 100644 --- a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py +++ b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py @@ -80,14 +80,16 @@ class CreateRedshiftROP(plugin.HoudiniCreator): parms.update({ "RS_renderCamera": camera or ""}) - if pre_create_data.get("split_render"): - rs_filepath = \ - "{export_dir}{subset_name}/{subset_name}.$F4.rs".format( - export_dir=hou.text.expandString("$HIP/pyblish/rs/"), - subset_name=subset_name, - ) + rs_filepath = \ + "{export_dir}{subset_name}/{subset_name}.$F4.rs".format( + export_dir=hou.text.expandString("$HIP/pyblish/rs/"), + subset_name=subset_name, + ) + parms["RS_archive_file"] = rs_filepath + + if pre_create_data.get("split_render", self.split_render): parms["RS_archive_enable"] = 1 - parms["RS_archive_file"] = rs_filepath + instance_node.setParms(parms) diff --git a/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py b/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py index cd3bb2bb7a..056684b3a3 100644 --- a/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py +++ b/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py @@ -48,7 +48,6 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin): # Store whether we are splitting the render job (export + render) split_render = bool(rop.parm("RS_archive_enable").eval()) instance.data["splitRender"] = split_render - export_prefix = None export_products = [] if split_render: export_prefix = evalParmNoFrame( From 938d9126a2bf76df4f9a3e5ccde2231dfd6507c3 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Mon, 8 Jan 2024 11:48:23 +0200 Subject: [PATCH 12/20] BigRoy's comment - stick to code style --- .../deadline/plugins/publish/submit_houdini_render_deadline.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py index 0bfb37ee1c..8b03f682fc 100644 --- a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py @@ -46,6 +46,7 @@ class RedshiftRenderPluginInfo(): SceneFile = attr.ib(default=None) Version = attr.ib(default=None) + class HoudiniSubmitDeadline( abstract_submit_deadline.AbstractSubmitDeadline, OpenPypePyblishPluginMixin From 1e3fad27b0147691a3e535b9473ff330e84cfd51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Mon, 8 Jan 2024 10:57:05 +0100 Subject: [PATCH 13/20] :recycle: some code style changes --- .../plugins/create/create_redshift_rop.py | 25 ++++++++----------- .../plugins/publish/collect_redshift_rop.py | 13 ++++------ .../publish/submit_houdini_render_deadline.py | 1 + 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py index 097c703283..b36580f67e 100644 --- a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py +++ b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py @@ -39,12 +39,15 @@ class CreateRedshiftROP(plugin.HoudiniCreator): # Also create the linked Redshift IPR Rop try: ipr_rop = instance_node.parent().createNode( - "Redshift_IPR", node_name=basename + "_IPR" + "Redshift_IPR", node_name=f"{basename}_IPR" ) - except hou.OperationFailed: + except hou.OperationFailed as e: raise plugin.OpenPypeCreatorError( - ("Cannot create Redshift node. Is Redshift " - "installed and enabled?")) + ( + "Cannot create Redshift node. Is Redshift " + "installed and enabled?" + ) + ) from e # Move it to directly under the Redshift ROP ipr_rop.setPosition(instance_node.position() + hou.Vector2(0, -1)) @@ -77,22 +80,16 @@ class CreateRedshiftROP(plugin.HoudiniCreator): for node in self.selected_nodes: if node.type().name() == "cam": camera = node.path() - parms.update({ - "RS_renderCamera": camera or ""}) + parms["RS_renderCamera"] = camera or "" - rs_filepath = \ - "{export_dir}{subset_name}/{subset_name}.$F4.rs".format( - export_dir=hou.text.expandString("$HIP/pyblish/rs/"), - subset_name=subset_name, - ) + export_dir=hou.text.expandString("$HIP/pyblish/rs/") + rs_filepath = f"{export_dir}{subset_name}/{subset_name}.$F4.rs" parms["RS_archive_file"] = rs_filepath + instance_node.setParms(parms) if pre_create_data.get("split_render", self.split_render): parms["RS_archive_enable"] = 1 - - instance_node.setParms(parms) - # Lock some Avalon attributes to_lock = ["family", "id"] self.lock_parameters(instance_node, to_lock) diff --git a/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py b/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py index 056684b3a3..aec7e07fbc 100644 --- a/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py +++ b/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py @@ -31,7 +31,6 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin): families = ["redshift_rop"] def process(self, instance): - rop = hou.node(instance.data.get("instance_node")) # Collect chunkSize @@ -43,8 +42,6 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin): default_prefix = evalParmNoFrame(rop, "RS_outputFileNamePrefix") beauty_suffix = rop.evalParm("RS_outputBeautyAOVSuffix") - render_products = [] - # Store whether we are splitting the render job (export + render) split_render = bool(rop.parm("RS_archive_enable").eval()) instance.data["splitRender"] = split_render @@ -67,7 +64,7 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin): beauty_product = self.get_render_product_name( prefix=default_prefix, suffix=beauty_suffix ) - render_products.append(beauty_product) + render_products = [beauty_product] files_by_aov = { "_": self.generate_expected_files(instance, beauty_product)} @@ -77,11 +74,11 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin): i = index + 1 # Skip disabled AOVs - if not rop.evalParm("RS_aovEnable_%s" % i): + if not rop.evalParm(f"RS_aovEnable_{i}"): continue - aov_suffix = rop.evalParm("RS_aovSuffix_%s" % i) - aov_prefix = evalParmNoFrame(rop, "RS_aovCustomPrefix_%s" % i) + aov_suffix = rop.evalParm(f"RS_aovSuffix_{i}") + aov_prefix = evalParmNoFrame(rop, f"RS_aovCustomPrefix_{i}") if not aov_prefix: aov_prefix = default_prefix @@ -103,7 +100,7 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin): instance.data["attachTo"] = [] # stub required data if "expectedFiles" not in instance.data: - instance.data["expectedFiles"] = list() + instance.data["expectedFiles"] = [] instance.data["expectedFiles"].append(files_by_aov) # update the colorspace data diff --git a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py index 8b03f682fc..fd5e789d0e 100644 --- a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py @@ -15,6 +15,7 @@ from openpype.lib import ( NumberDef ) + @attr.s class DeadlinePluginInfo(): SceneFile = attr.ib(default=None) From 3e4b8a152217af7473d38e8de4dd6f11ec84170b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Mon, 8 Jan 2024 11:16:33 +0100 Subject: [PATCH 14/20] :dog: fix hound --- openpype/hosts/houdini/plugins/create/create_redshift_rop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py index b36580f67e..151fd26074 100644 --- a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py +++ b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py @@ -82,7 +82,7 @@ class CreateRedshiftROP(plugin.HoudiniCreator): camera = node.path() parms["RS_renderCamera"] = camera or "" - export_dir=hou.text.expandString("$HIP/pyblish/rs/") + export_dir = hou.text.expandString("$HIP/pyblish/rs/") rs_filepath = f"{export_dir}{subset_name}/{subset_name}.$F4.rs" parms["RS_archive_file"] = rs_filepath From 5d787d3fc3c77b2977f18b6da1ee7161610e4a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Mon, 8 Jan 2024 11:17:12 +0100 Subject: [PATCH 15/20] :recycle: change how redshift version is passed --- .../plugins/publish/submit_houdini_render_deadline.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py index fd5e789d0e..abcc3378da 100644 --- a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py @@ -271,9 +271,11 @@ class HoudiniSubmitDeadline( ) elif family == "redshift_rop": plugin_info = RedshiftRenderPluginInfo( - SceneFile=instance.data["ifdFile"], - Version=os.getenv("REDSHIFT_VERSION", "3.5.22"), + SceneFile=instance.data["ifdFile"] ) + if os.getenv("REDSHIFT_VERSION"): + plugin_info.Version = os.getenv("REDSHIFT_VERSION"), + else: self.log.error( "Family '%s' not supported yet to split render job", From 5f837d6f0b381f0ffc4db488c563bac10127b481 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Mon, 8 Jan 2024 11:51:28 +0100 Subject: [PATCH 16/20] AfterEffects: exposing Deadline pools fields in Publisher UI (#6079) * OP-6421 - added render family to families filter As published instances follow product type `render` now, fields wouldn't be shown for them. * OP-6421 - updated documentation * OP-6421 - added hosts filter Limits this with higher precision. --- .../deadline/plugins/publish/collect_pools.py | 40 +++++++++++++++---- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/openpype/modules/deadline/plugins/publish/collect_pools.py b/openpype/modules/deadline/plugins/publish/collect_pools.py index a25b149f11..9ee079b892 100644 --- a/openpype/modules/deadline/plugins/publish/collect_pools.py +++ b/openpype/modules/deadline/plugins/publish/collect_pools.py @@ -1,7 +1,4 @@ # -*- coding: utf-8 -*- -"""Collect Deadline pools. Choose default one from Settings - -""" import pyblish.api from openpype.lib import TextDef from openpype.pipeline.publish import OpenPypePyblishPluginMixin @@ -9,11 +6,35 @@ from openpype.pipeline.publish import OpenPypePyblishPluginMixin class CollectDeadlinePools(pyblish.api.InstancePlugin, OpenPypePyblishPluginMixin): - """Collect pools from instance if present, from Setting otherwise.""" + """Collect pools from instance or Publisher attributes, from Setting + otherwise. + + Pools are used to control which DL workers could render the job. + + Pools might be set: + - directly on the instance (set directly in DCC) + - from Publisher attributes + - from defaults from Settings. + + Publisher attributes could be shown even for instances that should be + rendered locally as visibility is driven by product type of the instance + (which will be `render` most likely). + (Might be resolved in the future and class attribute 'families' should + be cleaned up.) + + """ order = pyblish.api.CollectorOrder + 0.420 label = "Collect Deadline Pools" - families = ["rendering", + hosts = ["aftereffects", + "fusion", + "harmony" + "nuke", + "maya", + "max"] + + families = ["render", + "rendering", "render.farm", "renderFarm", "renderlayer", @@ -30,7 +51,6 @@ class CollectDeadlinePools(pyblish.api.InstancePlugin, cls.secondary_pool = settings.get("secondary_pool", None) def process(self, instance): - attr_values = self.get_attr_values_from_data(instance.data) if not instance.data.get("primaryPool"): instance.data["primaryPool"] = ( @@ -60,8 +80,12 @@ class CollectDeadlinePools(pyblish.api.InstancePlugin, return [ TextDef("primaryPool", label="Primary Pool", - default=cls.primary_pool), + default=cls.primary_pool, + tooltip="Deadline primary pool, " + "applicable for farm rendering"), TextDef("secondaryPool", label="Secondary Pool", - default=cls.secondary_pool) + default=cls.secondary_pool, + tooltip="Deadline secondary pool, " + "applicable for farm rendering") ] From cf17ea8377e21c4820756c83f03cd43f2eafeeeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Mon, 8 Jan 2024 12:09:06 +0100 Subject: [PATCH 17/20] :memo: add comment and warning about unspecified RS version --- .../publish/submit_houdini_render_deadline.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py index abcc3378da..bf7fb45a8b 100644 --- a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py @@ -273,8 +273,20 @@ class HoudiniSubmitDeadline( plugin_info = RedshiftRenderPluginInfo( SceneFile=instance.data["ifdFile"] ) + # Note: To use different versions of Redshift on Deadline + # set the `REDSHIFT_VERSION` env variable in the Tools + # settings in the AYON Application plugin. You will also + # need to set that version in `Redshift.param` file + # of the Redshift Deadline plugin: + # [Redshift_Executable_*] + # where * is the version number. if os.getenv("REDSHIFT_VERSION"): - plugin_info.Version = os.getenv("REDSHIFT_VERSION"), + plugin_info.Version = os.getenv("REDSHIFT_VERSION") + else: + self.log.warning(( + "REDSHIFT_VERSION env variable is not set" + " - using version configured in Deadline" + )) else: self.log.error( From 9d8378502436c1188fdb03be0185552cdfae2a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Mon, 8 Jan 2024 12:41:22 +0100 Subject: [PATCH 18/20] :bug: fix render archive enable flag settings --- openpype/hosts/houdini/plugins/create/create_redshift_rop.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py index 151fd26074..9d1c7bc90d 100644 --- a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py +++ b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py @@ -86,10 +86,11 @@ class CreateRedshiftROP(plugin.HoudiniCreator): rs_filepath = f"{export_dir}{subset_name}/{subset_name}.$F4.rs" parms["RS_archive_file"] = rs_filepath - instance_node.setParms(parms) if pre_create_data.get("split_render", self.split_render): parms["RS_archive_enable"] = 1 + instance_node.setParms(parms) + # Lock some Avalon attributes to_lock = ["family", "id"] self.lock_parameters(instance_node, to_lock) From 05cbb8b019d2e14fdcde07c38d4a7d80dfc2c3cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Mon, 8 Jan 2024 13:33:51 +0100 Subject: [PATCH 19/20] :wrench: fix and update pydocstyle configuration --- pyproject.toml | 5 +++++ setup.cfg | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 38236f88bc..ee8e8017e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -181,3 +181,8 @@ reportMissingTypeStubs = false [tool.poetry.extras] docs = ["Sphinx", "furo", "sphinxcontrib-napoleon"] + +[tool.pydocstyle] +inherit = false +convetion = "google" +match = "(?!test_).*\\.py" diff --git a/setup.cfg b/setup.cfg index ead9b25164..f0f754fb24 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,10 +16,6 @@ max-complexity = 30 [pylint.'MESSAGES CONTROL'] disable = no-member -[pydocstyle] -convention = google -ignore = D107 - [coverage:run] branch = True omit = /tests From 86cf80027c039a9a353911760eaf13ae78279ea0 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Tue, 9 Jan 2024 11:16:28 +0100 Subject: [PATCH 20/20] Chore: Remove deprecated templates profiles (#6103) * do not use 'IntegrateAssetNew' settings which are not available anymore * don't use 'IntegrateHeroVersion' settings to get hero version template name * remove 'template_name_profiles' from 'IntegrateHeroVersion' * remove unused attribute --- openpype/pipeline/publish/lib.py | 55 +------------------ .../plugins/publish/integrate_hero_version.py | 1 - .../schemas/schema_global_publish.json | 43 --------------- .../core/server/settings/publish_plugins.py | 20 ------- 4 files changed, 2 insertions(+), 117 deletions(-) diff --git a/openpype/pipeline/publish/lib.py b/openpype/pipeline/publish/lib.py index 4ea2f932f1..40cb94e2bf 100644 --- a/openpype/pipeline/publish/lib.py +++ b/openpype/pipeline/publish/lib.py @@ -58,41 +58,13 @@ def get_template_name_profiles( if not project_settings: project_settings = get_project_settings(project_name) - profiles = ( + return copy.deepcopy( project_settings ["global"] ["tools"] ["publish"] ["template_name_profiles"] ) - if profiles: - return copy.deepcopy(profiles) - - # Use legacy approach for cases new settings are not filled yet for the - # project - legacy_profiles = ( - project_settings - ["global"] - ["publish"] - ["IntegrateAssetNew"] - ["template_name_profiles"] - ) - if legacy_profiles: - if not logger: - logger = Logger.get_logger("get_template_name_profiles") - - logger.warning(( - "Project \"{}\" is using legacy access to publish template." - " It is recommended to move settings to new location" - " 'project_settings/global/tools/publish/template_name_profiles'." - ).format(project_name)) - - # Replace "tasks" key with "task_names" - profiles = [] - for profile in copy.deepcopy(legacy_profiles): - profile["task_names"] = profile.pop("tasks", []) - profiles.append(profile) - return profiles def get_hero_template_name_profiles( @@ -121,36 +93,13 @@ def get_hero_template_name_profiles( if not project_settings: project_settings = get_project_settings(project_name) - profiles = ( + return copy.deepcopy( project_settings ["global"] ["tools"] ["publish"] ["hero_template_name_profiles"] ) - if profiles: - return copy.deepcopy(profiles) - - # Use legacy approach for cases new settings are not filled yet for the - # project - legacy_profiles = copy.deepcopy( - project_settings - ["global"] - ["publish"] - ["IntegrateHeroVersion"] - ["template_name_profiles"] - ) - if legacy_profiles: - if not logger: - logger = Logger.get_logger("get_hero_template_name_profiles") - - logger.warning(( - "Project \"{}\" is using legacy access to hero publish template." - " It is recommended to move settings to new location" - " 'project_settings/global/tools/publish/" - "hero_template_name_profiles'." - ).format(project_name)) - return legacy_profiles def get_publish_template_name( diff --git a/openpype/plugins/publish/integrate_hero_version.py b/openpype/plugins/publish/integrate_hero_version.py index 9f0f7fe7f3..59dc6b5c64 100644 --- a/openpype/plugins/publish/integrate_hero_version.py +++ b/openpype/plugins/publish/integrate_hero_version.py @@ -54,7 +54,6 @@ class IntegrateHeroVersion(pyblish.api.InstancePlugin): # permissions error on files (files were used or user didn't have perms) # *but all other plugins must be sucessfully completed - template_name_profiles = [] _default_template_name = "hero" def process(self, instance): diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_global_publish.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_global_publish.json index ac2d9e190d..64f292a140 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_global_publish.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_global_publish.json @@ -1023,49 +1023,6 @@ { "type": "label", "label": "NOTE: Hero publish template profiles settings were moved to Tools/Publish/Hero template name profiles. Please move values there." - }, - { - "type": "list", - "key": "template_name_profiles", - "label": "Template name profiles (DEPRECATED)", - "use_label_wrap": true, - "object_type": { - "type": "dict", - "children": [ - { - "key": "families", - "label": "Families", - "type": "list", - "object_type": "text" - }, - { - "type": "hosts-enum", - "key": "hosts", - "label": "Hosts", - "multiselection": true - }, - { - "key": "task_types", - "label": "Task types", - "type": "task-types-enum" - }, - { - "key": "task_names", - "label": "Task names", - "type": "list", - "object_type": "text" - }, - { - "type": "separator" - }, - { - "type": "text", - "key": "template_name", - "label": "Template name", - "tooltip": "Name of template from Anatomy templates" - } - ] - } } ] }, diff --git a/server_addon/core/server/settings/publish_plugins.py b/server_addon/core/server/settings/publish_plugins.py index ef52416369..0c9b9c96ef 100644 --- a/server_addon/core/server/settings/publish_plugins.py +++ b/server_addon/core/server/settings/publish_plugins.py @@ -697,13 +697,6 @@ class IntegrateHeroVersionModel(BaseSettingsModel): optional: bool = Field(False, title="Optional") active: bool = Field(True, title="Active") families: list[str] = Field(default_factory=list, title="Families") - # TODO remove when removed from client code - template_name_profiles: list[IntegrateHeroTemplateNameProfileModel] = ( - Field( - default_factory=list, - title="Template name profiles" - ) - ) class CleanUpModel(BaseSettingsModel): @@ -1049,19 +1042,6 @@ DEFAULT_PUBLISH_VALUES = { "layout", "mayaScene", "simpleUnrealTexture" - ], - "template_name_profiles": [ - { - "product_types": [ - "simpleUnrealTexture" - ], - "hosts": [ - "standalonepublisher" - ], - "task_types": [], - "task_names": [], - "template_name": "simpleUnrealTextureHero" - } ] }, "CleanUp": {