From d24c4e03dd41faa775efdc57b31b3cc3132f10b8 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Mon, 20 Mar 2023 17:56:50 +0800 Subject: [PATCH 01/24] 3dsmax: render instance settings in creator --- .../hosts/max/plugins/create/create_render.py | 50 +++++++++++++++++++ .../max/plugins/publish/collect_render.py | 11 +++- .../deadline/plugins/publish/collect_pools.py | 2 +- .../plugins/publish/submit_max_deadline.py | 13 +++-- 4 files changed, 66 insertions(+), 10 deletions(-) diff --git a/openpype/hosts/max/plugins/create/create_render.py b/openpype/hosts/max/plugins/create/create_render.py index 269fff2e32..31e3ddcb09 100644 --- a/openpype/hosts/max/plugins/create/create_render.py +++ b/openpype/hosts/max/plugins/create/create_render.py @@ -1,8 +1,22 @@ # -*- coding: utf-8 -*- """Creator plugin for creating camera.""" from openpype.hosts.max.api import plugin +from openpype.lib import ( + TextDef, + BoolDef, + NumberDef, +) from openpype.pipeline import CreatedInstance from openpype.hosts.max.api.lib_rendersettings import RenderSettings +from openpype.settings import get_project_settings +from openpype.pipeline import legacy_io + + +def setting(project_setting=None): + render_setting = get_project_settings( + legacy_io.Session["AVALON_PROJECT"] + ) + return render_setting["deadline"]["publish"]["MaxSubmitDeadline"] class CreateRender(plugin.MaxCreator): @@ -31,3 +45,39 @@ class CreateRender(plugin.MaxCreator): RenderSettings().set_render_camera(sel_obj) # set output paths for rendering(mandatory for deadline) RenderSettings().render_output(container_name) + + def get_instance_attr_defs(self): + return [ + BoolDef("use_published", + default=setting()["active"], + label="Use Published Scene"), + + NumberDef("priority", + minimum=1, + maximum=250, + decimals=0, + default=setting()["priority"], + label="Priority"), + + NumberDef("chunkSize", + minimum=1, + maximum=50, + decimals=0, + default=setting()["chunk_size"], + label="Chunk Size"), + + TextDef("group", + default=setting()["group"], + label="Group Name"), + + TextDef("deadline_pool", + default=setting()["deadline_pool"], + label="Deadline Pool"), + + TextDef("deadline_pool_secondary", + default=setting()["deadline_pool_secondary"], + label="Deadline Pool Secondary") + ] + + def get_pre_create_attr_defs(self): + return self.get_instance_attr_defs() diff --git a/openpype/hosts/max/plugins/publish/collect_render.py b/openpype/hosts/max/plugins/publish/collect_render.py index 7c9e311c2f..357135750f 100644 --- a/openpype/hosts/max/plugins/publish/collect_render.py +++ b/openpype/hosts/max/plugins/publish/collect_render.py @@ -47,11 +47,13 @@ class CollectRender(pyblish.api.InstancePlugin): self.log.debug(f"Setting {version_int} to context.") context.data["version"] = version_int + creator_attr = instance.data["creator_attributes"] + # setup the plugin as 3dsmax for the internal renderer data = { "subset": instance.name, "asset": asset, - "publish": True, + "publish": creator_attr["use_published"], "maxversion": str(get_max_version()), "imageFormat": img_format, "family": 'maxrender', @@ -61,7 +63,12 @@ class CollectRender(pyblish.api.InstancePlugin): "plugin": "3dsmax", "frameStart": context.data['frameStart'], "frameEnd": context.data['frameEnd'], - "version": version_int + "version": version_int, + "priority": creator_attr["priority"], + "chunkSize": creator_attr["chunkSize"], + "group": creator_attr["group"], + "primaryPool": creator_attr["deadline_pool"], + "secondaryPool": creator_attr["deadline_pool_secondary"] } self.log.info("data: {0}".format(data)) instance.data.update(data) diff --git a/openpype/modules/deadline/plugins/publish/collect_pools.py b/openpype/modules/deadline/plugins/publish/collect_pools.py index 48130848d5..c9b4f485d8 100644 --- a/openpype/modules/deadline/plugins/publish/collect_pools.py +++ b/openpype/modules/deadline/plugins/publish/collect_pools.py @@ -10,7 +10,7 @@ class CollectDeadlinePools(pyblish.api.InstancePlugin): order = pyblish.api.CollectorOrder + 0.420 label = "Collect Deadline Pools" - families = ["rendering", "render.farm", "renderFarm", "renderlayer"] + families = ["rendering", "render.farm", "renderFarm", "renderlayer", "maxrender"] primary_pool = None secondary_pool = None diff --git a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py index 417a03de74..6d62dd7f33 100644 --- a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py @@ -21,7 +21,7 @@ class MaxPluginInfo(object): SaveFile = attr.ib(default=True) IgnoreInputs = attr.ib(default=True) - +#TODO: add the optional attirbute class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline): label = "Submit Render to Deadline" @@ -49,11 +49,13 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline): instance = self._instance context = instance.context - # Always use the original work file name for the Job name even when # rendering is done from the published Work File. The original work # file name is clearer because it can also have subversion strings, # etc. which are stripped for the published file. + if not instance.data.get("publish"): + self.use_published = False + src_filepath = context.data["currentFile"] src_filename = os.path.basename(src_filepath) @@ -71,13 +73,10 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline): job_info.Pool = instance.data.get("primaryPool") job_info.SecondaryPool = instance.data.get("secondaryPool") - job_info.ChunkSize = instance.data.get("chunkSize", 1) + job_info.ChunkSize = instance.data.get("chunkSize", self.chunk_size) job_info.Comment = context.data.get("comment") job_info.Priority = instance.data.get("priority", self.priority) - job_info.FramesPerTask = instance.data.get("framesPerTask", 1) - - if self.group: - job_info.Group = self.group + job_info.Group = instance.data.get("group", self.group) # Add options from RenderGlobals render_globals = instance.data.get("renderGlobals", {}) From fff1e3f0c1b257d03170fd665ccd09636fc611ad Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Mon, 20 Mar 2023 18:08:51 +0800 Subject: [PATCH 02/24] cosmetic fix and add optional for 3dsmax deadline submission --- .../deadline/plugins/publish/collect_pools.py | 6 +++++- .../deadline/plugins/publish/submit_max_deadline.py | 12 +++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/openpype/modules/deadline/plugins/publish/collect_pools.py b/openpype/modules/deadline/plugins/publish/collect_pools.py index c9b4f485d8..3a424f9e74 100644 --- a/openpype/modules/deadline/plugins/publish/collect_pools.py +++ b/openpype/modules/deadline/plugins/publish/collect_pools.py @@ -10,7 +10,11 @@ class CollectDeadlinePools(pyblish.api.InstancePlugin): order = pyblish.api.CollectorOrder + 0.420 label = "Collect Deadline Pools" - families = ["rendering", "render.farm", "renderFarm", "renderlayer", "maxrender"] + families = ["rendering", + "render.farm", + "renderFarm", + "renderlayer", + "maxrender"] primary_pool = None secondary_pool = None diff --git a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py index 6d62dd7f33..1f1a59a8e6 100644 --- a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py @@ -3,7 +3,10 @@ import getpass import copy import attr -from openpype.pipeline import legacy_io +from openpype.pipeline import ( + legacy_io, + OptionalPyblishPluginMixin +) from openpype.settings import get_project_settings from openpype.hosts.max.api.lib import ( get_current_renderer, @@ -21,8 +24,8 @@ class MaxPluginInfo(object): SaveFile = attr.ib(default=True) IgnoreInputs = attr.ib(default=True) -#TODO: add the optional attirbute -class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline): +class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, + OptionalPyblishPluginMixin): label = "Submit Render to Deadline" hosts = ["max"] @@ -39,6 +42,7 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline): deadline_pool = None deadline_pool_secondary = None framePerTask = 1 + optional = True def get_job_info(self): job_info = DeadlineJobInfo(Plugin="3dsmax") @@ -49,6 +53,8 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline): instance = self._instance context = instance.context + if not self.is_active(instance.data): + return # Always use the original work file name for the Job name even when # rendering is done from the published Work File. The original work # file name is clearer because it can also have subversion strings, From 7baa5754e05d6f30794cb265245f8d55a68a0c37 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Mon, 20 Mar 2023 18:09:39 +0800 Subject: [PATCH 03/24] cosmetic issue fix --- openpype/modules/deadline/plugins/publish/submit_max_deadline.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py index 1f1a59a8e6..d04c4b9c09 100644 --- a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py @@ -24,6 +24,7 @@ class MaxPluginInfo(object): SaveFile = attr.ib(default=True) IgnoreInputs = attr.ib(default=True) + class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, OptionalPyblishPluginMixin): From 507941c20898a9cf524851189a10176263543116 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Mon, 20 Mar 2023 18:36:36 +0800 Subject: [PATCH 04/24] use apply_settings --- .../hosts/max/plugins/create/create_render.py | 32 ++++++++++--------- .../plugins/publish/submit_max_deadline.py | 4 +-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/openpype/hosts/max/plugins/create/create_render.py b/openpype/hosts/max/plugins/create/create_render.py index 31e3ddcb09..dc1605bb5e 100644 --- a/openpype/hosts/max/plugins/create/create_render.py +++ b/openpype/hosts/max/plugins/create/create_render.py @@ -8,15 +8,6 @@ from openpype.lib import ( ) from openpype.pipeline import CreatedInstance from openpype.hosts.max.api.lib_rendersettings import RenderSettings -from openpype.settings import get_project_settings -from openpype.pipeline import legacy_io - - -def setting(project_setting=None): - render_setting = get_project_settings( - legacy_io.Session["AVALON_PROJECT"] - ) - return render_setting["deadline"]["publish"]["MaxSubmitDeadline"] class CreateRender(plugin.MaxCreator): @@ -25,6 +16,17 @@ class CreateRender(plugin.MaxCreator): family = "maxrender" icon = "gear" + def apply_settings(self, project_settings, system_settings): + plugin_settings = ( + project_settings["deadline"]["publish"]["MaxSubmitDeadline"] + ) + self.use_published = plugin_settings["use_published"] + self.priority = plugin_settings["priority"] + self.chunkSize = plugin_settings["chunk_size"] + self.group = plugin_settings["group"] + self.deadline_pool = plugin_settings["deadline_pool"] + self.deadline_pool_secondary = plugin_settings["deadline_pool_secondary"] + def create(self, subset_name, instance_data, pre_create_data): from pymxs import runtime as rt sel_obj = list(rt.selection) @@ -49,33 +51,33 @@ class CreateRender(plugin.MaxCreator): def get_instance_attr_defs(self): return [ BoolDef("use_published", - default=setting()["active"], + default=self.use_published, label="Use Published Scene"), NumberDef("priority", minimum=1, maximum=250, decimals=0, - default=setting()["priority"], + default=self.priority, label="Priority"), NumberDef("chunkSize", minimum=1, maximum=50, decimals=0, - default=setting()["chunk_size"], + default=self.chunkSize, label="Chunk Size"), TextDef("group", - default=setting()["group"], + default=self.group, label="Group Name"), TextDef("deadline_pool", - default=setting()["deadline_pool"], + default=self.deadline_pool, label="Deadline Pool"), TextDef("deadline_pool_secondary", - default=setting()["deadline_pool_secondary"], + default=self.deadline_pool_secondary, label="Deadline Pool Secondary") ] diff --git a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py index d04c4b9c09..92e06ca765 100644 --- a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py @@ -60,8 +60,6 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, # rendering is done from the published Work File. The original work # file name is clearer because it can also have subversion strings, # etc. which are stripped for the published file. - if not instance.data.get("publish"): - self.use_published = False src_filepath = context.data["currentFile"] src_filename = os.path.basename(src_filepath) @@ -80,7 +78,7 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, job_info.Pool = instance.data.get("primaryPool") job_info.SecondaryPool = instance.data.get("secondaryPool") - job_info.ChunkSize = instance.data.get("chunkSize", self.chunk_size) + job_info.ChunkSize = instance.data.get("chunkSize", 1) job_info.Comment = context.data.get("comment") job_info.Priority = instance.data.get("priority", self.priority) job_info.Group = instance.data.get("group", self.group) From e00ef8210c9fb592bf9ee84c5c8e56df785a2845 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Mon, 20 Mar 2023 18:37:58 +0800 Subject: [PATCH 05/24] cosmetic issue fix --- openpype/hosts/max/plugins/create/create_render.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/max/plugins/create/create_render.py b/openpype/hosts/max/plugins/create/create_render.py index dc1605bb5e..a24c5ea000 100644 --- a/openpype/hosts/max/plugins/create/create_render.py +++ b/openpype/hosts/max/plugins/create/create_render.py @@ -25,7 +25,7 @@ class CreateRender(plugin.MaxCreator): self.chunkSize = plugin_settings["chunk_size"] self.group = plugin_settings["group"] self.deadline_pool = plugin_settings["deadline_pool"] - self.deadline_pool_secondary = plugin_settings["deadline_pool_secondary"] + self.pool_secondary = plugin_settings["deadline_pool_secondary"] def create(self, subset_name, instance_data, pre_create_data): from pymxs import runtime as rt @@ -77,7 +77,7 @@ class CreateRender(plugin.MaxCreator): label="Deadline Pool"), TextDef("deadline_pool_secondary", - default=self.deadline_pool_secondary, + default=self.pool_secondary, label="Deadline Pool Secondary") ] From 36db7faab4c763ed58d9ac3a124a54c9ecac5e9b Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Mon, 20 Mar 2023 23:51:49 +0800 Subject: [PATCH 06/24] only allows user to set up the attributes in publish tab --- .../hosts/max/plugins/create/create_render.py | 52 ----------- .../max/plugins/publish/collect_render.py | 9 +- .../plugins/publish/submit_max_deadline.py | 86 ++++++++++++++++--- 3 files changed, 77 insertions(+), 70 deletions(-) diff --git a/openpype/hosts/max/plugins/create/create_render.py b/openpype/hosts/max/plugins/create/create_render.py index a24c5ea000..269fff2e32 100644 --- a/openpype/hosts/max/plugins/create/create_render.py +++ b/openpype/hosts/max/plugins/create/create_render.py @@ -1,11 +1,6 @@ # -*- coding: utf-8 -*- """Creator plugin for creating camera.""" from openpype.hosts.max.api import plugin -from openpype.lib import ( - TextDef, - BoolDef, - NumberDef, -) from openpype.pipeline import CreatedInstance from openpype.hosts.max.api.lib_rendersettings import RenderSettings @@ -16,17 +11,6 @@ class CreateRender(plugin.MaxCreator): family = "maxrender" icon = "gear" - def apply_settings(self, project_settings, system_settings): - plugin_settings = ( - project_settings["deadline"]["publish"]["MaxSubmitDeadline"] - ) - self.use_published = plugin_settings["use_published"] - self.priority = plugin_settings["priority"] - self.chunkSize = plugin_settings["chunk_size"] - self.group = plugin_settings["group"] - self.deadline_pool = plugin_settings["deadline_pool"] - self.pool_secondary = plugin_settings["deadline_pool_secondary"] - def create(self, subset_name, instance_data, pre_create_data): from pymxs import runtime as rt sel_obj = list(rt.selection) @@ -47,39 +31,3 @@ class CreateRender(plugin.MaxCreator): RenderSettings().set_render_camera(sel_obj) # set output paths for rendering(mandatory for deadline) RenderSettings().render_output(container_name) - - def get_instance_attr_defs(self): - return [ - BoolDef("use_published", - default=self.use_published, - label="Use Published Scene"), - - NumberDef("priority", - minimum=1, - maximum=250, - decimals=0, - default=self.priority, - label="Priority"), - - NumberDef("chunkSize", - minimum=1, - maximum=50, - decimals=0, - default=self.chunkSize, - label="Chunk Size"), - - TextDef("group", - default=self.group, - label="Group Name"), - - TextDef("deadline_pool", - default=self.deadline_pool, - label="Deadline Pool"), - - TextDef("deadline_pool_secondary", - default=self.pool_secondary, - label="Deadline Pool Secondary") - ] - - def get_pre_create_attr_defs(self): - return self.get_instance_attr_defs() diff --git a/openpype/hosts/max/plugins/publish/collect_render.py b/openpype/hosts/max/plugins/publish/collect_render.py index 357135750f..63e4108c84 100644 --- a/openpype/hosts/max/plugins/publish/collect_render.py +++ b/openpype/hosts/max/plugins/publish/collect_render.py @@ -47,13 +47,11 @@ class CollectRender(pyblish.api.InstancePlugin): self.log.debug(f"Setting {version_int} to context.") context.data["version"] = version_int - creator_attr = instance.data["creator_attributes"] - # setup the plugin as 3dsmax for the internal renderer data = { "subset": instance.name, "asset": asset, - "publish": creator_attr["use_published"], + "publish": True, "maxversion": str(get_max_version()), "imageFormat": img_format, "family": 'maxrender', @@ -64,11 +62,6 @@ class CollectRender(pyblish.api.InstancePlugin): "frameStart": context.data['frameStart'], "frameEnd": context.data['frameEnd'], "version": version_int, - "priority": creator_attr["priority"], - "chunkSize": creator_attr["chunkSize"], - "group": creator_attr["group"], - "primaryPool": creator_attr["deadline_pool"], - "secondaryPool": creator_attr["deadline_pool_secondary"] } self.log.info("data: {0}".format(data)) instance.data.update(data) diff --git a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py index 92e06ca765..83ecdfd6af 100644 --- a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py @@ -3,9 +3,14 @@ import getpass import copy import attr +from openpype.lib import ( + TextDef, + BoolDef, + NumberDef, +) from openpype.pipeline import ( legacy_io, - OptionalPyblishPluginMixin + OpenPypePyblishPluginMixin ) from openpype.settings import get_project_settings from openpype.hosts.max.api.lib import ( @@ -26,7 +31,7 @@ class MaxPluginInfo(object): class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, - OptionalPyblishPluginMixin): + OpenPypePyblishPluginMixin): label = "Submit Render to Deadline" hosts = ["max"] @@ -36,7 +41,7 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, use_published = True priority = 50 tile_priority = 50 - chunk_size = 1 + chunkSize = 1 jobInfo = {} pluginInfo = {} group = None @@ -45,6 +50,22 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, framePerTask = 1 optional = True + @classmethod + def apply_settings(cls, project_settings, system_settings): + settings = project_settings["deadline"]["publish"]["MaxSubmitDeadline"] # noqa + + # Take some defaults from settings + cls.use_published = settings.get("use_published", + cls.use_published) + cls.priority = settings.get("priority", + cls.priority) + cls.chunkSize = settings.get("chunk_size", cls.chunkSize) + cls.group = settings.get("group", cls.group) + cls.deadline_pool = settings.get("deadline_pool", + cls.deadline_pool) + cls.deadline_pool_secondary = settings.get("deadline_pool_secondary", + cls.deadline_pool_secondary) + def get_job_info(self): job_info = DeadlineJobInfo(Plugin="3dsmax") @@ -54,8 +75,6 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, instance = self._instance context = instance.context - if not self.is_active(instance.data): - return # Always use the original work file name for the Job name even when # rendering is done from the published Work File. The original work # file name is clearer because it can also have subversion strings, @@ -76,12 +95,22 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, ) job_info.Frames = frames - job_info.Pool = instance.data.get("primaryPool") - job_info.SecondaryPool = instance.data.get("secondaryPool") - job_info.ChunkSize = instance.data.get("chunkSize", 1) + attr_values = self.get_attr_values_from_data(instance.data) + + if attr_values.get("deadline_pool"): + job_info.Pool = attr_values.get("deadline_pool") + else: + job_info.Pool = instance.data.get("primaryPool") + if attr_values.get("deadline_pool_secondary"): + job_info.SecondaryPool = attr_values.get("deadline_pool_secondary") + else: + job_info.SecondaryPool = instance.data.get("secondaryPool", + self.deadline_pool_secondary) + + job_info.ChunkSize = attr_values.get("chunkSize", 1) job_info.Comment = context.data.get("comment") - job_info.Priority = instance.data.get("priority", self.priority) - job_info.Group = instance.data.get("group", self.group) + job_info.Priority = attr_values.get("priority", self.priority) + job_info.Group = attr_values.get("group", self.group) # Add options from RenderGlobals render_globals = instance.data.get("renderGlobals", {}) @@ -220,3 +249,40 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, plugin_info.update(plugin_data) return job_info, plugin_info + + @classmethod + def get_attribute_defs(cls): + defs = super(MaxSubmitDeadline, cls).get_attribute_defs() + defs.extend([ + BoolDef("use_published", + default=cls.use_published, + label="Use Published Scene"), + + NumberDef("priority", + minimum=1, + maximum=250, + decimals=0, + default=cls.priority, + label="Priority"), + + NumberDef("chunkSize", + minimum=1, + maximum=50, + decimals=0, + default=cls.chunkSize, + label="Frame Per Task"), + + TextDef("group", + default=cls.group, + label="Group Name"), + + TextDef("deadline_pool", + default=cls.deadline_pool, + label="Deadline Pool"), + + TextDef("deadline_pool_secondary", + default=cls.deadline_pool_secondary, + label="Deadline Pool Secondary") + ]) + + return defs From fb6bc696f8a5f94b54689c2d4e6c390f8058220c Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Mon, 20 Mar 2023 23:54:16 +0800 Subject: [PATCH 07/24] cosmetic issue fix --- .../modules/deadline/plugins/publish/submit_max_deadline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py index 83ecdfd6af..478c2ce2de 100644 --- a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py @@ -105,7 +105,7 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, job_info.SecondaryPool = attr_values.get("deadline_pool_secondary") else: job_info.SecondaryPool = instance.data.get("secondaryPool", - self.deadline_pool_secondary) + self.deadline_pool_secondary) # noqa job_info.ChunkSize = attr_values.get("chunkSize", 1) job_info.Comment = context.data.get("comment") From 2af4c94e2ca6328328b49bed562c2a4106ba9c90 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 21 Mar 2023 15:43:45 +0800 Subject: [PATCH 08/24] move the pool settings into the pool collectors --- .../deadline/plugins/publish/collect_pools.py | 46 +++++++++++++++++-- .../plugins/publish/submit_max_deadline.py | 25 ++-------- .../publish/validate_deadline_pools.py | 6 ++- 3 files changed, 51 insertions(+), 26 deletions(-) diff --git a/openpype/modules/deadline/plugins/publish/collect_pools.py b/openpype/modules/deadline/plugins/publish/collect_pools.py index 3a424f9e74..eb84308e9d 100644 --- a/openpype/modules/deadline/plugins/publish/collect_pools.py +++ b/openpype/modules/deadline/plugins/publish/collect_pools.py @@ -3,9 +3,12 @@ """ import pyblish.api +from openpype.lib import TextDef +from openpype.pipeline.publish import OpenPypePyblishPluginMixin -class CollectDeadlinePools(pyblish.api.InstancePlugin): +class CollectDeadlinePools(pyblish.api.InstancePlugin, + OpenPypePyblishPluginMixin): """Collect pools from instance if present, from Setting otherwise.""" order = pyblish.api.CollectorOrder + 0.420 @@ -19,9 +22,46 @@ class CollectDeadlinePools(pyblish.api.InstancePlugin): primary_pool = None secondary_pool = None + @classmethod + def apply_settings(cls, project_settings, system_settings): + # deadline.publish.CollectDeadlinePools + settings = project_settings["deadline"]["publish"]["CollectDeadlinePools"] # noqa + cls.primary_pool = settings.get("primary_pool", None) + cls.secondary_pool = settings.get("secondary_pool", None) + for family in cls.families: + if family == "maxrender": + max_setting = project_settings["deadline"]["publish"]["MaxSubmitDeadline"] # noqa + cls.primary_pool = max_setting.get("deadline_pool", None) + cls.secondary_pool = max_setting.get("deadline_pool_secondary", None) + def process(self, instance): + + attr_values = self.get_attr_values_from_data(instance.data) if not instance.data.get("primaryPool"): - instance.data["primaryPool"] = self.primary_pool or "none" + instance.data["primaryPool"] = ( + attr_values.get("primaryPool") or self.primary_pool or "none" + ) if not instance.data.get("secondaryPool"): - instance.data["secondaryPool"] = self.secondary_pool or "none" + instance.data["secondaryPool"] = ( + attr_values.get("secondaryPool") or self.secondary_pool or "none" # noqa + ) + + @classmethod + def get_attribute_defs(cls): + # TODO: Preferably this would be an enum for the user + # but the Deadline server URL can be dynamic and + # can be set per render instance. Since get_attribute_defs + # can't be dynamic unfortunately EnumDef isn't possible (yet?) + # pool_names = self.deadline_module.get_deadline_pools(deadline_url, + # self.log) + # secondary_pool_names = ["-"] + pool_names + + return [ + TextDef("primaryPool", + label="Primary Pool", + default=cls.primary_pool), + TextDef("secondaryPool", + label="Secondary Pool", + default=cls.secondary_pool) + ] diff --git a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py index 478c2ce2de..c55e85cfb0 100644 --- a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py @@ -61,10 +61,6 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, cls.priority) cls.chunkSize = settings.get("chunk_size", cls.chunkSize) cls.group = settings.get("group", cls.group) - cls.deadline_pool = settings.get("deadline_pool", - cls.deadline_pool) - cls.deadline_pool_secondary = settings.get("deadline_pool_secondary", - cls.deadline_pool_secondary) def get_job_info(self): job_info = DeadlineJobInfo(Plugin="3dsmax") @@ -95,17 +91,10 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, ) job_info.Frames = frames - attr_values = self.get_attr_values_from_data(instance.data) + job_info.Pool = instance.data.get("primaryPool") + job_info.SecondaryPool = instance.data.get("secondaryPool") - if attr_values.get("deadline_pool"): - job_info.Pool = attr_values.get("deadline_pool") - else: - job_info.Pool = instance.data.get("primaryPool") - if attr_values.get("deadline_pool_secondary"): - job_info.SecondaryPool = attr_values.get("deadline_pool_secondary") - else: - job_info.SecondaryPool = instance.data.get("secondaryPool", - self.deadline_pool_secondary) # noqa + attr_values = self.get_attr_values_from_data(instance.data) job_info.ChunkSize = attr_values.get("chunkSize", 1) job_info.Comment = context.data.get("comment") @@ -275,14 +264,6 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, TextDef("group", default=cls.group, label="Group Name"), - - TextDef("deadline_pool", - default=cls.deadline_pool, - label="Deadline Pool"), - - TextDef("deadline_pool_secondary", - default=cls.deadline_pool_secondary, - label="Deadline Pool Secondary") ]) return defs diff --git a/openpype/modules/deadline/plugins/publish/validate_deadline_pools.py b/openpype/modules/deadline/plugins/publish/validate_deadline_pools.py index 78eed17c98..3c02c7933f 100644 --- a/openpype/modules/deadline/plugins/publish/validate_deadline_pools.py +++ b/openpype/modules/deadline/plugins/publish/validate_deadline_pools.py @@ -17,7 +17,11 @@ class ValidateDeadlinePools(OptionalPyblishPluginMixin, label = "Validate Deadline Pools" order = pyblish.api.ValidatorOrder - families = ["rendering", "render.farm", "renderFarm", "renderlayer"] + families = ["rendering", + "render.farm", + "renderFarm", + "renderlayer", + "maxrender"] optional = True def process(self, instance): From c48fddbba33cdb290c6f86c34bc68bb25a943607 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 21 Mar 2023 15:45:01 +0800 Subject: [PATCH 09/24] cosmetic issue fix --- openpype/modules/deadline/plugins/publish/collect_pools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openpype/modules/deadline/plugins/publish/collect_pools.py b/openpype/modules/deadline/plugins/publish/collect_pools.py index eb84308e9d..b2732d375f 100644 --- a/openpype/modules/deadline/plugins/publish/collect_pools.py +++ b/openpype/modules/deadline/plugins/publish/collect_pools.py @@ -32,7 +32,8 @@ class CollectDeadlinePools(pyblish.api.InstancePlugin, if family == "maxrender": max_setting = project_settings["deadline"]["publish"]["MaxSubmitDeadline"] # noqa cls.primary_pool = max_setting.get("deadline_pool", None) - cls.secondary_pool = max_setting.get("deadline_pool_secondary", None) + cls.secondary_pool = max_setting.get("deadline_pool_secondary", + None) def process(self, instance): From d8441216e4fa4c8b1b0b1ee2e58d1df4eb2b28a3 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 21 Mar 2023 15:55:07 +0800 Subject: [PATCH 10/24] move the pool settings into the pool collectors --- openpype/modules/deadline/plugins/publish/collect_pools.py | 6 ------ .../modules/deadline/plugins/publish/submit_max_deadline.py | 6 ++++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/openpype/modules/deadline/plugins/publish/collect_pools.py b/openpype/modules/deadline/plugins/publish/collect_pools.py index b2732d375f..e221eb00ea 100644 --- a/openpype/modules/deadline/plugins/publish/collect_pools.py +++ b/openpype/modules/deadline/plugins/publish/collect_pools.py @@ -28,12 +28,6 @@ class CollectDeadlinePools(pyblish.api.InstancePlugin, settings = project_settings["deadline"]["publish"]["CollectDeadlinePools"] # noqa cls.primary_pool = settings.get("primary_pool", None) cls.secondary_pool = settings.get("secondary_pool", None) - for family in cls.families: - if family == "maxrender": - max_setting = project_settings["deadline"]["publish"]["MaxSubmitDeadline"] # noqa - cls.primary_pool = max_setting.get("deadline_pool", None) - cls.secondary_pool = max_setting.get("deadline_pool_secondary", - None) def process(self, instance): diff --git a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py index c55e85cfb0..e681346556 100644 --- a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py @@ -91,8 +91,10 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, ) job_info.Frames = frames - job_info.Pool = instance.data.get("primaryPool") - job_info.SecondaryPool = instance.data.get("secondaryPool") + job_info.Pool = instance.data.get("primaryPool", + self.deadline_pool) + job_info.SecondaryPool = instance.data.get("secondaryPool", + self.deadline_pool_secondary) attr_values = self.get_attr_values_from_data(instance.data) From 6c1882236419d68934d6130242ffc9cf75c4eeba Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 21 Mar 2023 15:56:15 +0800 Subject: [PATCH 11/24] hound fix --- .../modules/deadline/plugins/publish/submit_max_deadline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py index e681346556..e99752b7ab 100644 --- a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py @@ -94,7 +94,7 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, job_info.Pool = instance.data.get("primaryPool", self.deadline_pool) job_info.SecondaryPool = instance.data.get("secondaryPool", - self.deadline_pool_secondary) + self.deadline_pool_secondary) # noqa attr_values = self.get_attr_values_from_data(instance.data) From 6bdca1561bc14fd024f0d264887f4a2202fbcc79 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 21 Mar 2023 16:00:29 +0800 Subject: [PATCH 12/24] clean up the duplicate attributes for pool settings --- .../deadline/plugins/publish/submit_max_deadline.py | 8 ++------ .../settings/defaults/project_settings/deadline.json | 2 -- .../projects_schema/schema_project_deadline.json | 10 ---------- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py index e99752b7ab..65d08b9ef4 100644 --- a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py @@ -45,8 +45,6 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, jobInfo = {} pluginInfo = {} group = None - deadline_pool = None - deadline_pool_secondary = None framePerTask = 1 optional = True @@ -91,10 +89,8 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, ) job_info.Frames = frames - job_info.Pool = instance.data.get("primaryPool", - self.deadline_pool) - job_info.SecondaryPool = instance.data.get("secondaryPool", - self.deadline_pool_secondary) # noqa + job_info.Pool = instance.data.get("primaryPool") + job_info.SecondaryPool = instance.data.get("secondaryPool") attr_values = self.get_attr_values_from_data(instance.data) diff --git a/openpype/settings/defaults/project_settings/deadline.json b/openpype/settings/defaults/project_settings/deadline.json index 0cbd323299..dec6a405a0 100644 --- a/openpype/settings/defaults/project_settings/deadline.json +++ b/openpype/settings/defaults/project_settings/deadline.json @@ -44,8 +44,6 @@ "priority": 50, "chunk_size": 10, "group": "none", - "deadline_pool": "", - "deadline_pool_secondary": "", "framePerTask": 1 }, "NukeSubmitDeadline": { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_deadline.json b/openpype/settings/entities/schemas/projects_schema/schema_project_deadline.json index 9906939cc7..29551cc9f8 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_deadline.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_deadline.json @@ -246,16 +246,6 @@ "key": "group", "label": "Group Name" }, - { - "type": "text", - "key": "deadline_pool", - "label": "Deadline pool" - }, - { - "type": "text", - "key": "deadline_pool_secondary", - "label": "Deadline pool (secondary)" - }, { "type": "number", "key": "framePerTask", From 44120036bf8d8c45fd89cae46837cbe8088c63ed Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 21 Mar 2023 16:03:40 +0800 Subject: [PATCH 13/24] clean up setting --- openpype/settings/defaults/project_settings/deadline.json | 3 +-- .../schemas/projects_schema/schema_project_deadline.json | 7 +------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/openpype/settings/defaults/project_settings/deadline.json b/openpype/settings/defaults/project_settings/deadline.json index dec6a405a0..fdd70f1a44 100644 --- a/openpype/settings/defaults/project_settings/deadline.json +++ b/openpype/settings/defaults/project_settings/deadline.json @@ -43,8 +43,7 @@ "use_published": true, "priority": 50, "chunk_size": 10, - "group": "none", - "framePerTask": 1 + "group": "none" }, "NukeSubmitDeadline": { "enabled": true, diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_deadline.json b/openpype/settings/entities/schemas/projects_schema/schema_project_deadline.json index 29551cc9f8..d8b5e4dc1f 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_deadline.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_deadline.json @@ -239,17 +239,12 @@ { "type": "number", "key": "chunk_size", - "label": "Chunk Size" + "label": "Frame per Task" }, { "type": "text", "key": "group", "label": "Group Name" - }, - { - "type": "number", - "key": "framePerTask", - "label": "Frame Per Task" } ] }, From 828f59bfb55e10c2c207c98eab7d6f1184d2826e Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 21 Mar 2023 16:37:58 +0800 Subject: [PATCH 14/24] clean up attributes --- .../modules/deadline/plugins/publish/submit_max_deadline.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py index 65d08b9ef4..dec4bcc500 100644 --- a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py @@ -40,13 +40,10 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, use_published = True priority = 50 - tile_priority = 50 - chunkSize = 1 + chunk_size = 1 jobInfo = {} pluginInfo = {} group = None - framePerTask = 1 - optional = True @classmethod def apply_settings(cls, project_settings, system_settings): From 55b984dc66c4948b793033afe27e111047b62ae1 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 21 Mar 2023 17:45:35 +0800 Subject: [PATCH 15/24] scene length setting for 3dsmax --- openpype/hosts/max/api/lib.py | 127 +++++++++++++++++++++++++++++ openpype/hosts/max/api/menu.py | 21 ++++- openpype/hosts/max/api/pipeline.py | 5 ++ 3 files changed, 152 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/max/api/lib.py b/openpype/hosts/max/api/lib.py index 4fb750d91b..f1d1f91dd1 100644 --- a/openpype/hosts/max/api/lib.py +++ b/openpype/hosts/max/api/lib.py @@ -6,6 +6,14 @@ from pymxs import runtime as rt from typing import Union import contextlib +from openpype.client import ( + get_project, + get_asset_by_name +) +from openpype.pipeline import legacy_io + +from openpype.pipeline.context_tools import get_current_project_asset + JSON_PREFIX = "JSON::" @@ -157,6 +165,125 @@ def get_multipass_setting(project_setting=None): ["multipass"]) +def set_scene_resolution(width, height): + """Set the render resolution + + Args: + width(int): value of the width + height(int): value of the height + + Returns: + None + + """ + rt.renderWidth = width + rt.renderHeight = height + + +def reset_scene_resolution(): + """Apply the scene resolution from the project definition + + scene resolution can be overwritten by an asset if the asset.data contains + any information regarding scene resolution . + + Returns: + None + """ + project_name = legacy_io.active_project() + project_doc = get_project(project_name) + project_data = project_doc["data"] + asset_data = get_current_project_asset()["data"] + + # Set project resolution + width_key = "resolutionWidth" + height_key = "resolutionHeight" + proj_width_key = project_data.get(width_key, 1920) + proj_height_key = project_data.get(height_key, 1080) + + width = asset_data.get(width_key, proj_width_key) + height = asset_data.get(height_key, proj_height_key) + + set_scene_resolution(width, height) + + +def get_frame_range(): + """Get the current assets frame range and handles.""" + # Set frame start/end + project_name = legacy_io.active_project() + asset_name = legacy_io.Session["AVALON_ASSET"] + asset = get_asset_by_name(project_name, asset_name) + + frame_start = asset["data"].get("frameStart") + frame_end = asset["data"].get("frameEnd") + # Backwards compatibility + if frame_start is None or frame_end is None: + frame_start = asset["data"].get("edit_in") + frame_end = asset["data"].get("edit_out") + + if frame_start is None or frame_end is None: + return + + handles = asset["data"].get("handles") or 0 + handle_start = asset["data"].get("handleStart") + if handle_start is None: + handle_start = handles + + handle_end = asset["data"].get("handleEnd") + if handle_end is None: + handle_end = handles + + return { + "frameStart": frame_start, + "frameEnd": frame_end, + "handleStart": handle_start, + "handleEnd": handle_end + } + + +def reset_frame_range(fps=True): + """Set frame range to current asset + + Args: + animationRange: A System Global variable which lets you get and + set an Interval value that defines the start and end frames + of the Active Time Segment. + frameRate: A System Global variable which lets you get + and set an Integer value that defines the current + scene frame rate in frames-per-second. + """ + if fps: + fps_number = float(legacy_io.Session.get("AVALON_FPS", + 25)) + rt.frameRate = fps_number + + frame_range = get_frame_range() + + frame_start = frame_range["frameStart"] - int(frame_range["handleStart"]) + frame_end = frame_range["frameEnd"] + int(frame_range["handleEnd"]) + + frange_cmd = f"animationRange = interval {frame_start} {frame_end}" + + rt.execute(frange_cmd) + + +def set_context_setting(): + """Apply the project settings from the project definition + + Settings can be overwritten by an asset if the asset.data contains + any information regarding those settings. + + Examples of settings: + frame range + resolution + + Returns: + None + """ + reset_scene_resolution() + + reset_frame_range() + + def get_max_version(): """ Args: diff --git a/openpype/hosts/max/api/menu.py b/openpype/hosts/max/api/menu.py index 5c273b49b4..fdac5eba09 100644 --- a/openpype/hosts/max/api/menu.py +++ b/openpype/hosts/max/api/menu.py @@ -4,7 +4,7 @@ from qtpy import QtWidgets, QtCore from pymxs import runtime as rt from openpype.tools.utils import host_tools - +from openpype.hosts.max.api import lib class OpenPypeMenu(object): """Object representing OpenPype menu. @@ -107,6 +107,17 @@ class OpenPypeMenu(object): workfiles_action = QtWidgets.QAction("Work Files...", openpype_menu) workfiles_action.triggered.connect(self.workfiles_callback) openpype_menu.addAction(workfiles_action) + + openpype_menu.addSeparator() + + res_action = QtWidgets.QAction("Set Resolution", openpype_menu) + res_action.triggered.connect(self.resolution_callback) + openpype_menu.addAction(res_action) + + frame_action = QtWidgets.QAction("Set Frame Range", openpype_menu) + frame_action.triggered.connect(self.frame_range_callback) + openpype_menu.addAction(frame_action) + return openpype_menu def load_callback(self): @@ -128,3 +139,11 @@ class OpenPypeMenu(object): def workfiles_callback(self): """Callback to show Workfiles tool.""" host_tools.show_workfiles(parent=self.main_widget) + + def resolution_callback(self): + """Callback to reset scene resolution""" + return lib.reset_scene_resolution() + + def frame_range_callback(self): + """Callback to reset frame range""" + return lib.reset_frame_range() diff --git a/openpype/hosts/max/api/pipeline.py b/openpype/hosts/max/api/pipeline.py index f8a7b8ea5c..dacc402318 100644 --- a/openpype/hosts/max/api/pipeline.py +++ b/openpype/hosts/max/api/pipeline.py @@ -50,6 +50,11 @@ class MaxHost(HostBase, IWorkfileHost, ILoadHost, INewPublisher): self._has_been_setup = True + def context_setting(): + return lib.set_context_setting() + rt.callbacks.addScript(rt.Name('systemPostNew'), + context_setting) + def has_unsaved_changes(self): # TODO: how to get it from 3dsmax? return True From a24dcd207cceb8959a832a3c576a59bba0200064 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 21 Mar 2023 18:53:12 +0800 Subject: [PATCH 16/24] renaming chunksize variablesd --- .../modules/deadline/plugins/publish/submit_max_deadline.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py index dec4bcc500..c728b6b9c7 100644 --- a/openpype/modules/deadline/plugins/publish/submit_max_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_max_deadline.py @@ -54,7 +54,7 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, cls.use_published) cls.priority = settings.get("priority", cls.priority) - cls.chunkSize = settings.get("chunk_size", cls.chunkSize) + cls.chuck_size = settings.get("chunk_size", cls.chunk_size) cls.group = settings.get("group", cls.group) def get_job_info(self): @@ -253,7 +253,7 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, minimum=1, maximum=50, decimals=0, - default=cls.chunkSize, + default=cls.chunk_size, label="Frame Per Task"), TextDef("group", From d861e556319bcc4f34fba481d6ec1e0aef9fbc84 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 22 Mar 2023 21:49:00 +0800 Subject: [PATCH 17/24] update the frame range settings --- openpype/hosts/max/api/lib.py | 72 ++++++++++++++--------------------- 1 file changed, 28 insertions(+), 44 deletions(-) diff --git a/openpype/hosts/max/api/lib.py b/openpype/hosts/max/api/lib.py index f1d1f91dd1..ac8f6aedfe 100644 --- a/openpype/hosts/max/api/lib.py +++ b/openpype/hosts/max/api/lib.py @@ -6,13 +6,10 @@ from pymxs import runtime as rt from typing import Union import contextlib -from openpype.client import ( - get_project, - get_asset_by_name +from openpype.pipeline.context_tools import ( + get_current_project_asset, + get_current_project ) -from openpype.pipeline import legacy_io - -from openpype.pipeline.context_tools import get_current_project_asset JSON_PREFIX = "JSON::" @@ -165,7 +162,7 @@ def get_multipass_setting(project_setting=None): ["multipass"]) -def set_scene_resolution(width, height): +def set_scene_resolution(width: int, height: int): """Set the render resolution Args: @@ -189,49 +186,43 @@ def reset_scene_resolution(): Returns: None """ - project_name = legacy_io.active_project() - project_doc = get_project(project_name) - project_data = project_doc["data"] - asset_data = get_current_project_asset()["data"] - + data = ["data.resolutionWidth", "data.resolutionHeight"] + project_resolution = get_current_project(fields=data)["data"] + project_resolution_data = project_resolution["data"] + asset_resolution = get_current_project_asset(fields=data)["data"] + asset_resolution_data = asset_resolution["data"] # Set project resolution - width_key = "resolutionWidth" - height_key = "resolutionHeight" - proj_width_key = project_data.get(width_key, 1920) - proj_height_key = project_data.get(height_key, 1080) - - width = asset_data.get(width_key, proj_width_key) - height = asset_data.get(height_key, proj_height_key) + project_width = int(project_resolution_data.get("resolutionWidth", 1920)) + project_height = int(project_resolution_data.get("resolutionHeight", 1080)) + width = int(asset_resolution_data.get("resolutionWidth", project_width)) + height = int(asset_resolution_data.get("resolutionHeight", project_height)) set_scene_resolution(width, height) -def get_frame_range(): - """Get the current assets frame range and handles.""" - # Set frame start/end - project_name = legacy_io.active_project() - asset_name = legacy_io.Session["AVALON_ASSET"] - asset = get_asset_by_name(project_name, asset_name) +def get_frame_range() -> dict: + """Get the current assets frame range and handles. + Returns: + dict: with frame start, frame end, handle start, handle end. + """ + # Set frame start/end + asset = get_current_project_asset() frame_start = asset["data"].get("frameStart") frame_end = asset["data"].get("frameEnd") # Backwards compatibility if frame_start is None or frame_end is None: frame_start = asset["data"].get("edit_in") frame_end = asset["data"].get("edit_out") - if frame_start is None or frame_end is None: return - handles = asset["data"].get("handles") or 0 handle_start = asset["data"].get("handleStart") if handle_start is None: handle_start = handles - handle_end = asset["data"].get("handleEnd") if handle_end is None: handle_end = handles - return { "frameStart": frame_start, "frameEnd": frame_end, @@ -240,29 +231,24 @@ def get_frame_range(): } -def reset_frame_range(fps=True): - """Set frame range to current asset +def reset_frame_range(fps: bool=True): + """Set frame range to current asset. - Args: + This is part of 3dsmax documentation: animationRange: A System Global variable which lets you get and - set an Interval value that defines the start and end frames - of the Active Time Segment. + set an Interval value that defines the start and end frames + of the Active Time Segment. frameRate: A System Global variable which lets you get - and set an Integer value that defines the current - scene frame rate in frames-per-second. + and set an Integer value that defines the current + scene frame rate in frames-per-second. """ if fps: - fps_number = float(legacy_io.Session.get("AVALON_FPS", - 25)) + fps_number = float(get_current_project(fields=["data.fps"])["data"]["fps"]) rt.frameRate = fps_number - frame_range = get_frame_range() - frame_start = frame_range["frameStart"] - int(frame_range["handleStart"]) frame_end = frame_range["frameEnd"] + int(frame_range["handleEnd"]) - frange_cmd = f"animationRange = interval {frame_start} {frame_end}" - rt.execute(frange_cmd) @@ -281,8 +267,6 @@ def set_context_setting(): """ reset_scene_resolution() - reset_frame_range() - def get_max_version(): """ From 4e8354eec810023d83a23616c1af0d76035932a6 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 22 Mar 2023 21:54:43 +0800 Subject: [PATCH 18/24] hound fix --- openpype/hosts/max/api/lib.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/openpype/hosts/max/api/lib.py b/openpype/hosts/max/api/lib.py index ac8f6aedfe..09edaaa2ef 100644 --- a/openpype/hosts/max/api/lib.py +++ b/openpype/hosts/max/api/lib.py @@ -182,7 +182,6 @@ def reset_scene_resolution(): scene resolution can be overwritten by an asset if the asset.data contains any information regarding scene resolution . - Returns: None """ @@ -204,7 +203,7 @@ def get_frame_range() -> dict: """Get the current assets frame range and handles. Returns: - dict: with frame start, frame end, handle start, handle end. + dict: with frame start, frame end, handle start, handle end. """ # Set frame start/end asset = get_current_project_asset() @@ -233,17 +232,18 @@ def get_frame_range() -> dict: def reset_frame_range(fps: bool=True): """Set frame range to current asset. + This is part of 3dsmax documentation: - This is part of 3dsmax documentation: - animationRange: A System Global variable which lets you get and - set an Interval value that defines the start and end frames - of the Active Time Segment. - frameRate: A System Global variable which lets you get - and set an Integer value that defines the current - scene frame rate in frames-per-second. + animationRange: A System Global variable which lets you get and + set an Interval value that defines the start and end frames + of the Active Time Segment. + frameRate: A System Global variable which lets you get + and set an Integer value that defines the current + scene frame rate in frames-per-second. """ if fps: - fps_number = float(get_current_project(fields=["data.fps"])["data"]["fps"]) + data_fps = get_current_project(fields=["data.fps"]) + fps_number = float(data_fps["data"]["fps"]) rt.frameRate = fps_number frame_range = get_frame_range() frame_start = frame_range["frameStart"] - int(frame_range["handleStart"]) From e373ccf4e3a747d3db3266f56478cdacfeb0aa3c Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 22 Mar 2023 21:57:19 +0800 Subject: [PATCH 19/24] hound fix --- openpype/hosts/max/api/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/max/api/lib.py b/openpype/hosts/max/api/lib.py index 09edaaa2ef..c398d7cf48 100644 --- a/openpype/hosts/max/api/lib.py +++ b/openpype/hosts/max/api/lib.py @@ -230,7 +230,7 @@ def get_frame_range() -> dict: } -def reset_frame_range(fps: bool=True): +def reset_frame_range(fps:bool=True): """Set frame range to current asset. This is part of 3dsmax documentation: From 57308ff488e0a2f931231a455cad13ca23eaaa7e Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 22 Mar 2023 21:58:29 +0800 Subject: [PATCH 20/24] hound fix --- openpype/hosts/max/api/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/max/api/lib.py b/openpype/hosts/max/api/lib.py index c398d7cf48..aa7f72b26c 100644 --- a/openpype/hosts/max/api/lib.py +++ b/openpype/hosts/max/api/lib.py @@ -230,7 +230,7 @@ def get_frame_range() -> dict: } -def reset_frame_range(fps:bool=True): +def reset_frame_range(fps: bool = True): """Set frame range to current asset. This is part of 3dsmax documentation: From 62ced23858534c081c4aee84714b236507e64439 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 23 Mar 2023 00:45:58 +0800 Subject: [PATCH 21/24] remove irrelevant attrs of data --- openpype/hosts/max/api/lib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/max/api/lib.py b/openpype/hosts/max/api/lib.py index aa7f72b26c..ac7d75db08 100644 --- a/openpype/hosts/max/api/lib.py +++ b/openpype/hosts/max/api/lib.py @@ -186,9 +186,9 @@ def reset_scene_resolution(): None """ data = ["data.resolutionWidth", "data.resolutionHeight"] - project_resolution = get_current_project(fields=data)["data"] + project_resolution = get_current_project(fields=data) project_resolution_data = project_resolution["data"] - asset_resolution = get_current_project_asset(fields=data)["data"] + asset_resolution = get_current_project_asset(fields=data) asset_resolution_data = asset_resolution["data"] # Set project resolution project_width = int(project_resolution_data.get("resolutionWidth", 1920)) From cc7a9f32c1efd58d89f18f0da4101d9df44666c6 Mon Sep 17 00:00:00 2001 From: Ondrej Samohel Date: Thu, 23 Mar 2023 14:30:51 +0100 Subject: [PATCH 22/24] :art: add OP startup script for max to cmdline args --- openpype/settings/defaults/system_settings/applications.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/settings/defaults/system_settings/applications.json b/openpype/settings/defaults/system_settings/applications.json index 5fd9b926fb..eb3a88ce66 100644 --- a/openpype/settings/defaults/system_settings/applications.json +++ b/openpype/settings/defaults/system_settings/applications.json @@ -133,7 +133,7 @@ "linux": [] }, "arguments": { - "windows": [], + "windows": ["-U MAXScript {OPENPYPE_ROOT}\\openpype\\hosts\\max\\startup\\startup.ms"], "darwin": [], "linux": [] }, From a178ca1569a43c1becfba3db0209ba3f982d4959 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Mon, 27 Mar 2023 17:35:45 +0800 Subject: [PATCH 23/24] remove duplicated imported function --- openpype/hosts/max/api/menu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/max/api/menu.py b/openpype/hosts/max/api/menu.py index b52acc3c38..066cc90039 100644 --- a/openpype/hosts/max/api/menu.py +++ b/openpype/hosts/max/api/menu.py @@ -5,7 +5,7 @@ from pymxs import runtime as rt from openpype.tools.utils import host_tools from openpype.hosts.max.api import lib -from openpype.hosts.max.api import lib + class OpenPypeMenu(object): """Object representing OpenPype menu. From 0778dd3ec763aa2257f235b310041aed18902b30 Mon Sep 17 00:00:00 2001 From: Ynbot Date: Mon, 27 Mar 2023 15:28:21 +0000 Subject: [PATCH 24/24] [Automated] Release --- CHANGELOG.md | 668 ++++++++++++++++++++++++++++++++++++++++++++ openpype/version.py | 2 +- pyproject.toml | 2 +- 3 files changed, 670 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 145c2e2c1a..78ea53f3d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,674 @@ # Changelog +[Full Changelog](https://github.com/ynput/OpenPype/compare/3.15.2...3.15.3) + +### **🆕 New features** + + +
+Data Exchanges: Point Cloud for 3dsMax #4532 + +Publish PRT format with tyFlow in 3dsmax + +Publish PRT format with tyFlow in 3dsmax and possibly set up loader to load the format too. +- [x] creator +- [x] extractor +- [x] validator +- [x] loader + + +___ + +
+ + +
+MaxScene Family #4615 + +Introduction of the Max Scene Family + + +___ + +
+ + +
+Blender: Extract Review #3616 + +Added Review to Blender. + +This implementation is based on #3508 but made compatible for the current implementation of OpenPype for Blender. + + +___ + +
+ + +
+Global: persistent staging directory for renders #4583 + +Allows configure if staging directory (`stagingDir`) should be persistent with use of profiles. + +With this feature, users can specify a transient data folder path based on presets, which can be used during the creation and publishing stages. In some cases, these DCCs automatically add a rendering path during the creation stage, which is then used in publishing.One of the key advantages of this feature is that it allows users to take advantage of faster storages for rendering, which can help improve workflow efficiency. Additionally, this feature allows users to keep their rendered data persistent, and use their own infrastructure for regular cleaning.However, it should be noted that some productions may want to use this feature without persistency. Furthermore, there may be a need for retargeting the rendering folder to faster storages, which is also not supported at the moment.It is studio responsibility to clean up obsolete folders with data.Location of the folder is configured in `project_anatomy/templates/others`. ('transient' key is expected, with 'folder' key, could be more templates)Which family/task type/subset is applicable is configured in:`project_settings/global/tools/publish/transient_dir_profiles` + + +___ + +
+ +### **🚀 Enhancements** + + +
+Maya: Multiple values on single render attribute - OP-4131 #4631 + +When validating render attributes, this adds support for multiple values. When repairing first value in list is used. + + +___ + +
+ + +
+Maya: enable 2D Pan/Zoom for playblasts - OP-5213 #4687 + +Setting for enabling 2D Pan/Zoom on reviews. + + +___ + +
+ + +
+Houdini: Create button open new publisher's "create" tab #4601 + +During a talk with @maxpareschi he mentioned that the new publisher in Houdini felt super confusing due to "Create" going to the older creator but now being completely empty and the publish button directly went to the publish tab.This resolves that by fixing the Create button to now open the new publisher but on the Create tab.Also made publish button enforce going to the "publish" tab for consistency in usage.@antirotor I think changing the Create button's callback was just missed in this commit or was there a specific reason to not change that around yet? + + +___ + +
+ + +
+Resolution settings referenced from DB record for 3dsMax #4652 + +- Add Callback for setting the resolution according to DB after the new scene is created. +- Add a new Action into openpype menu which allows the user to reset the resolution in 3dsMax + + +___ + +
+ + +
+scene length setting referenced from DB record for 3dsMax #4665 + +Setting the timeline length based on DB record in 3dsMax Hosts + + +___ + +
+ + +
+increment workfile version 3dsmax #4685 + +increment workfile version in 3dsmax as if in blender and maya hosts. + + +___ + +
+ + +
+Copy existing or generate new Fusion profile on prelaunch #4572 + +Fusion preferences will be copied to the predefined `~/.openpype/hosts/fusion/prefs` folder (or any other folder set in system settings) on launch. + +The idea is to create a copy of existing Fusion profile, adding an OpenPype menu to the Fusion instance.By default the copy setting is turned off, so no file copying is performed. Instead the clean Fusion profile is created by Fusion in the predefined folder. The default locaion is set to `~/.openpype/hosts/fusion/prefs`, to better comply with the other os platforms. After creating the default profile, some modifications are applied: +- forced Python3 +- forced English interface +- setup Openpype specific path maps.If the `copy_prefs` checkbox is toggled, a copy of existing Fusion profile folder will be placed in the mentioned location. Then they are altered the same way as described above. The operation is run only once, on the first launch, unless the `force_sync [Resync profile on each launch]` is toggled.English interface is forced because the `FUSION16_PROFILE_DIR` environment variable is not read otherwise (seems to be a Fusion bug). + + +___ + +
+ + +
+Fusion publish existing frames #4611 + +This PR adds the function to publish existing frames instead of having to re-render all of them for each new publish.I have split the render_locally plugin so the review-part is its own plugin now.I also change the saver-creator-plugin's label from Saver to Render (saver) as I intend to add a Prerender creator like in Nuke. + + +___ + +
+ + +
+Clockify: refresh and fix the integration #4607 + +Due to recent API changes, Clockify requires `user_id` to operate with the timers. I updated this part and currently it is a WIP for making it fully functional. Most functions, such as start and stop timer, and projects sync are currently working. For the rate limiting task new dependency is added: https://pypi.org/project/ratelimiter/ + + +___ + +
+ + +
+Publisher: Windows reduce command window pop-ups during Publishing #4672 + +Reduce the command line pop-ups that show on Windows during publishing. + + +___ + +
+ + +
+CelAction: conditional workfile parameters from settings #4677 + +Since some productions were requesting excluding some workfile parameters from publishing submission, we needed to move them to settings so those could be altered per project. + + +___ + +
+ + +
+Fix name and docstring for Create Workdir Extra Folders prelaunch hook #4683 + +Fix class name and docstring for Create Workdir Extra Folders prelaunch hookThe class name and docstring were originally copied from another plug-in and didn't match the plug-in logic.This also fixes potentially seeing this twice in your logs. Before:After:Where it was actually running both this prelaunch hook and the actual `AddLastWorkfileToLaunchArgs` plugin. + + +___ + +
+ +### **🐛 Bug fixes** + + +
+Maya: Fix getting non-active model panel. #2968 + +When capturing multiple cameras with image planes that have file sequences playing, only the active (first) camera will play through the file sequence. + + +___ + +
+ + +
+Maya: Fix broken review publishing. #4549 + +Resolves #4547 + + +___ + +
+ + +
+Maya: Avoid error on right click in Loader if `mtoa` is not loaded #4616 + +Fix an error on right clicking in the Loader when `mtoa` is not a loaded plug-in.Additionally if `mtoa` isn't loaded the loader will now load the plug-in before trying to create the arnold standin. + + +___ + +
+ + +
+Maya: Fix extract look colorspace detection #4618 + +Fix the logic which guesses the colorspace using `arnold` python library. +- Previously it'd error if `mtoa` was not available on path so it still required `mtoa` to be available. +- The guessing colorspace logic doesn't actually require `mtoa` to be loaded, but just the `arnold` python library to be available. This changes the logic so it doesn't require the `mtoa` plugin to get loaded to guess the colorspace. +- The if/else branch was likely not doing what was intended `cmds.loadPlugin("mtoa", quiet=True)` returns None if the plug-in was already loaded. So this would only ever be true if it ends up loading the `mtoa` plugin the first time. +```python +# Tested in Maya 2022.1 +print(cmds.loadPlugin("mtoa", quiet=True)) +# ['mtoa'] +print(cmds.loadPlugin("mtoa", quiet=True)) +# None +``` + + +___ + +
+ + +
+Maya: Maya Playblast Options overrides - OP-3847 #4634 + +When publishing a review in Maya, the extractor would fail due to wrong (long) panel name. + + +___ + +
+ + +
+Bugfix/op 2834 fix extract playblast #4701 + +Paragraphs contain detailed information on the changes made to the product or service, providing an in-depth description of the updates and enhancements. They can be used to explain the reasoning behind the changes, or to highlight the importance of the new features. Paragraphs can often include links to further information or support documentation. + + +___ + +
+ + +
+Bugfix/op 2834 fix extract playblast #4704 + +Paragraphs contain detailed information on the changes made to the product or service, providing an in-depth description of the updates and enhancements. They can be used to explain the reasoning behind the changes, or to highlight the importance of the new features. Paragraphs can often include links to further information or support documentation. + + +___ + +
+ + +
+Maya: bug fix for passing zoom settings if review is attached to subset #4716 + +Fix for attaching review to subset with pan/zoom option. + + +___ + +
+ + +
+Fixed a bug where a QThread in the splash screen could be destroyed before finishing execution #4647 + +This should fix the occasional behavior of the QThread being destroyed before even its worker returns from the `run()` function.After quiting, it should wait for the QThread object to properly close itself. + + +___ + +
+ + +
+Max: fix the bug of removing an instance #4617 + +fix the bug of removing an instance in 3dsMax + + +___ + +
+ + +
+bugfix for 3dsmax publishing error #4637 + +fix the bug of failing publishing job in 3dsMax + + +___ + +
+ + +
+3dsmax: opening last workfile #4644 + +Supports opening last saved workfile in 3dsmax host. + + +___ + +
+ + +
+Global | Nuke: fixing farm publishing workflow #4623 + +After Nuke had adopted new publisher with new creators new issues were introduced. Those issues were addressed with this PR. Those are for example broken reviewable video files publishing if published via farm. Also fixed local publishing. + + +___ + +
+ + +
+Nuke: Nukenodes family instance without frame range #4669 + +No need to add frame range data into `nukenodes` (backdrop) family publishes - since those are timeless. + + +___ + +
+ + +
+TVPaint: Optional Validation plugins can be de/activated by user #4674 + +Added `OptionalPyblishPluginMixin` to TVpaint plugins that can be optional. + + +___ + +
+ + +
+Hiero: Creator with correct workfile numeric padding input #4666 + +Creator was showing 99 in workfile input for long time, even if users set default value to 1001 in studio settings. This has been fixed now. + + +___ + +
+ + +
+Hiero: correct container colors if UpToDate #4708 + +Colors on loaded containers are now correctly identifying real state of version. `Red` for out of date and `green` for up to date. + + +___ + +
+ + +
+Maya: tile assembly fail in draft - OP-4820 #4416 + +Tile assembly in Deadline was broken. + +Initial bug report revealed other areas of the tile assembly that needed fixing. + + +___ + +
+ + +
+Scene inventory: Fix code errors when "not found" entries are found #4594 + +Whenever a "NOT FOUND" entry is present a lot of errors happened in the Scene Inventory: +- It started spamming a lot of errors for the VersionDelegate since it had no numeric version (no version at all).Error reported on Discord: +```python +Traceback (most recent call last): + File "C:\Users\videopro\Documents\github\OpenPype\openpype\tools\utils\delegates.py", line 65, in paint + text = self.displayText( + File "C:\Users\videopro\Documents\github\OpenPype\openpype\tools\utils\delegates.py", line 33, in displayText + assert isinstance(value, numbers.Integral), ( +AssertionError: Version is not integer. "None" +``` +- Right click menu would error on NOT FOUND entries, and thus not show. With this PR it will now _disregard_ not found items for "Set version" and "Remove" but still allow actions.This PR resolves those. + + +___ + +
+ + +
+Ftrack: Ftrack additional families filtering #4633 + +Ftrack family collector makes sure the subset family is also in instance families for additional families filtering. + + +___ + +
+ + +
+General: Use right validation for ffmpeg executable #4640 + +Use ffmpeg exec validation for ffmpeg executables instead of oiio exec validation. The validation is used as last possible source of ffmpeg from `PATH` environment variables, which is an edge case but can cause issues. + + +___ + +
+ + +
+Global: add tags field to thumbnail representation #4660 + +Thumbnail representation might be missing tags field. + + +___ + +
+ + +
+Kitsu: Slightly less strict with instance data #4678 + +- Allow to take task name from context if asset doesn't have any. Fixes an issue with Photoshop's review instance not having `task` in data. +- Allow to match "review" against both `instance.data["family"]` and `instance.data["families"]` because some instances don't have the primary family in families, e.g. in Photoshop and TVPaint. +- Do not error on Integrate Kitsu Review whenever for whatever reason Integrate Kitsu Note did not created a comment but just log the message that it was unable to connect a review. + + +___ + +
+ + +
+Refactor _capture #4702 + +Paragraphs contain detailed information on the changes made to the product or service, providing an in-depth description of the updates and enhancements. They can be used to explain the reasoning behind the changes, or to highlight the importance of the new features. Paragraphs can often include links to further information or support documentation. + + +___ + +
+ +### **🔀 Refactored code** + + +
+Look Assigner: Move Look Assigner tool since it's Maya only #4604 + +Fix #4357: Move Look Assigner tool to maya since it's Maya only + + +___ + +
+ + +
+Maya: Remove unused functions from Extract Look #4671 + +Remove unused functions from Maya Extract Look plug-in + + +___ + +
+ + +
+Extract Review code refactor #3930 + +Trying to reduce complexity of Extract Review plug-in +- Re-use profile filtering from lib +- Remove "combination families" additional filtering which supposedly was from OP v2 +- Simplify 'formatting' for filling gaps +- Use `legacy_io.Session` over `os.environ` + + +___ + +
+ + +
+Update tests and documentation for `ColormanagedPyblishPluginMixin` #4612 + +Refactor `ExtractorColormanaged` to `ColormanagedPyblishPluginMixin` in tests and documentation. + + +___ + +
+ +### **📃 Documentation** + + +
+Docs/add architecture document #4344 + +Add `ARCHITECTURE.md` document. + +his document attemps to give a quick overview of the project to help onboarding, it's not an extensive documentation but more of a elevator pitch one-line descriptions of files/directories and what the attempt to do. + + +___ + +
+ + +
+Docs: Fix some minor grammar/typos #4680 + +Typo/grammar fixes in documentation. + + +___ + +
+ +### **Merged pull requests** + + +
+Maya: Implement image file node loader #4313 + +Implements a loader for loading texture image into a `file` node in Maya. + +Similar to Maya's hypershade creation of textures on load you have the option to choose for three modes of creating: +- Texture +- Projection +- StencilThese should match what Maya generates if you create those in Maya. +- [x] Load and manage file nodes +- [x] Apply color spaces after #4195 +- [x] Support for _either_ UDIM or image sequence - currently it seems to always load sequences as UDIM automatically. +- [ ] Add support for animation sequences of UDIM textures using the `..exr` path format? + + +___ + +
+ + +
+Maya Look Assigner: Don't rely on containers for get all assets #4600 + +This resolves #4044 by not actually relying on containers in the scene but instead just rely on finding nodes with `cbId` attributes. As such, imported nodes would also be found and a shader can be assigned (similar to when using get from selection).**Please take into consideration the potential downsides below**Potential downsides would be: +- IF an already loaded look has any dagNodes, say a 3D Projection node - then that will also show up as a loaded asset where previously nodes from loaded looks were ignored. +- If any dag nodes were created locally - they would have gotten `cbId` attributes on scene save and thus the current asset would almost always show? + + +___ + +
+ + +
+Maya: Unify menu labels for "Set Frame Range" and "Set Resolution" #4605 + +Fix #4109: Unify menu labels for "Set Frame Range" and "Set Resolution"This also tweaks it in Houdini from Reset Frame Range to Set Frame Range. + + +___ + +
+ + +
+3dsmax: make sure that startup script executes #4695 + +Fixing reliability of OpenPype startup in 3dsmax. + + +___ + +
+ + +
+Resolve missing OPENPYPE_MONGO in deadline global job preload #4484 + +In the GlobalJobPreLoad plugin, we propose to replace the SpawnProcess by a sub-process and to pass the environment variables in the parameters, since the SpawnProcess under Centos Linux does not pass the environment variables. + +In the GlobalJobPreLoad plugin, the Deadline SpawnProcess is used to start the OpenPype process. The problem is that the SpawnProcess does not pass environment variables, including OPENPYPE_MONGO, to the process when it is under Centos7 linux, and the process gets stuck. We propose to replace it by a subprocess and to pass the variable in the parameters. + + +___ + +
+ + +
+Maya: Arnold don't reset maya timeline frame range on render creation (or setting render settings) #4603 + +Fix #4429: Do not reset fps or playback timeline on applying or creating render settings + + +___ + +
+ + +
+Update artist_hosts_maya_arnold.md #4626 + +Correct Arnold docs. +___ + +
+ + +
+General: Filter available applications #4667 + +Added option to filter applications that don't have valid executable available in settings in launcher and ftrack actions. This option can be disabled in new settings category `Applications`. The filtering is by default disabled. + + +___ + +
+ + + + [Full Changelog](https://github.com/ynput/OpenPype/compare/3.15.1...3.15.2) ### **🆕 New features** diff --git a/openpype/version.py b/openpype/version.py index bc5ea7fe7c..b20b133914 100644 --- a/openpype/version.py +++ b/openpype/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- """Package declaring Pype version.""" -__version__ = "3.15.3-nightly.4" +__version__ = "3.15.3" diff --git a/pyproject.toml b/pyproject.toml index 02370a4f10..42ce5aa32c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "OpenPype" -version = "3.15.2" # OpenPype +version = "3.15.3" # OpenPype description = "Open VFX and Animation pipeline with support." authors = ["OpenPype Team "] license = "MIT License"