From 7772ac7ea9125e2d06d5e31cf5771bb7e2211ca1 Mon Sep 17 00:00:00 2001 From: 2-REC Date: Mon, 5 Dec 2022 15:58:37 +0700 Subject: [PATCH 1/4] Added missing parenthesis --- .../event_handlers_server/event_first_version_status.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/modules/ftrack/event_handlers_server/event_first_version_status.py b/openpype/modules/ftrack/event_handlers_server/event_first_version_status.py index ecc6c95d90f..8ef333effd3 100644 --- a/openpype/modules/ftrack/event_handlers_server/event_first_version_status.py +++ b/openpype/modules/ftrack/event_handlers_server/event_first_version_status.py @@ -135,9 +135,9 @@ def launch(self, session, event): new_status = asset_version_statuses.get(found_item["status"]) if not new_status: - self.log.warning( + self.log.warning(( "AssetVersion doesn't have status `{}`." - ).format(found_item["status"]) + ).format(found_item["status"])) continue try: From f9680ccb78ebf2a1addd4f6b76a3cc776f09aff4 Mon Sep 17 00:00:00 2001 From: 2-REC Date: Mon, 5 Dec 2022 16:26:01 +0700 Subject: [PATCH 2/4] Removed extra quotes --- openpype/settings/defaults/project_settings/maya.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 988c0e777a2..f0a38eee296 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -915,7 +915,7 @@ "current_context": [ { "subset_name_filters": [ - "\".+[Mm]ain\"" + ".+[Mm]ain" ], "families": [ "model" From 605432cc5db24201a124a4bf220200f672f502bf Mon Sep 17 00:00:00 2001 From: 2-REC Date: Mon, 5 Dec 2022 16:30:01 +0700 Subject: [PATCH 3/4] Removed duplicate command --- openpype/tools/standalonepublish/widgets/widget_family.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/openpype/tools/standalonepublish/widgets/widget_family.py b/openpype/tools/standalonepublish/widgets/widget_family.py index eab66d75b39..bd984942b80 100644 --- a/openpype/tools/standalonepublish/widgets/widget_family.py +++ b/openpype/tools/standalonepublish/widgets/widget_family.py @@ -194,9 +194,6 @@ def _on_data_changed(self): project_name, asset_name, fields=["_id"] ) - # Get plugin and family - plugin = item.data(PluginRole) - # Early exit if no asset name if not asset_name.strip(): self._build_menu([]) From ba149de263a5edef4468e9822ee6e44b2f557789 Mon Sep 17 00:00:00 2001 From: 2-REC Date: Mon, 5 Dec 2022 16:55:07 +0700 Subject: [PATCH 4/4] Check asset is 'not selected' --- .../standalonepublish/widgets/widget_family.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/openpype/tools/standalonepublish/widgets/widget_family.py b/openpype/tools/standalonepublish/widgets/widget_family.py index bd984942b80..e1cbb8d3971 100644 --- a/openpype/tools/standalonepublish/widgets/widget_family.py +++ b/openpype/tools/standalonepublish/widgets/widget_family.py @@ -186,16 +186,11 @@ def _on_data_changed(self): if item is None: return - asset_doc = None - if asset_name != self.NOT_SELECTED: - # Get the assets from the database which match with the name - project_name = self.dbcon.active_project() - asset_doc = get_asset_by_name( - project_name, asset_name, fields=["_id"] - ) - # Early exit if no asset name - if not asset_name.strip(): + if ( + asset_name == self.NOT_SELECTED + or not asset_name.strip() + ): self._build_menu([]) item.setData(ExistsRole, False) print("Asset name is required ..") @@ -207,8 +202,10 @@ def _on_data_changed(self): asset_doc = get_asset_by_name( project_name, asset_name, fields=["_id"] ) + # Get plugin plugin = item.data(PluginRole) + if asset_doc and plugin: asset_id = asset_doc["_id"] task_name = self.dbcon.Session["AVALON_TASK"]