From bf3a13b0b99b84437a7f23eb94fdc986c855b057 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 27 May 2021 12:04:56 +0000 Subject: [PATCH 01/34] Create draft PR for #1548 From fafc840fd123475fe5e072aaaeb1bb658b804779 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 27 May 2021 14:51:53 +0200 Subject: [PATCH 02/34] use asset from context.data --- openpype/hosts/tvpaint/plugins/publish/collect_instances.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/tvpaint/plugins/publish/collect_instances.py b/openpype/hosts/tvpaint/plugins/publish/collect_instances.py index 61cf7eb780..21c0a78427 100644 --- a/openpype/hosts/tvpaint/plugins/publish/collect_instances.py +++ b/openpype/hosts/tvpaint/plugins/publish/collect_instances.py @@ -109,7 +109,7 @@ class CollectInstances(pyblish.api.ContextPlugin): return { "family": "review", - "asset": context.data["workfile_context"]["asset"], + "asset": context.data["asset"], # Dummy subset name "subset": "reviewMain" } From 801444ef9c132afb3dc08b8495731afddff0e26a Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 27 May 2021 14:54:00 +0200 Subject: [PATCH 03/34] create workfile instance by default --- .../plugins/publish/collect_instances.py | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/openpype/hosts/tvpaint/plugins/publish/collect_instances.py b/openpype/hosts/tvpaint/plugins/publish/collect_instances.py index 21c0a78427..d6714a8277 100644 --- a/openpype/hosts/tvpaint/plugins/publish/collect_instances.py +++ b/openpype/hosts/tvpaint/plugins/publish/collect_instances.py @@ -1,3 +1,4 @@ +import os import json import copy import pyblish.api @@ -230,3 +231,40 @@ class CollectInstances(pyblish.api.ContextPlugin): instance_data["layers"] = render_pass_layers return context.create_instance(**instance_data) + + def add_workfile_instance(self, context): + current_file = context.data["currentFile"] + + self.log.info( + "Workfile path used for workfile family: {}".format(current_file) + ) + + dirpath, filename = os.path.split(current_file) + basename, ext = os.path.splitext(filename) + instance = context.create_instance(name=basename) + + task_name = io.Session["AVALON_TASK"] + subset_name = "workfile" + task_name.capitalize() + + # Create Workfile instance + instance.data.update({ + "subset": subset_name, + "asset": context.data["asset"], + "label": subset_name, + "publish": True, + "family": "workfile", + "families": ["workfile"], + "frameStart": context.data["frameStart"], + "frameEnd": context.data["frameEnd"], + "handleStart": context.data["handleStart"], + "handleEnd": context.data["handleEnd"], + "representations": [{ + "name": ext.lstrip("."), + "ext": ext.lstrip("."), + "files": filename, + "stagingDir": dirpath + }] + }) + self.log.info("Collected workfile instance: {}".format( + json.dumps(instance.data, indent=4) + )) From 55cc40a3d0f5f8bedeb9f81c0329f269156271ed Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 27 May 2021 14:54:09 +0200 Subject: [PATCH 04/34] trigger add_workfile_instance on collect instances --- openpype/hosts/tvpaint/plugins/publish/collect_instances.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openpype/hosts/tvpaint/plugins/publish/collect_instances.py b/openpype/hosts/tvpaint/plugins/publish/collect_instances.py index d6714a8277..1ba9f23427 100644 --- a/openpype/hosts/tvpaint/plugins/publish/collect_instances.py +++ b/openpype/hosts/tvpaint/plugins/publish/collect_instances.py @@ -18,6 +18,8 @@ class CollectInstances(pyblish.api.ContextPlugin): json.dumps(workfile_instances, indent=4) )) + self.add_workfile_instance(context) + # Backwards compatibility for workfiles that already have review # instance in metadata. review_instance_exist = False From b629742e342341f70a78a46595da37167100461e Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 27 May 2021 14:54:25 +0200 Subject: [PATCH 05/34] added validation or workfile metadata on workfile publishing --- .../plugins/publish/validate_workfile_data.py | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 openpype/hosts/tvpaint/plugins/publish/validate_workfile_data.py diff --git a/openpype/hosts/tvpaint/plugins/publish/validate_workfile_data.py b/openpype/hosts/tvpaint/plugins/publish/validate_workfile_data.py new file mode 100644 index 0000000000..3a89557c3e --- /dev/null +++ b/openpype/hosts/tvpaint/plugins/publish/validate_workfile_data.py @@ -0,0 +1,49 @@ +import json + +import pyblish.api +from avalon.tvpaint import save_file + + +class ValidateWorkfileMetadataRepair(pyblish.api.Action): + """Store current context into workfile metadata.""" + + label = "Use current context" + icon = "wrench" + on = "failed" + + def process(self, context, plugin): + """Save current workfile which should trigger storing of metadata.""" + current_file = context.data["currentFile"] + # Save file should trigger + save_file(current_file) + + +class ValidateWorkfileMetadata(pyblish.api.ContextPlugin): + """Validate if wokrfile contain required metadata for publising.""" + + label = "Validate Workfile Metadata" + order = pyblish.api.ValidatorOrder + + families = ["workfile"] + + required_keys = {"project", "asset", "task"} + + def process(self, context): + workfile_context = context.data["workfile_context"] + if not workfile_context: + raise AssertionError( + "Current workfile is missing whole metadata about context." + ) + + missing_keys = [] + for key in self.required_keys: + value = workfile_context.get(key) + if not value: + missing_keys.append(key) + + if missing_keys: + raise AssertionError( + "Current workfile is missing metadata about {}.".format( + ", ".join(missing_keys) + ) + ) From 52b8118b7d5a4ed6575e66e12357942e1df725f7 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 27 May 2021 14:56:43 +0200 Subject: [PATCH 06/34] renamed validators filename --- ...alidate_workfile_data.py => validate_workfile_metadata.py} | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) rename openpype/hosts/tvpaint/plugins/publish/{validate_workfile_data.py => validate_workfile_metadata.py} (96%) diff --git a/openpype/hosts/tvpaint/plugins/publish/validate_workfile_data.py b/openpype/hosts/tvpaint/plugins/publish/validate_workfile_metadata.py similarity index 96% rename from openpype/hosts/tvpaint/plugins/publish/validate_workfile_data.py rename to openpype/hosts/tvpaint/plugins/publish/validate_workfile_metadata.py index 3a89557c3e..b640bc4303 100644 --- a/openpype/hosts/tvpaint/plugins/publish/validate_workfile_data.py +++ b/openpype/hosts/tvpaint/plugins/publish/validate_workfile_metadata.py @@ -1,5 +1,3 @@ -import json - import pyblish.api from avalon.tvpaint import save_file @@ -11,7 +9,7 @@ class ValidateWorkfileMetadataRepair(pyblish.api.Action): icon = "wrench" on = "failed" - def process(self, context, plugin): + def process(self, context, _plugin): """Save current workfile which should trigger storing of metadata.""" current_file = context.data["currentFile"] # Save file should trigger From 1bf4a40a881e53d37e2ba6be5d5a610934a92521 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 28 May 2021 11:00:37 +0200 Subject: [PATCH 07/34] removed frame data from workfile instance --- openpype/hosts/tvpaint/plugins/publish/collect_instances.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/openpype/hosts/tvpaint/plugins/publish/collect_instances.py b/openpype/hosts/tvpaint/plugins/publish/collect_instances.py index 1ba9f23427..36bad4f609 100644 --- a/openpype/hosts/tvpaint/plugins/publish/collect_instances.py +++ b/openpype/hosts/tvpaint/plugins/publish/collect_instances.py @@ -256,10 +256,6 @@ class CollectInstances(pyblish.api.ContextPlugin): "publish": True, "family": "workfile", "families": ["workfile"], - "frameStart": context.data["frameStart"], - "frameEnd": context.data["frameEnd"], - "handleStart": context.data["handleStart"], - "handleEnd": context.data["handleEnd"], "representations": [{ "name": ext.lstrip("."), "ext": ext.lstrip("."), From bdcb14b89db3bccdea1fc42314d504b19907a677 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 28 May 2021 12:26:43 +0200 Subject: [PATCH 08/34] fix bug in crops --- openpype/plugins/publish/extract_review.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/plugins/publish/extract_review.py b/openpype/plugins/publish/extract_review.py index 47abced457..620b1617a8 100644 --- a/openpype/plugins/publish/extract_review.py +++ b/openpype/plugins/publish/extract_review.py @@ -1686,7 +1686,7 @@ class OverscanCrop: def _convert_string_to_values(self, orig_string_value): string_value = orig_string_value.strip().lower() if not string_value: - return + return [None, None] # Replace "px" (and spaces before) with single space string_value = re.sub(r"([ ]+)?px", " ", string_value) From ad89a60c0487e33cb321260b425cd65883b55480 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 28 May 2021 12:53:49 +0200 Subject: [PATCH 09/34] a better fix of crops --- openpype/plugins/publish/extract_review.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/plugins/publish/extract_review.py b/openpype/plugins/publish/extract_review.py index 620b1617a8..769a0d3919 100644 --- a/openpype/plugins/publish/extract_review.py +++ b/openpype/plugins/publish/extract_review.py @@ -1686,7 +1686,7 @@ class OverscanCrop: def _convert_string_to_values(self, orig_string_value): string_value = orig_string_value.strip().lower() if not string_value: - return [None, None] + return [PixValueRelative(0), PixValueRelative(0)] # Replace "px" (and spaces before) with single space string_value = re.sub(r"([ ]+)?px", " ", string_value) From fc2edb7d6b47da0aac1fa2fdcc2f8454bac5edd8 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 28 May 2021 13:28:15 +0200 Subject: [PATCH 10/34] added action to plugin --- .../hosts/tvpaint/plugins/publish/validate_workfile_metadata.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openpype/hosts/tvpaint/plugins/publish/validate_workfile_metadata.py b/openpype/hosts/tvpaint/plugins/publish/validate_workfile_metadata.py index b640bc4303..757da3294a 100644 --- a/openpype/hosts/tvpaint/plugins/publish/validate_workfile_metadata.py +++ b/openpype/hosts/tvpaint/plugins/publish/validate_workfile_metadata.py @@ -24,6 +24,8 @@ class ValidateWorkfileMetadata(pyblish.api.ContextPlugin): families = ["workfile"] + actions = [ValidateWorkfileMetadataRepair] + required_keys = {"project", "asset", "task"} def process(self, context): From fc2a49e3835aabc7ea6146cc20d4d51c2f9cee37 Mon Sep 17 00:00:00 2001 From: jezscha Date: Fri, 28 May 2021 14:56:33 +0000 Subject: [PATCH 11/34] Create draft PR for #1605 From ac82a981920ee3643b4ee558422d545cc5ccbc54 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 28 May 2021 16:59:01 +0200 Subject: [PATCH 12/34] Settings: Task types enumerator entity --- openpype/settings/entities/__init__.py | 2 ++ openpype/settings/entities/enum_entity.py | 34 +++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/openpype/settings/entities/__init__.py b/openpype/settings/entities/__init__.py index 33881a6097..f64ca1e98d 100644 --- a/openpype/settings/entities/__init__.py +++ b/openpype/settings/entities/__init__.py @@ -103,6 +103,7 @@ from .enum_entity import ( EnumEntity, AppsEnumEntity, ToolsEnumEntity, + TaskTypeEnumEntity, ProvidersEnum ) @@ -154,6 +155,7 @@ __all__ = ( "EnumEntity", "AppsEnumEntity", "ToolsEnumEntity", + "TaskTypeEnumEntity", "ProvidersEnum", "ListEntity", diff --git a/openpype/settings/entities/enum_entity.py b/openpype/settings/entities/enum_entity.py index c6021b68de..ee909bc1a5 100644 --- a/openpype/settings/entities/enum_entity.py +++ b/openpype/settings/entities/enum_entity.py @@ -219,6 +219,40 @@ class ToolsEnumEntity(BaseEnumEntity): self._current_value = new_value +class TaskTypeEnumEntity(BaseEnumEntity): + schema_types = ["task-types-enum"] + + def _item_initalization(self): + self.multiselection = True + self.value_on_not_set = [] + self.enum_items = [] + self.valid_keys = set() + self.valid_value_types = (list, ) + self.placeholder = None + + def _get_enum_values(self): + from ..lib import get_default_anatomy_settings + anatomy_settings = get_default_anatomy_settings() + + valid_keys = set() + enum_items = [] + for task_type, _task_attr in anatomy_settings["tasks"].items(): + enum_items.append({task_type: task_type}) + valid_keys.add(task_type) + + return enum_items, valid_keys + + def set_override_state(self, *args, **kwargs): + super(TaskTypeEnumEntity, self).set_override_state(*args, **kwargs) + + self.enum_items, self.valid_keys = self._get_enum_values() + new_value = [] + for key in self._current_value: + if key in self.valid_keys: + new_value.append(key) + self._current_value = new_value + + class ProvidersEnum(BaseEnumEntity): schema_types = ["providers-enum"] From 65723400ddb641f31223dace702e75f1f6589d89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= <33513211+antirotor@users.noreply.github.com> Date: Fri, 28 May 2021 18:18:22 +0200 Subject: [PATCH 13/34] fix validation types --- .../hosts/maya/plugins/publish/validate_rendersettings.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/validate_rendersettings.py b/openpype/hosts/maya/plugins/publish/validate_rendersettings.py index 9aeaad7ff1..8d2c7d8f63 100644 --- a/openpype/hosts/maya/plugins/publish/validate_rendersettings.py +++ b/openpype/hosts/maya/plugins/publish/validate_rendersettings.py @@ -243,7 +243,10 @@ class ValidateRenderSettings(pyblish.api.InstancePlugin): "Cannot get value of {}.{}".format( node, attribute_name)) else: - if value != render_value: + # compare values as strings to get around various + # datatypes possible in Settings and Render + # Settings + if str(value) != str(render_value): invalid = True cls.log.error( ("Invalid value {} set on {}.{}. " From 7bb91258c442b5953b5467bafaabfc25d096d079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= <33513211+antirotor@users.noreply.github.com> Date: Fri, 28 May 2021 18:21:22 +0200 Subject: [PATCH 14/34] fix beauty detection regex --- openpype/modules/deadline/plugins/publish/submit_publish_job.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/modules/deadline/plugins/publish/submit_publish_job.py b/openpype/modules/deadline/plugins/publish/submit_publish_job.py index ea953441a2..7a4481c526 100644 --- a/openpype/modules/deadline/plugins/publish/submit_publish_job.py +++ b/openpype/modules/deadline/plugins/publish/submit_publish_job.py @@ -105,7 +105,7 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin): families = ["render.farm", "prerender.farm", "renderlayer", "imagesequence", "vrayscene"] - aov_filter = {"maya": [r".+(?:\.|_)([Bb]eauty)(?:\.|_).*"], + aov_filter = {"maya": [r".*(?:\.|_)?([Bb]eauty)(?:\.|_)?.*"], "aftereffects": [r".*"], # for everything from AE "harmony": [r".*"], # for everything from AE "celaction": [r".*"]} From 1a811f5d7b4666125c16350c58e724a8394958d5 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Fri, 28 May 2021 18:27:09 +0200 Subject: [PATCH 15/34] update avalon core head --- repos/avalon-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/avalon-core b/repos/avalon-core index cfd4191e36..0d9a228fdb 160000 --- a/repos/avalon-core +++ b/repos/avalon-core @@ -1 +1 @@ -Subproject commit cfd4191e364b47de7364096f45d9d9d9a901692a +Subproject commit 0d9a228fdb2eb08fe6caa30f25fe2a34fead1a03 From b2aab371f44e4eaa837949d0d5e29898431f78b9 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 28 May 2021 16:30:10 +0000 Subject: [PATCH 16/34] Create draft PR for #1600 From f7a61b341ac994a15e358b22ca8551ae04cd2156 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 28 May 2021 18:30:58 +0200 Subject: [PATCH 17/34] implemented function to pop metadata keys --- openpype/settings/entities/lib.py | 39 ++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/openpype/settings/entities/lib.py b/openpype/settings/entities/lib.py index ed3d7aed84..521099c6c8 100644 --- a/openpype/settings/entities/lib.py +++ b/openpype/settings/entities/lib.py @@ -17,9 +17,34 @@ WRAPPER_TYPES = ["form", "collapsible-wrap"] NOT_SET = type("NOT_SET", (), {"__bool__": lambda obj: False})() OVERRIDE_VERSION = 1 +DEFAULT_VALUES_KEY = "__default_values__" +TEMPLATE_METADATA_KEYS = ( + DEFAULT_VALUES_KEY, +) + template_key_pattern = re.compile(r"(\{.*?[^{0]*\})") +def _pop_metadata_item(template): + found_idx = None + for idx, item in enumerate(template): + if not isinstance(item, dict): + continue + + for key in TEMPLATE_METADATA_KEYS: + if key in item: + found_idx = idx + break + + if found_idx is not None: + break + + metadata_item = {} + if found_idx is not None: + metadata_item = template.pop(found_idx) + return metadata_item + + def _fill_schema_template_data( template, template_data, required_keys=None, missing_keys=None ): @@ -29,14 +54,12 @@ def _fill_schema_template_data( required_keys = set() missing_keys = set() - _template = [] - default_values = {} - for item in template: - if isinstance(item, dict) and "__default_values__" in item: - default_values = item["__default_values__"] - else: - _template.append(item) - template = _template + # Copy template data as content may change + template = copy.deepcopy(template) + + metadata_item = _pop_metadata_item(template) + + default_values = metadata_item.get(DEFAULT_VALUES_KEY) or {} for key, value in default_values.items(): if key not in template_data: From 1cdbd39be1fc775f6bb89a7ed644a01bdcd551f1 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 28 May 2021 18:31:35 +0200 Subject: [PATCH 18/34] template may be schema_template or just template --- openpype/settings/entities/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/settings/entities/lib.py b/openpype/settings/entities/lib.py index 521099c6c8..e3a9e7d702 100644 --- a/openpype/settings/entities/lib.py +++ b/openpype/settings/entities/lib.py @@ -189,7 +189,7 @@ def _fill_inner_schemas(schema_data, schema_collection, schema_templates): schema_templates ) - elif child_type == "schema_template": + elif child_type in ("template", "schema_template"): for filled_child in _fill_schema_template( child, schema_collection, schema_templates ): From 6798b05546840a1563dcb284d6824b48fe6f60d2 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 28 May 2021 18:38:40 +0200 Subject: [PATCH 19/34] load skip_paths from template definition --- openpype/settings/entities/lib.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openpype/settings/entities/lib.py b/openpype/settings/entities/lib.py index e3a9e7d702..32c1d61cb6 100644 --- a/openpype/settings/entities/lib.py +++ b/openpype/settings/entities/lib.py @@ -128,6 +128,10 @@ def _fill_schema_template(child_data, schema_collection, schema_templates): if isinstance(template_data, dict): template_data = [template_data] + skip_paths = child_data.get("skip_paths") or [] + if isinstance(skip_paths, STRING_TYPE): + skip_paths = [skip_paths] + output = [] for single_template_data in template_data: try: From 6d1bbb6a124e0fe02c0a29e88c6fff296f04070a Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 28 May 2021 18:44:40 +0200 Subject: [PATCH 20/34] care about skip paths when processing template item --- openpype/settings/entities/lib.py | 42 ++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/openpype/settings/entities/lib.py b/openpype/settings/entities/lib.py index 32c1d61cb6..94f18f4ecb 100644 --- a/openpype/settings/entities/lib.py +++ b/openpype/settings/entities/lib.py @@ -46,40 +46,70 @@ def _pop_metadata_item(template): def _fill_schema_template_data( - template, template_data, required_keys=None, missing_keys=None + template, template_data, skip_paths, required_keys=None, missing_keys=None ): first = False if required_keys is None: first = True + + # Cleanup skip paths (skip empty values) + skip_paths = [path for path in skip_paths if path] + required_keys = set() missing_keys = set() # Copy template data as content may change template = copy.deepcopy(template) + # Get metadata item from template metadata_item = _pop_metadata_item(template) + # Check for default values for template data default_values = metadata_item.get(DEFAULT_VALUES_KEY) or {} for key, value in default_values.items(): if key not in template_data: template_data[key] = value + # Store paths by first part if path + # - None value says that whole key should be skipped + skip_paths_by_first_key = {} + for path in skip_paths: + parts = path.split("/") + key = parts.pop(0) + if key not in skip_paths_by_first_key: + skip_paths_by_first_key[key] = [] + + value = "/".join(parts) + skip_paths_by_first_key[key].append(value or None) + if not template: output = template elif isinstance(template, list): output = [] for item in template: - output.append(_fill_schema_template_data( - item, template_data, required_keys, missing_keys - )) + # Get skip paths for children item + _skip_paths = [] + if skip_paths_by_first_key and isinstance(item, dict): + # Check if this item should be skipped + key = item.get("key") + if key and key in skip_paths_by_first_key: + _skip_paths = skip_paths_by_first_key[key] + # Skip whole item if None is in skip paths value + if None in _skip_paths: + continue + + output_item = _fill_schema_template_data( + item, template_data, _skip_paths, required_keys, missing_keys + ) + output.append(output_item) elif isinstance(template, dict): output = {} for key, value in template.items(): output[key] = _fill_schema_template_data( - value, template_data, required_keys, missing_keys + value, template_data, skip_paths, required_keys, missing_keys ) elif isinstance(template, STRING_TYPE): @@ -136,7 +166,7 @@ def _fill_schema_template(child_data, schema_collection, schema_templates): for single_template_data in template_data: try: filled_child = _fill_schema_template_data( - template, single_template_data + template, single_template_data, skip_paths ) except SchemaTemplateMissingKeys as exc: From 467a3969cb3cd6b1b44c52541054f7f7dff5d2dd Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 28 May 2021 18:54:18 +0200 Subject: [PATCH 21/34] added ability to pass curly brackets in templates as labels --- openpype/settings/entities/lib.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openpype/settings/entities/lib.py b/openpype/settings/entities/lib.py index 94f18f4ecb..cee2d43b66 100644 --- a/openpype/settings/entities/lib.py +++ b/openpype/settings/entities/lib.py @@ -114,6 +114,7 @@ def _fill_schema_template_data( elif isinstance(template, STRING_TYPE): # TODO find much better way how to handle filling template data + template = template.replace("{{", "__dbcb__").replace("}}", "__decb__") for replacement_string in template_key_pattern.findall(template): key = str(replacement_string[1:-1]) required_keys.add(key) @@ -129,7 +130,8 @@ def _fill_schema_template_data( else: # Only replace the key in string template = template.replace(replacement_string, value) - output = template + + output = template.replace("__dbcb__", "{").replace("__decb__", "}") else: output = template From 8ee36b11eea93e851c231561bb10e00bf736f418 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 28 May 2021 19:06:56 +0200 Subject: [PATCH 22/34] use single template_color template in maya loader to achieve same result --- .../schemas/schema_maya_load.json | 104 +++--------------- 1 file changed, 13 insertions(+), 91 deletions(-) diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json index dd9d0508b4..d335ee1511 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json @@ -17,133 +17,55 @@ { "label": "Model", "name": "model" - } - ] - }, - { - "type": "schema_template", - "name": "template_color", - "template_data": [ + }, { "label": "Rig", "name": "rig" - } - ] - }, - { - "type": "schema_template", - "name": "template_color", - "template_data": [ + }, { "label": "Pointcache", "name": "pointcache" - } - ] - }, - { - "type": "schema_template", - "name": "template_color", - "template_data": [ + }, { "label": "Animation", "name": "animation" - } - ] - }, - { - "type": "schema_template", - "name": "template_color", - "template_data": [ + }, { "label": "Arnold Standin", "name": "ass" - } - ] - }, - { - "type": "schema_template", - "name": "template_color", - "template_data": [ + }, { "label": "Camera", "name": "camera" - } - ] - }, - { - "type": "schema_template", - "name": "template_color", - "template_data": [ + }, { "label": "FBX", "name": "fbx" - } - ] - }, - { - "type": "schema_template", - "name": "template_color", - "template_data": [ + }, { "label": "Maya Scene", "name": "mayaAscii" - } - ] - }, - { - "type": "schema_template", - "name": "template_color", - "template_data": [ + }, { "label": "Set Dress", "name": "setdress" - } - ] - }, - { - "type": "schema_template", - "name": "template_color", - "template_data": [ + }, { "label": "Layout", "name": "layout" - } - ] - }, - { - "type": "schema_template", - "name": "template_color", - "template_data": [ + }, { "label": "VDB Cache", "name": "vdbcache" - } - ] - }, - { - "type": "schema_template", - "name": "template_color", - "template_data": [ + }, { "label": "Vray Proxy", "name": "vrayproxy" - } - ] - }, - { - "type": "schema_template", - "name": "template_color", - "template_data": [ + }, { "label": "Yeti Cache", "name": "yeticache" - } - ] - }, - { - "type": "schema_template", - "name": "template_color", - "template_data": [ + }, { "label": "Yeti Rig", "name": "yetiRig" From db4f5647d7baf3ace4f5c6c4eea5db44de669316 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 28 May 2021 19:07:30 +0200 Subject: [PATCH 23/34] removed double colon from template_color label --- .../schemas/schema_maya_load.json | 28 +++++++++---------- .../schemas/template_color.json | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json index d335ee1511..e14ca3413d 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json @@ -15,59 +15,59 @@ "name": "template_color", "template_data": [ { - "label": "Model", + "label": "Model:", "name": "model" }, { - "label": "Rig", + "label": "Rig:", "name": "rig" }, { - "label": "Pointcache", + "label": "Pointcache:", "name": "pointcache" }, { - "label": "Animation", + "label": "Animation:", "name": "animation" }, { - "label": "Arnold Standin", + "label": "Arnold Standin:", "name": "ass" }, { - "label": "Camera", + "label": "Camera:", "name": "camera" }, { - "label": "FBX", + "label": "FBX:", "name": "fbx" }, { - "label": "Maya Scene", + "label": "Maya Scene:", "name": "mayaAscii" }, { - "label": "Set Dress", + "label": "Set Dress:", "name": "setdress" }, { - "label": "Layout", + "label": "Layout:", "name": "layout" }, { - "label": "VDB Cache", + "label": "VDB Cache:", "name": "vdbcache" }, { - "label": "Vray Proxy", + "label": "Vray Proxy:", "name": "vrayproxy" }, { - "label": "Yeti Cache", + "label": "Yeti Cache:", "name": "yeticache" }, { - "label": "Yeti Rig", + "label": "Yeti Rig:", "name": "yetiRig" } ] diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/template_color.json b/openpype/settings/entities/schemas/projects_schema/schemas/template_color.json index 04ce055525..af8fd9dae4 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/template_color.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/template_color.json @@ -2,7 +2,7 @@ { "type": "list-strict", "key": "{name}", - "label": "{label}:", + "label": "{label}", "object_types": [ { "label": "Red", From 8fc725ff4a8d7a8760f7c524b865986c632f350b Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 28 May 2021 19:08:34 +0200 Subject: [PATCH 24/34] usa magic of templates in maya capture schema --- .../schemas/template_maya_capture.json | 84 ++----------------- 1 file changed, 9 insertions(+), 75 deletions(-) diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/template_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/template_maya_capture.json index e4e0b034dd..6f183e9960 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/template_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/template_maya_capture.json @@ -50,86 +50,20 @@ "label": "Display Options" }, { - "type": "list-strict", - "key": "background", - "label": "Background Color: ", - "object_types": [ + "type": "schema_template", + "name": "template_color", + "template_data": [ { - "label": "Red", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 + "name": "background", + "label": "Background Color: " }, { - "label": "Green", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 + "name": "backgroundBottom", + "label": "Background Bottom: " }, { - "label": "Blue", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - } - ] - }, - { - "type": "list-strict", - "key": "backgroundBottom", - "label": "Background Bottom: ", - "object_types": [ - { - "label": "Red", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - }, - { - "label": "Green", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - }, - { - "label": "Blue", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - } - ] - }, - { - "type": "list-strict", - "key": "backgroundTop", - "label": "Background Top: ", - "object_types": [ - { - "label": "Red", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - }, - { - "label": "Green", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - }, - { - "label": "Blue", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 + "name": "backgroundTop", + "label": "Background Top: " } ] }, From 73fd71b338f2368f85f2ddc6a8a1d61f8197adfc Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 28 May 2021 19:09:33 +0200 Subject: [PATCH 25/34] changed template_maya_capture to schema_maya_capture --- .../schemas/schema_maya_capture.json | 473 +++++++++++++++++ .../schemas/schema_maya_publish.json | 4 +- .../schemas/template_maya_capture.json | 475 ------------------ 3 files changed, 475 insertions(+), 477 deletions(-) create mode 100644 openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json delete mode 100644 openpype/settings/entities/schemas/projects_schema/schemas/template_maya_capture.json diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json new file mode 100644 index 0000000000..bfbfc488df --- /dev/null +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -0,0 +1,473 @@ +{ + "type": "dict", + "collapsible": true, + "key": "ExtractPlayblast", + "label": "Extract Playblast settings", + "children": [ + { + "type": "dict", + "key": "capture_preset", + "children": [ + { + "type": "dict", + "key": "Codec", + "children": [ + { + "type": "label", + "label": "Codec" + }, + { + "type": "text", + "key": "compression", + "label": "Compression type" + }, + { + "type": "text", + "key": "format", + "label": "Data format" + }, + { + "type": "number", + "key": "quality", + "label": "Quality", + "decimal": 0, + "minimum": 0, + "maximum": 100 + }, + + { + "type": "splitter" + } + ] + }, + { + "type": "dict", + "key": "Display Options", + "children": [ + { + "type": "label", + "label": "Display Options" + }, + { + "type": "schema_template", + "name": "template_color", + "template_data": [ + { + "name": "background", + "label": "Background Color: " + }, + { + "name": "backgroundBottom", + "label": "Background Bottom: " + }, + { + "name": "backgroundTop", + "label": "Background Top: " + } + ] + }, + { + "type": "boolean", + "key": "override_display", + "label": "Override display options" + } + ] + }, + { + "type": "splitter" + }, + { + "type": "dict", + "key": "Generic", + "children": [ + { + "type": "label", + "label": "Generic" + }, + { + "type": "boolean", + "key": "isolate_view", + "label": " Isolate view" + }, + { + "type": "boolean", + "key": "off_screen", + "label": " Off Screen" + } + ] + }, + + { + "type": "dict", + "key": "PanZoom", + "children": [ + { + "type": "boolean", + "key": "pan_zoom", + "label": " Pan Zoom" + } + ] + }, + { + "type": "splitter" + }, + { + "type": "dict", + "key": "Renderer", + "children": [ + { + "type": "label", + "label": "Renderer" + }, + { + "type": "enum", + "key": "rendererName", + "label": "Renderer name", + "enum_items": [ + { "vp2Renderer": "Viewport 2.0" } + ] + } + ] + }, + { + "type": "dict", + "key": "Resolution", + "children": [ + { + "type": "splitter" + }, + { + "type": "label", + "label": "Resolution" + }, + { + "type": "number", + "key": "width", + "label": " Width", + "decimal": 0, + "minimum": 0, + "maximum": 99999 + }, + { + "type": "number", + "key": "height", + "label": "Height", + "decimal": 0, + "minimum": 0, + "maximum": 99999 + }, + { + "type": "number", + "key": "percent", + "label": "percent", + "decimal": 1, + "minimum": 0, + "maximum": 200 + }, + { + "type": "text", + "key": "mode", + "label": "Mode" + } + ] + }, + { + "type": "splitter" + }, + { + "type": "dict", + "collapsible": true, + "key": "Viewport Options", + "label": "Viewport Options", + "children": [ + { + "type": "boolean", + "key": "override_viewport_options", + "label": "override_viewport_options" + }, + { + "type": "enum", + "key": "displayLights", + "label": "Display Lights", + "enum_items": [ + { "default": "Default Lighting"}, + { "all": "All Lights"}, + { "selected": "Selected Lights"}, + { "flat": "Flat Lighting"}, + { "nolights": "No Lights"} + ] + }, + { + "type": "number", + "key": "textureMaxResolution", + "label": "Texture Clamp Resolution", + "decimal": 0 + }, + { + "type": "number", + "key": "multiSample", + "label": "Anti Aliasing Samples", + "decimal": 0, + "minimum": 0, + "maximum": 32 + }, + { + "type": "boolean", + "key": "shadows", + "label": "Display Shadows" + }, + { + "type": "boolean", + "key": "textures", + "label": "Display Textures" + }, + { + "type": "boolean", + "key": "twoSidedLighting", + "label": "Two Sided Lighting" + }, + { + "type": "boolean", + "key": "ssaoEnable", + "label": "Screen Space Ambient Occlusion" + }, + { + "type": "splitter" + }, + { + "type": "boolean", + "key": "cameras", + "label": "cameras" + }, + { + "type": "boolean", + "key": "clipGhosts", + "label": "clipGhosts" + }, + { + "type": "boolean", + "key": "controlVertices", + "label": "controlVertices" + }, + { + "type": "boolean", + "key": "deformers", + "label": "deformers" + }, + { + "type": "boolean", + "key": "dimensions", + "label": "dimensions" + }, + { + "type": "boolean", + "key": "dynamicConstraints", + "label": "dynamicConstraints" + }, + { + "type": "boolean", + "key": "dynamics", + "label": "dynamics" + }, + { + "type": "boolean", + "key": "fluids", + "label": "fluids" + }, + { + "type": "boolean", + "key": "follicles", + "label": "follicles" + }, + { + "type": "boolean", + "key": "gpuCacheDisplayFilter", + "label": "gpuCacheDisplayFilter" + }, + { + "type": "boolean", + "key": "greasePencils", + "label": "greasePencils" + }, + { + "type": "boolean", + "key": "grid", + "label": "grid" + }, + { + "type": "boolean", + "key": "hairSystems", + "label": "hairSystems" + }, + { + "type": "boolean", + "key": "handles", + "label": "handles" + }, + { + "type": "boolean", + "key": "hud", + "label": "hud" + }, + { + "type": "boolean", + "key": "hulls", + "label": "hulls" + }, + { + "type": "boolean", + "key": "ikHandles", + "label": "ikHandles" + }, + { + "type": "boolean", + "key": "imagePlane", + "label": "imagePlane" + }, + { + "type": "boolean", + "key": "joints", + "label": "joints" + }, + { + "type": "boolean", + "key": "lights", + "label": "lights" + }, + { + "type": "boolean", + "key": "locators", + "label": "locators" + }, + { + "type": "boolean", + "key": "manipulators", + "label": "manipulators" + }, + { + "type": "boolean", + "key": "motionTrails", + "label": "motionTrails" + }, + { + "type": "boolean", + "key": "nCloths", + "label": "nCloths" + }, + { + "type": "boolean", + "key": "nParticles", + "label": "nParticles" + }, + { + "type": "boolean", + "key": "nRigids", + "label": "nRigids" + }, + { + "type": "boolean", + "key": "nurbsCurves", + "label": "nurbsCurves" + }, + { + "type": "boolean", + "key": "nurbsSurfaces", + "label": "nurbsSurfaces" + }, + { + "type": "boolean", + "key": "particleInstancers", + "label": "particleInstancers" + }, + { + "type": "boolean", + "key": "pivots", + "label": "pivots" + }, + { + "type": "boolean", + "key": "planes", + "label": "planes" + }, + { + "type": "boolean", + "key": "pluginShapes", + "label": "pluginShapes" + }, + { + "type": "boolean", + "key": "polymeshes", + "label": "polymeshes" + }, + { + "type": "boolean", + "key": "strokes", + "label": "strokes" + }, + { + "type": "boolean", + "key": "subdivSurfaces", + "label": "subdivSurfaces" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "key": "Camera Options", + "label": "Camera Options", + "children": [ + { + "type": "boolean", + "key": "displayGateMask", + "label": "displayGateMask" + }, + { + "type": "boolean", + "key": "displayResolution", + "label": "displayResolution" + }, + { + "type": "boolean", + "key": "displayFilmGate", + "label": "displayFilmGate" + }, + { + "type": "boolean", + "key": "displayFieldChart", + "label": "displayFieldChart" + }, + { + "type": "boolean", + "key": "displaySafeAction", + "label": "displaySafeAction" + }, + { + "type": "boolean", + "key": "displaySafeTitle", + "label": "displaySafeTitle" + }, + { + "type": "boolean", + "key": "displayFilmPivot", + "label": "displayFilmPivot" + }, + { + "type": "boolean", + "key": "displayFilmOrigin", + "label": "displayFilmOrigin" + }, + { + "type": "number", + "key": "overscan", + "label": "overscan", + "decimal": 1, + "minimum": 0, + "maximum": 10 + } + ] + } + ] + } + ] +} diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json index 4cabf5bb74..0abcdd2965 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json @@ -297,8 +297,8 @@ "label": "Extractors" }, { - "type": "schema_template", - "name": "template_maya_capture" + "type": "schema", + "name": "schema_maya_capture" }, { "type": "dict", diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/template_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/template_maya_capture.json deleted file mode 100644 index 6f183e9960..0000000000 --- a/openpype/settings/entities/schemas/projects_schema/schemas/template_maya_capture.json +++ /dev/null @@ -1,475 +0,0 @@ -[ - { - "type": "dict", - "collapsible": true, - "key": "ExtractPlayblast", - "label": "Extract Playblast settings", - "children": [ - { - "type": "dict", - "key": "capture_preset", - "children": [ - { - "type": "dict", - "key": "Codec", - "children": [ - { - "type": "label", - "label": "Codec" - }, - { - "type": "text", - "key": "compression", - "label": "Compression type" - }, - { - "type": "text", - "key": "format", - "label": "Data format" - }, - { - "type": "number", - "key": "quality", - "label": "Quality", - "decimal": 0, - "minimum": 0, - "maximum": 100 - }, - - { - "type": "splitter" - } - ] - }, - { - "type": "dict", - "key": "Display Options", - "children": [ - { - "type": "label", - "label": "Display Options" - }, - { - "type": "schema_template", - "name": "template_color", - "template_data": [ - { - "name": "background", - "label": "Background Color: " - }, - { - "name": "backgroundBottom", - "label": "Background Bottom: " - }, - { - "name": "backgroundTop", - "label": "Background Top: " - } - ] - }, - { - "type": "boolean", - "key": "override_display", - "label": "Override display options" - } - ] - }, - { - "type": "splitter" - }, - { - "type": "dict", - "key": "Generic", - "children": [ - { - "type": "label", - "label": "Generic" - }, - { - "type": "boolean", - "key": "isolate_view", - "label": " Isolate view" - }, - { - "type": "boolean", - "key": "off_screen", - "label": " Off Screen" - } - ] - }, - - { - "type": "dict", - "key": "PanZoom", - "children": [ - { - "type": "boolean", - "key": "pan_zoom", - "label": " Pan Zoom" - } - ] - }, - { - "type": "splitter" - }, - { - "type": "dict", - "key": "Renderer", - "children": [ - { - "type": "label", - "label": "Renderer" - }, - { - "type": "enum", - "key": "rendererName", - "label": "Renderer name", - "enum_items": [ - { "vp2Renderer": "Viewport 2.0" } - ] - } - ] - }, - { - "type": "dict", - "key": "Resolution", - "children": [ - { - "type": "splitter" - }, - { - "type": "label", - "label": "Resolution" - }, - { - "type": "number", - "key": "width", - "label": " Width", - "decimal": 0, - "minimum": 0, - "maximum": 99999 - }, - { - "type": "number", - "key": "height", - "label": "Height", - "decimal": 0, - "minimum": 0, - "maximum": 99999 - }, - { - "type": "number", - "key": "percent", - "label": "percent", - "decimal": 1, - "minimum": 0, - "maximum": 200 - }, - { - "type": "text", - "key": "mode", - "label": "Mode" - } - ] - }, - { - "type": "splitter" - }, - { - "type": "dict", - "collapsible": true, - "key": "Viewport Options", - "label": "Viewport Options", - "children": [ - { - "type": "boolean", - "key": "override_viewport_options", - "label": "override_viewport_options" - }, - { - "type": "enum", - "key": "displayLights", - "label": "Display Lights", - "enum_items": [ - { "default": "Default Lighting"}, - { "all": "All Lights"}, - { "selected": "Selected Lights"}, - { "flat": "Flat Lighting"}, - { "nolights": "No Lights"} - ] - }, - { - "type": "number", - "key": "textureMaxResolution", - "label": "Texture Clamp Resolution", - "decimal": 0 - }, - { - "type": "number", - "key": "multiSample", - "label": "Anti Aliasing Samples", - "decimal": 0, - "minimum": 0, - "maximum": 32 - }, - { - "type": "boolean", - "key": "shadows", - "label": "Display Shadows" - }, - { - "type": "boolean", - "key": "textures", - "label": "Display Textures" - }, - { - "type": "boolean", - "key": "twoSidedLighting", - "label": "Two Sided Lighting" - }, - { - "type": "boolean", - "key": "ssaoEnable", - "label": "Screen Space Ambient Occlusion" - }, - { - "type": "splitter" - }, - { - "type": "boolean", - "key": "cameras", - "label": "cameras" - }, - { - "type": "boolean", - "key": "clipGhosts", - "label": "clipGhosts" - }, - { - "type": "boolean", - "key": "controlVertices", - "label": "controlVertices" - }, - { - "type": "boolean", - "key": "deformers", - "label": "deformers" - }, - { - "type": "boolean", - "key": "dimensions", - "label": "dimensions" - }, - { - "type": "boolean", - "key": "dynamicConstraints", - "label": "dynamicConstraints" - }, - { - "type": "boolean", - "key": "dynamics", - "label": "dynamics" - }, - { - "type": "boolean", - "key": "fluids", - "label": "fluids" - }, - { - "type": "boolean", - "key": "follicles", - "label": "follicles" - }, - { - "type": "boolean", - "key": "gpuCacheDisplayFilter", - "label": "gpuCacheDisplayFilter" - }, - { - "type": "boolean", - "key": "greasePencils", - "label": "greasePencils" - }, - { - "type": "boolean", - "key": "grid", - "label": "grid" - }, - { - "type": "boolean", - "key": "hairSystems", - "label": "hairSystems" - }, - { - "type": "boolean", - "key": "handles", - "label": "handles" - }, - { - "type": "boolean", - "key": "hud", - "label": "hud" - }, - { - "type": "boolean", - "key": "hulls", - "label": "hulls" - }, - { - "type": "boolean", - "key": "ikHandles", - "label": "ikHandles" - }, - { - "type": "boolean", - "key": "imagePlane", - "label": "imagePlane" - }, - { - "type": "boolean", - "key": "joints", - "label": "joints" - }, - { - "type": "boolean", - "key": "lights", - "label": "lights" - }, - { - "type": "boolean", - "key": "locators", - "label": "locators" - }, - { - "type": "boolean", - "key": "manipulators", - "label": "manipulators" - }, - { - "type": "boolean", - "key": "motionTrails", - "label": "motionTrails" - }, - { - "type": "boolean", - "key": "nCloths", - "label": "nCloths" - }, - { - "type": "boolean", - "key": "nParticles", - "label": "nParticles" - }, - { - "type": "boolean", - "key": "nRigids", - "label": "nRigids" - }, - { - "type": "boolean", - "key": "nurbsCurves", - "label": "nurbsCurves" - }, - { - "type": "boolean", - "key": "nurbsSurfaces", - "label": "nurbsSurfaces" - }, - { - "type": "boolean", - "key": "particleInstancers", - "label": "particleInstancers" - }, - { - "type": "boolean", - "key": "pivots", - "label": "pivots" - }, - { - "type": "boolean", - "key": "planes", - "label": "planes" - }, - { - "type": "boolean", - "key": "pluginShapes", - "label": "pluginShapes" - }, - { - "type": "boolean", - "key": "polymeshes", - "label": "polymeshes" - }, - { - "type": "boolean", - "key": "strokes", - "label": "strokes" - }, - { - "type": "boolean", - "key": "subdivSurfaces", - "label": "subdivSurfaces" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "key": "Camera Options", - "label": "Camera Options", - "children": [ - { - "type": "boolean", - "key": "displayGateMask", - "label": "displayGateMask" - }, - { - "type": "boolean", - "key": "displayResolution", - "label": "displayResolution" - }, - { - "type": "boolean", - "key": "displayFilmGate", - "label": "displayFilmGate" - }, - { - "type": "boolean", - "key": "displayFieldChart", - "label": "displayFieldChart" - }, - { - "type": "boolean", - "key": "displaySafeAction", - "label": "displaySafeAction" - }, - { - "type": "boolean", - "key": "displaySafeTitle", - "label": "displaySafeTitle" - }, - { - "type": "boolean", - "key": "displayFilmPivot", - "label": "displayFilmPivot" - }, - { - "type": "boolean", - "key": "displayFilmOrigin", - "label": "displayFilmOrigin" - }, - { - "type": "number", - "key": "overscan", - "label": "overscan", - "decimal": 1, - "minimum": 0, - "maximum": 10 - } - ] - } - ] - } - ] - } -] From ca169ee5e2ffd89cd6a88cb2742ad07c008246e6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 29 May 2021 06:01:23 +0000 Subject: [PATCH 26/34] Bump dns-packet from 1.3.1 to 1.3.4 in /website Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4. - [Release notes](https://github.com/mafintosh/dns-packet/releases) - [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md) - [Commits](https://github.com/mafintosh/dns-packet/compare/v1.3.1...v1.3.4) Signed-off-by: dependabot[bot] --- website/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/yarn.lock b/website/yarn.lock index e5dadd4e80..e23e29c0e5 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -3366,9 +3366,9 @@ dns-equal@^1.0.0: integrity sha1-s55/HabrCnW6nBcySzR1PEfgZU0= dns-packet@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.1.tgz#12aa426981075be500b910eedcd0b47dd7deda5a" - integrity sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg== + version "1.3.4" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.4.tgz#e3455065824a2507ba886c55a89963bb107dec6f" + integrity sha512-BQ6F4vycLXBvdrJZ6S3gZewt6rcrks9KBgM9vrhW+knGRqc8uEdT7fuCwloc7nny5xNoMJ17HGH0R/6fpo8ECA== dependencies: ip "^1.1.0" safe-buffer "^5.0.1" From 4e5375309d651a691101f78c0200b7e5d666e6e6 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Mon, 31 May 2021 11:23:50 +0200 Subject: [PATCH 27/34] Settings: task keys enumerator generated from project related settings --- openpype/settings/entities/enum_entity.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openpype/settings/entities/enum_entity.py b/openpype/settings/entities/enum_entity.py index ee909bc1a5..5df365508c 100644 --- a/openpype/settings/entities/enum_entity.py +++ b/openpype/settings/entities/enum_entity.py @@ -231,12 +231,13 @@ class TaskTypeEnumEntity(BaseEnumEntity): self.placeholder = None def _get_enum_values(self): - from ..lib import get_default_anatomy_settings - anatomy_settings = get_default_anatomy_settings() + anatomy_entity = self.get_entity_from_path( + "project_settings/project_anatomy" + ) valid_keys = set() enum_items = [] - for task_type, _task_attr in anatomy_settings["tasks"].items(): + for task_type in anatomy_entity["tasks"].keys(): enum_items.append({task_type: task_type}) valid_keys.add(task_type) From acd9fe861a30d51d6bb8d203a914d2a969dca846 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 31 May 2021 20:04:02 +0200 Subject: [PATCH 28/34] moved workfile instance collecting to separated collector --- .../plugins/publish/collect_instances.py | 35 --------------- .../plugins/publish/collect_workfile.py | 43 +++++++++++++++++++ 2 files changed, 43 insertions(+), 35 deletions(-) create mode 100644 openpype/hosts/tvpaint/plugins/publish/collect_workfile.py diff --git a/openpype/hosts/tvpaint/plugins/publish/collect_instances.py b/openpype/hosts/tvpaint/plugins/publish/collect_instances.py index 36bad4f609..9b11f9fe80 100644 --- a/openpype/hosts/tvpaint/plugins/publish/collect_instances.py +++ b/openpype/hosts/tvpaint/plugins/publish/collect_instances.py @@ -18,8 +18,6 @@ class CollectInstances(pyblish.api.ContextPlugin): json.dumps(workfile_instances, indent=4) )) - self.add_workfile_instance(context) - # Backwards compatibility for workfiles that already have review # instance in metadata. review_instance_exist = False @@ -233,36 +231,3 @@ class CollectInstances(pyblish.api.ContextPlugin): instance_data["layers"] = render_pass_layers return context.create_instance(**instance_data) - - def add_workfile_instance(self, context): - current_file = context.data["currentFile"] - - self.log.info( - "Workfile path used for workfile family: {}".format(current_file) - ) - - dirpath, filename = os.path.split(current_file) - basename, ext = os.path.splitext(filename) - instance = context.create_instance(name=basename) - - task_name = io.Session["AVALON_TASK"] - subset_name = "workfile" + task_name.capitalize() - - # Create Workfile instance - instance.data.update({ - "subset": subset_name, - "asset": context.data["asset"], - "label": subset_name, - "publish": True, - "family": "workfile", - "families": ["workfile"], - "representations": [{ - "name": ext.lstrip("."), - "ext": ext.lstrip("."), - "files": filename, - "stagingDir": dirpath - }] - }) - self.log.info("Collected workfile instance: {}".format( - json.dumps(instance.data, indent=4) - )) diff --git a/openpype/hosts/tvpaint/plugins/publish/collect_workfile.py b/openpype/hosts/tvpaint/plugins/publish/collect_workfile.py new file mode 100644 index 0000000000..d75ba617ca --- /dev/null +++ b/openpype/hosts/tvpaint/plugins/publish/collect_workfile.py @@ -0,0 +1,43 @@ +import os +import json +import pyblish.api +from avalon import io + + +class CollectInstances(pyblish.api.ContextPlugin): + label = "Collect Workfile instance" + order = pyblish.api.CollectorOrder - 1 + hosts = ["tvpaint"] + + def process(self, context): + current_file = context.data["currentFile"] + + self.log.info( + "Workfile path used for workfile family: {}".format(current_file) + ) + + dirpath, filename = os.path.split(current_file) + basename, ext = os.path.splitext(filename) + instance = context.create_instance(name=basename) + + task_name = io.Session["AVALON_TASK"] + subset_name = "workfile" + task_name.capitalize() + + # Create Workfile instance + instance.data.update({ + "subset": subset_name, + "asset": context.data["asset"], + "label": subset_name, + "publish": True, + "family": "workfile", + "families": ["workfile"], + "representations": [{ + "name": ext.lstrip("."), + "ext": ext.lstrip("."), + "files": filename, + "stagingDir": dirpath + }] + }) + self.log.info("Collected workfile instance: {}".format( + json.dumps(instance.data, indent=4) + )) From 3585390e096a1761343a76e6ccaf54ab97c176ed Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Mon, 31 May 2021 23:34:22 +0200 Subject: [PATCH 29/34] convert maya color to new color widget --- openpype/hosts/maya/plugins/load/load_ass.py | 5 +- .../hosts/maya/plugins/load/load_gpucache.py | 5 +- .../hosts/maya/plugins/load/load_reference.py | 6 +- .../maya/plugins/load/load_vdb_to_redshift.py | 5 +- .../maya/plugins/load/load_vdb_to_vray.py | 5 +- .../hosts/maya/plugins/load/load_vrayproxy.py | 5 +- .../hosts/maya/plugins/load/load_vrayscene.py | 5 +- .../maya/plugins/load/load_yeti_cache.py | 5 +- .../hosts/maya/plugins/load/load_yeti_rig.py | 5 +- .../project_settings/aftereffects.json | 8 +- .../defaults/project_settings/global.json | 3 +- .../defaults/project_settings/maya.json | 98 ++++++++------ .../schemas/schema_maya_load.json | 128 ++++++++++-------- 13 files changed, 168 insertions(+), 115 deletions(-) diff --git a/openpype/hosts/maya/plugins/load/load_ass.py b/openpype/hosts/maya/plugins/load/load_ass.py index b4bbd93f99..dcd5644699 100644 --- a/openpype/hosts/maya/plugins/load/load_ass.py +++ b/openpype/hosts/maya/plugins/load/load_ass.py @@ -81,7 +81,10 @@ class AssProxyLoader(openpype.hosts.maya.api.plugin.ReferenceLoader): if c is not None: cmds.setAttr(groupName + ".useOutlinerColor", 1) cmds.setAttr(groupName + ".outlinerColor", - c[0], c[1], c[2]) + (float(c[0])/256), + (float(c[1])/256), + (float(c[2])/256) + ) self[:] = nodes diff --git a/openpype/hosts/maya/plugins/load/load_gpucache.py b/openpype/hosts/maya/plugins/load/load_gpucache.py index 5b1b29e184..7c06bba002 100644 --- a/openpype/hosts/maya/plugins/load/load_gpucache.py +++ b/openpype/hosts/maya/plugins/load/load_gpucache.py @@ -38,7 +38,10 @@ class GpuCacheLoader(api.Loader): if c is not None: cmds.setAttr(root + ".useOutlinerColor", 1) cmds.setAttr(root + ".outlinerColor", - c[0], c[1], c[2]) + (float(c[0])/256), + (float(c[1])/256), + (float(c[2])/256) + ) # Create transform with shape transform_name = label + "_GPU" diff --git a/openpype/hosts/maya/plugins/load/load_reference.py b/openpype/hosts/maya/plugins/load/load_reference.py index 37a2b145d4..6a017ec393 100644 --- a/openpype/hosts/maya/plugins/load/load_reference.py +++ b/openpype/hosts/maya/plugins/load/load_reference.py @@ -85,7 +85,11 @@ class ReferenceLoader(openpype.hosts.maya.api.plugin.ReferenceLoader): c = colors.get(family) if c is not None: groupNode.useOutlinerColor.set(1) - groupNode.outlinerColor.set(c[0], c[1], c[2]) + groupNode.outlinerColor.set( + (float(c[0])/256), + (float(c[1])/256), + (float(c[2])/256) + ) self[:] = newNodes diff --git a/openpype/hosts/maya/plugins/load/load_vdb_to_redshift.py b/openpype/hosts/maya/plugins/load/load_vdb_to_redshift.py index b705b55f4d..8f5f4a433c 100644 --- a/openpype/hosts/maya/plugins/load/load_vdb_to_redshift.py +++ b/openpype/hosts/maya/plugins/load/load_vdb_to_redshift.py @@ -62,7 +62,10 @@ class LoadVDBtoRedShift(api.Loader): if c is not None: cmds.setAttr(root + ".useOutlinerColor", 1) cmds.setAttr(root + ".outlinerColor", - c[0], c[1], c[2]) + (float(c[0])/256), + (float(c[1])/256), + (float(c[2])/256) + ) # Create VR volume_node = cmds.createNode("RedshiftVolumeShape", diff --git a/openpype/hosts/maya/plugins/load/load_vdb_to_vray.py b/openpype/hosts/maya/plugins/load/load_vdb_to_vray.py index 82ccdb481b..c170ca906c 100644 --- a/openpype/hosts/maya/plugins/load/load_vdb_to_vray.py +++ b/openpype/hosts/maya/plugins/load/load_vdb_to_vray.py @@ -55,7 +55,10 @@ class LoadVDBtoVRay(api.Loader): if c is not None: cmds.setAttr(root + ".useOutlinerColor", 1) cmds.setAttr(root + ".outlinerColor", - c[0], c[1], c[2]) + (float(c[0])/256), + (float(c[1])/256), + (float(c[2])/256) + ) # Create VR grid_node = cmds.createNode("VRayVolumeGrid", diff --git a/openpype/hosts/maya/plugins/load/load_vrayproxy.py b/openpype/hosts/maya/plugins/load/load_vrayproxy.py index d5d4a941e3..d214d6136d 100644 --- a/openpype/hosts/maya/plugins/load/load_vrayproxy.py +++ b/openpype/hosts/maya/plugins/load/load_vrayproxy.py @@ -74,7 +74,10 @@ class VRayProxyLoader(api.Loader): if c is not None: cmds.setAttr("{0}.useOutlinerColor".format(group_node), 1) cmds.setAttr("{0}.outlinerColor".format(group_node), - c[0], c[1], c[2]) + (float(c[0])/256), + (float(c[1])/256), + (float(c[2])/256) + ) return containerise( name=name, diff --git a/openpype/hosts/maya/plugins/load/load_vrayscene.py b/openpype/hosts/maya/plugins/load/load_vrayscene.py index b0f0c2a54b..a668a7c63a 100644 --- a/openpype/hosts/maya/plugins/load/load_vrayscene.py +++ b/openpype/hosts/maya/plugins/load/load_vrayscene.py @@ -53,7 +53,10 @@ class VRaySceneLoader(api.Loader): if c is not None: cmds.setAttr("{0}.useOutlinerColor".format(group_node), 1) cmds.setAttr("{0}.outlinerColor".format(group_node), - c[0], c[1], c[2]) + (float(c[0])/256), + (float(c[1])/256), + (float(c[2])/256) + ) return containerise( name=name, diff --git a/openpype/hosts/maya/plugins/load/load_yeti_cache.py b/openpype/hosts/maya/plugins/load/load_yeti_cache.py index 43c8aa16a0..881344cc66 100644 --- a/openpype/hosts/maya/plugins/load/load_yeti_cache.py +++ b/openpype/hosts/maya/plugins/load/load_yeti_cache.py @@ -66,7 +66,10 @@ class YetiCacheLoader(api.Loader): if c is not None: cmds.setAttr(group_name + ".useOutlinerColor", 1) cmds.setAttr(group_name + ".outlinerColor", - c[0], c[1], c[2]) + (float(c[0])/256), + (float(c[1])/256), + (float(c[2])/256) + ) nodes.append(group_node) diff --git a/openpype/hosts/maya/plugins/load/load_yeti_rig.py b/openpype/hosts/maya/plugins/load/load_yeti_rig.py index a329be4cf5..8234ace711 100644 --- a/openpype/hosts/maya/plugins/load/load_yeti_rig.py +++ b/openpype/hosts/maya/plugins/load/load_yeti_rig.py @@ -84,7 +84,10 @@ class YetiRigLoader(openpype.hosts.maya.api.plugin.ReferenceLoader): if c is not None: cmds.setAttr(groupName + ".useOutlinerColor", 1) cmds.setAttr(groupName + ".outlinerColor", - c[0], c[1], c[2]) + (float(c[0])/256), + (float(c[1])/256), + (float(c[2])/256) + ) self[:] = nodes return nodes diff --git a/openpype/settings/defaults/project_settings/aftereffects.json b/openpype/settings/defaults/project_settings/aftereffects.json index f54dbb9612..b272c60d98 100644 --- a/openpype/settings/defaults/project_settings/aftereffects.json +++ b/openpype/settings/defaults/project_settings/aftereffects.json @@ -4,8 +4,12 @@ "enabled": true, "optional": true, "active": true, - "skip_resolution_check": [".*"], - "skip_timelines_check": [".*"] + "skip_resolution_check": [ + ".*" + ], + "skip_timelines_check": [ + ".*" + ] }, "AfterEffectsSubmitDeadline": { "use_published": true, diff --git a/openpype/settings/defaults/project_settings/global.json b/openpype/settings/defaults/project_settings/global.json index b7498209ca..5f779fccfa 100644 --- a/openpype/settings/defaults/project_settings/global.json +++ b/openpype/settings/defaults/project_settings/global.json @@ -273,8 +273,7 @@ "active_site": "studio", "remote_site": "studio" }, - "sites": { - } + "sites": {} }, "project_plugins": { "windows": [], diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 779b8bb3f3..a665c8a13f 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -393,74 +393,88 @@ "load": { "colors": { "model": [ - 0.821, - 0.518, - 0.117 + 209, + 132, + 30, + 255 ], "rig": [ - 0.144, - 0.443, - 0.463 + 59, + 226, + 235, + 255 ], "pointcache": [ - 0.368, - 0.821, - 0.117 + 94, + 209, + 30, + 255 ], "animation": [ - 0.368, - 0.821, - 0.117 + 94, + 209, + 30, + 255 ], "ass": [ - 1.0, - 0.332, - 0.312 + 249, + 135, + 53, + 255 ], "camera": [ - 0.447, - 0.312, - 1.0 + 136, + 114, + 244, + 255 ], "fbx": [ - 1.0, - 0.931, - 0.312 + 215, + 166, + 255, + 255 ], "mayaAscii": [ - 0.312, - 1.0, - 0.747 + 67, + 174, + 255, + 255 ], "setdress": [ - 0.312, - 1.0, - 0.747 + 255, + 250, + 90, + 255 ], "layout": [ - 0.312, - 1.0, - 0.747 + 255, + 250, + 90, + 255 ], "vdbcache": [ - 0.312, - 1.0, - 0.428 + 249, + 54, + 0, + 255 ], "vrayproxy": [ - 0.258, - 0.95, - 0.541 + 255, + 150, + 12, + 255 ], "yeticache": [ - 0.2, - 0.8, - 0.3 + 99, + 206, + 220, + 255 ], "yetiRig": [ - 0.0, - 0.8, - 0.5 + 0, + 205, + 125, + 255 ] } }, diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json index e14ca3413d..0b09d08700 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json @@ -11,66 +11,74 @@ "label": "Loaded Subsets Outliner Colors", "children": [ { - "type": "schema_template", - "name": "template_color", - "template_data": [ - { - "label": "Model:", - "name": "model" - }, - { - "label": "Rig:", - "name": "rig" - }, - { - "label": "Pointcache:", - "name": "pointcache" - }, - { - "label": "Animation:", - "name": "animation" - }, - { - "label": "Arnold Standin:", - "name": "ass" - }, - { - "label": "Camera:", - "name": "camera" - }, - { - "label": "FBX:", - "name": "fbx" - }, - { - "label": "Maya Scene:", - "name": "mayaAscii" - }, - { - "label": "Set Dress:", - "name": "setdress" - }, - { - "label": "Layout:", - "name": "layout" - }, - { - "label": "VDB Cache:", - "name": "vdbcache" - }, - { - "label": "Vray Proxy:", - "name": "vrayproxy" - }, - { - "label": "Yeti Cache:", - "name": "yeticache" - }, - { - "label": "Yeti Rig:", - "name": "yetiRig" - } - ] + "type": "color", + "label": "Model:", + "key": "model" + }, + { + "type": "color", + "label": "Rig:", + "key": "rig" + }, + { + "type": "color", + "label": "Pointcache:", + "key": "pointcache" + }, + { + "type": "color", + "label": "Animation:", + "key": "animation" + }, + { + "type": "color", + "label": "Arnold Standin:", + "key": "ass" + }, + { + "type": "color", + "label": "Camera:", + "key": "camera" + }, + { + "type": "color", + "label": "FBX:", + "key": "fbx" + }, + { + "type": "color", + "label": "Maya Scene:", + "key": "mayaAscii" + }, + { + "type": "color", + "label": "Set Dress:", + "key": "setdress" + }, + { + "type": "color", + "label": "Layout:", + "key": "layout" + }, + { + "type": "color", + "label": "VDB Cache:", + "key": "vdbcache" + }, + { + "type": "color", + "label": "Vray Proxy:", + "key": "vrayproxy" + }, + { + "type": "color", + "label": "Yeti Cache:", + "key": "yeticache" + }, + { + "type": "color", + "label": "Yeti Rig:", + "key": "yetiRig" } ] } From ceb0d8b099936e8583e4a8431a425d85c93581d2 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Tue, 1 Jun 2021 00:20:35 +0200 Subject: [PATCH 30/34] use color widget in maya playblast --- openpype/hosts/maya/api/lib.py | 4 +++ .../maya/plugins/publish/extract_playblast.py | 3 -- .../maya/plugins/publish/extract_thumbnail.py | 4 --- .../defaults/project_settings/maya.json | 21 +++++++------ .../schemas/schema_maya_capture.json | 30 +++++++++---------- 5 files changed, 30 insertions(+), 32 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 909993a173..edf68ad6fc 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -2156,6 +2156,10 @@ def load_capture_preset(path=None, data=None): for key in preset['Display Options']: if key.startswith('background'): disp_options[key] = preset['Display Options'][key] + disp_options[key][0] = (float(disp_options[key][0])/255) + disp_options[key][1] = (float(disp_options[key][1])/255) + disp_options[key][2] = (float(disp_options[key][2])/255) + disp_options[key].pop() else: disp_options['displayGradient'] = True diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index 0dc91d67a9..4b777cdfe2 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -49,9 +49,6 @@ class ExtractPlayblast(openpype.api.Extractor): preset['camera'] = camera - preset['format'] = "image" - preset['quality'] = 95 - preset['compression'] = "png" preset['start_frame'] = start preset['end_frame'] = end camera_option = preset.get("camera_option", {}) diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 016efa6499..c888f03518 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -42,10 +42,6 @@ class ExtractThumbnail(openpype.api.Extractor): # preset["off_screen"] = False preset['camera'] = camera - preset['format'] = "image" - # preset['compression'] = "qt" - preset['quality'] = 50 - preset['compression'] = "jpg" preset['start_frame'] = instance.data["frameStart"] preset['end_frame'] = instance.data["frameStart"] preset['camera_options'] = { diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index a665c8a13f..ba685ae502 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -293,19 +293,22 @@ }, "Display Options": { "background": [ - 0.7, - 0.7, - 0.7 + 125, + 125, + 125, + 255 ], "backgroundBottom": [ - 0.7, - 0.7, - 0.7 + 125, + 125, + 125, + 255 ], "backgroundTop": [ - 0.7, - 0.7, - 0.7 + 125, + 125, + 125, + 255 ], "override_display": true }, diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index bfbfc488df..d6b81c8687 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -48,23 +48,21 @@ "type": "label", "label": "Display Options" }, + { - "type": "schema_template", - "name": "template_color", - "template_data": [ - { - "name": "background", - "label": "Background Color: " - }, - { - "name": "backgroundBottom", - "label": "Background Bottom: " - }, - { - "name": "backgroundTop", - "label": "Background Top: " - } - ] + "type": "color", + "key": "background", + "label": "Background Color: " + }, + { + "type": "color", + "key": "backgroundBottom", + "label": "Background Bottom: " + }, + { + "type": "color", + "key": "backgroundTop", + "label": "Background Top: " }, { "type": "boolean", From f1684951add22720faa3bdc08f6dc73ce50d42ee Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Tue, 1 Jun 2021 00:25:15 +0200 Subject: [PATCH 31/34] rename tvpaint workfile collector --- openpype/hosts/tvpaint/plugins/publish/collect_workfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/tvpaint/plugins/publish/collect_workfile.py b/openpype/hosts/tvpaint/plugins/publish/collect_workfile.py index d75ba617ca..b059be90bf 100644 --- a/openpype/hosts/tvpaint/plugins/publish/collect_workfile.py +++ b/openpype/hosts/tvpaint/plugins/publish/collect_workfile.py @@ -4,8 +4,8 @@ import pyblish.api from avalon import io -class CollectInstances(pyblish.api.ContextPlugin): - label = "Collect Workfile instance" +class CollectWorkfile(pyblish.api.ContextPlugin): + label = "Collect Workfile" order = pyblish.api.CollectorOrder - 1 hosts = ["tvpaint"] From c6960036ceebd4b295d344289208479a85197c26 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Tue, 1 Jun 2021 00:30:08 +0200 Subject: [PATCH 32/34] wrong divider on colour settings --- openpype/hosts/maya/plugins/load/load_ass.py | 6 +++--- openpype/hosts/maya/plugins/load/load_gpucache.py | 6 +++--- openpype/hosts/maya/plugins/load/load_reference.py | 6 +++--- openpype/hosts/maya/plugins/load/load_vdb_to_redshift.py | 6 +++--- openpype/hosts/maya/plugins/load/load_vdb_to_vray.py | 6 +++--- openpype/hosts/maya/plugins/load/load_vrayproxy.py | 6 +++--- openpype/hosts/maya/plugins/load/load_vrayscene.py | 6 +++--- openpype/hosts/maya/plugins/load/load_yeti_cache.py | 6 +++--- openpype/hosts/maya/plugins/load/load_yeti_rig.py | 6 +++--- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/openpype/hosts/maya/plugins/load/load_ass.py b/openpype/hosts/maya/plugins/load/load_ass.py index dcd5644699..b7d44dd431 100644 --- a/openpype/hosts/maya/plugins/load/load_ass.py +++ b/openpype/hosts/maya/plugins/load/load_ass.py @@ -81,9 +81,9 @@ class AssProxyLoader(openpype.hosts.maya.api.plugin.ReferenceLoader): if c is not None: cmds.setAttr(groupName + ".useOutlinerColor", 1) cmds.setAttr(groupName + ".outlinerColor", - (float(c[0])/256), - (float(c[1])/256), - (float(c[2])/256) + (float(c[0])/255), + (float(c[1])/255), + (float(c[2])/255) ) self[:] = nodes diff --git a/openpype/hosts/maya/plugins/load/load_gpucache.py b/openpype/hosts/maya/plugins/load/load_gpucache.py index 7c06bba002..d0a83b8177 100644 --- a/openpype/hosts/maya/plugins/load/load_gpucache.py +++ b/openpype/hosts/maya/plugins/load/load_gpucache.py @@ -38,9 +38,9 @@ class GpuCacheLoader(api.Loader): if c is not None: cmds.setAttr(root + ".useOutlinerColor", 1) cmds.setAttr(root + ".outlinerColor", - (float(c[0])/256), - (float(c[1])/256), - (float(c[2])/256) + (float(c[0])/255), + (float(c[1])/255), + (float(c[2])/255) ) # Create transform with shape diff --git a/openpype/hosts/maya/plugins/load/load_reference.py b/openpype/hosts/maya/plugins/load/load_reference.py index 6a017ec393..96269f2771 100644 --- a/openpype/hosts/maya/plugins/load/load_reference.py +++ b/openpype/hosts/maya/plugins/load/load_reference.py @@ -86,9 +86,9 @@ class ReferenceLoader(openpype.hosts.maya.api.plugin.ReferenceLoader): if c is not None: groupNode.useOutlinerColor.set(1) groupNode.outlinerColor.set( - (float(c[0])/256), - (float(c[1])/256), - (float(c[2])/256) + (float(c[0])/255), + (float(c[1])/255), + (float(c[2])/255) ) self[:] = newNodes diff --git a/openpype/hosts/maya/plugins/load/load_vdb_to_redshift.py b/openpype/hosts/maya/plugins/load/load_vdb_to_redshift.py index 8f5f4a433c..f5662ba462 100644 --- a/openpype/hosts/maya/plugins/load/load_vdb_to_redshift.py +++ b/openpype/hosts/maya/plugins/load/load_vdb_to_redshift.py @@ -62,9 +62,9 @@ class LoadVDBtoRedShift(api.Loader): if c is not None: cmds.setAttr(root + ".useOutlinerColor", 1) cmds.setAttr(root + ".outlinerColor", - (float(c[0])/256), - (float(c[1])/256), - (float(c[2])/256) + (float(c[0])/255), + (float(c[1])/255), + (float(c[2])/255) ) # Create VR diff --git a/openpype/hosts/maya/plugins/load/load_vdb_to_vray.py b/openpype/hosts/maya/plugins/load/load_vdb_to_vray.py index c170ca906c..80b453bd13 100644 --- a/openpype/hosts/maya/plugins/load/load_vdb_to_vray.py +++ b/openpype/hosts/maya/plugins/load/load_vdb_to_vray.py @@ -55,9 +55,9 @@ class LoadVDBtoVRay(api.Loader): if c is not None: cmds.setAttr(root + ".useOutlinerColor", 1) cmds.setAttr(root + ".outlinerColor", - (float(c[0])/256), - (float(c[1])/256), - (float(c[2])/256) + (float(c[0])/255), + (float(c[1])/255), + (float(c[2])/255) ) # Create VR diff --git a/openpype/hosts/maya/plugins/load/load_vrayproxy.py b/openpype/hosts/maya/plugins/load/load_vrayproxy.py index d214d6136d..e70f40bf5a 100644 --- a/openpype/hosts/maya/plugins/load/load_vrayproxy.py +++ b/openpype/hosts/maya/plugins/load/load_vrayproxy.py @@ -74,9 +74,9 @@ class VRayProxyLoader(api.Loader): if c is not None: cmds.setAttr("{0}.useOutlinerColor".format(group_node), 1) cmds.setAttr("{0}.outlinerColor".format(group_node), - (float(c[0])/256), - (float(c[1])/256), - (float(c[2])/256) + (float(c[0])/255), + (float(c[1])/255), + (float(c[2])/255) ) return containerise( diff --git a/openpype/hosts/maya/plugins/load/load_vrayscene.py b/openpype/hosts/maya/plugins/load/load_vrayscene.py index a668a7c63a..465dab2a76 100644 --- a/openpype/hosts/maya/plugins/load/load_vrayscene.py +++ b/openpype/hosts/maya/plugins/load/load_vrayscene.py @@ -53,9 +53,9 @@ class VRaySceneLoader(api.Loader): if c is not None: cmds.setAttr("{0}.useOutlinerColor".format(group_node), 1) cmds.setAttr("{0}.outlinerColor".format(group_node), - (float(c[0])/256), - (float(c[1])/256), - (float(c[2])/256) + (float(c[0])/255), + (float(c[1])/255), + (float(c[2])/255) ) return containerise( diff --git a/openpype/hosts/maya/plugins/load/load_yeti_cache.py b/openpype/hosts/maya/plugins/load/load_yeti_cache.py index 881344cc66..de0ea6823c 100644 --- a/openpype/hosts/maya/plugins/load/load_yeti_cache.py +++ b/openpype/hosts/maya/plugins/load/load_yeti_cache.py @@ -66,9 +66,9 @@ class YetiCacheLoader(api.Loader): if c is not None: cmds.setAttr(group_name + ".useOutlinerColor", 1) cmds.setAttr(group_name + ".outlinerColor", - (float(c[0])/256), - (float(c[1])/256), - (float(c[2])/256) + (float(c[0])/255), + (float(c[1])/255), + (float(c[2])/255) ) nodes.append(group_node) diff --git a/openpype/hosts/maya/plugins/load/load_yeti_rig.py b/openpype/hosts/maya/plugins/load/load_yeti_rig.py index 8234ace711..3f67f98f51 100644 --- a/openpype/hosts/maya/plugins/load/load_yeti_rig.py +++ b/openpype/hosts/maya/plugins/load/load_yeti_rig.py @@ -84,9 +84,9 @@ class YetiRigLoader(openpype.hosts.maya.api.plugin.ReferenceLoader): if c is not None: cmds.setAttr(groupName + ".useOutlinerColor", 1) cmds.setAttr(groupName + ".outlinerColor", - (float(c[0])/256), - (float(c[1])/256), - (float(c[2])/256) + (float(c[0])/255), + (float(c[1])/255), + (float(c[2])/255) ) self[:] = nodes From 027d0d405351f2db80c04700e7c236f91999dba1 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 1 Jun 2021 01:18:00 +0200 Subject: [PATCH 33/34] added ability to se skip paths in template data --- openpype/settings/entities/lib.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openpype/settings/entities/lib.py b/openpype/settings/entities/lib.py index cee2d43b66..a5c61a9dda 100644 --- a/openpype/settings/entities/lib.py +++ b/openpype/settings/entities/lib.py @@ -52,6 +52,11 @@ def _fill_schema_template_data( if required_keys is None: first = True + if "skip_paths" in template_data: + skip_paths = template_data["skip_paths"] + if not isinstance(skip_paths, list): + skip_paths = [skip_paths] + # Cleanup skip paths (skip empty values) skip_paths = [path for path in skip_paths if path] From 6ce80fa3b2707d29b3727dc3b0fd80a43baa3a8a Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 1 Jun 2021 13:18:10 +0200 Subject: [PATCH 34/34] fix launch of standalone publisher --- openpype/modules/standalonepublish_action.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/openpype/modules/standalonepublish_action.py b/openpype/modules/standalonepublish_action.py index 87f7446341..78d87cb6c7 100644 --- a/openpype/modules/standalonepublish_action.py +++ b/openpype/modules/standalonepublish_action.py @@ -1,5 +1,5 @@ import os -import sys +import platform import subprocess from openpype.lib import get_pype_execute_args from . import PypeModule, ITrayAction @@ -35,4 +35,14 @@ class StandAlonePublishAction(PypeModule, ITrayAction): def run_standalone_publisher(self): args = get_pype_execute_args("standalonepublisher") - subprocess.Popen(args, creationflags=subprocess.DETACHED_PROCESS) + kwargs = {} + if platform.system().lower() == "darwin": + new_args = ["open", "-a", args.pop(0), "--args"] + new_args.extend(args) + args = new_args + + detached_process = getattr(subprocess, "DETACHED_PROCESS", None) + if detached_process is not None: + kwargs["creationflags"] = detached_process + + subprocess.Popen(args, **kwargs)