From 449549b72bb76142fd669f3da9dd197e87d4bad8 Mon Sep 17 00:00:00 2001 From: "Sveinbjorn J. Tryggvason" Date: Tue, 1 Jul 2025 11:11:18 +0000 Subject: [PATCH 1/5] allow merging of file sequence entries --- .../tools/attribute_defs/files_widget.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/client/ayon_core/tools/attribute_defs/files_widget.py b/client/ayon_core/tools/attribute_defs/files_widget.py index 8a40b3ff38..edac8059f0 100644 --- a/client/ayon_core/tools/attribute_defs/files_widget.py +++ b/client/ayon_core/tools/attribute_defs/files_widget.py @@ -892,6 +892,28 @@ class FilesWidget(QtWidgets.QFrame): self._add_filepaths(new_items) self._remove_item_by_ids(item_ids) + def _on_merge_request(self): + if self._multivalue: + return + + item_ids = self._files_view.get_selected_item_ids() + if not item_ids: + return + + all_paths = [] + for item_id in item_ids: + file_item = self._files_model.get_file_item_by_id(item_id) + if not file_item: + return + + new_items = file_item.split_sequence() + for nitem in new_items: + all_paths.append(os.path.join(nitem.directory, nitem.filenames[0])) + unique_all_pahts = list(set(all_paths)) + self._remove_item_by_ids(item_ids) + new_items = FileDefItem.from_value(unique_all_pahts, True) + self._add_filepaths(new_items) + def _on_remove_requested(self): if self._multivalue: return @@ -911,6 +933,9 @@ class FilesWidget(QtWidgets.QFrame): split_action.triggered.connect(self._on_split_request) menu.addAction(split_action) + merge_action = QtWidgets.QAction("Merge sequence", menu) + merge_action.triggered.connect(self._on_merge_request) + menu.addAction(merge_action) remove_action = QtWidgets.QAction("Remove", menu) remove_action.triggered.connect(self._on_remove_requested) menu.addAction(remove_action) From 1b2d3606191fc7f294c113c35b90c3ebdf852f3f Mon Sep 17 00:00:00 2001 From: sjt-rvx <72554834+sjt-rvx@users.noreply.github.com> Date: Wed, 2 Jul 2025 10:22:35 +0000 Subject: [PATCH 2/5] Update client/ayon_core/tools/attribute_defs/files_widget.py Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- .../tools/attribute_defs/files_widget.py | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/client/ayon_core/tools/attribute_defs/files_widget.py b/client/ayon_core/tools/attribute_defs/files_widget.py index edac8059f0..f1b0f06dbc 100644 --- a/client/ayon_core/tools/attribute_defs/files_widget.py +++ b/client/ayon_core/tools/attribute_defs/files_widget.py @@ -900,18 +900,20 @@ class FilesWidget(QtWidgets.QFrame): if not item_ids: return - all_paths = [] + all_paths = set() + merged_item_ids = set() for item_id in item_ids: file_item = self._files_model.get_file_item_by_id(item_id) - if not file_item: - return - - new_items = file_item.split_sequence() - for nitem in new_items: - all_paths.append(os.path.join(nitem.directory, nitem.filenames[0])) - unique_all_pahts = list(set(all_paths)) - self._remove_item_by_ids(item_ids) - new_items = FileDefItem.from_value(unique_all_pahts, True) + if file_item is None: + continue + merged_item_ids.add(item_id) + all_paths |= { + os.path.join(file_item.directory, filename) + for filename in file_item.filenames + } + + self._remove_item_by_ids(merged_item_ids) + new_items = FileDefItem.from_value(list(all_paths), True) self._add_filepaths(new_items) def _on_remove_requested(self): From c54b7c25178e0c8910f16d7a94a7f78d17c33059 Mon Sep 17 00:00:00 2001 From: sjt-rvx <72554834+sjt-rvx@users.noreply.github.com> Date: Mon, 7 Jul 2025 10:58:18 +0000 Subject: [PATCH 3/5] Update client/ayon_core/tools/attribute_defs/files_widget.py Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- client/ayon_core/tools/attribute_defs/files_widget.py | 1 - 1 file changed, 1 deletion(-) diff --git a/client/ayon_core/tools/attribute_defs/files_widget.py b/client/ayon_core/tools/attribute_defs/files_widget.py index f1b0f06dbc..4c55ae5620 100644 --- a/client/ayon_core/tools/attribute_defs/files_widget.py +++ b/client/ayon_core/tools/attribute_defs/files_widget.py @@ -911,7 +911,6 @@ class FilesWidget(QtWidgets.QFrame): os.path.join(file_item.directory, filename) for filename in file_item.filenames } - self._remove_item_by_ids(merged_item_ids) new_items = FileDefItem.from_value(list(all_paths), True) self._add_filepaths(new_items) From 37980d2299909b3b108f41f5998e231b43e25dab Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Mon, 14 Jul 2025 14:54:58 +0200 Subject: [PATCH 4/5] Fix all characters of report being printed to new lines --- client/ayon_core/pipeline/publish/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ayon_core/pipeline/publish/lib.py b/client/ayon_core/pipeline/publish/lib.py index 49143c4426..fb84417730 100644 --- a/client/ayon_core/pipeline/publish/lib.py +++ b/client/ayon_core/pipeline/publish/lib.py @@ -1048,7 +1048,7 @@ def main_cli_publish( discover_result = publish_plugins_discover() publish_plugins = discover_result.plugins - print("\n".join(discover_result.get_report(only_errors=False))) + print(discover_result.get_report(only_errors=False)) # Error exit as soon as any error occurs. error_format = ("Failed {plugin.__name__}: " From 0a75ab09c509fecfb180fd38513920a3be564c6a Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Mon, 14 Jul 2025 21:59:28 +0200 Subject: [PATCH 5/5] Report the actual class name --- client/ayon_core/pipeline/plugin_discover.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ayon_core/pipeline/plugin_discover.py b/client/ayon_core/pipeline/plugin_discover.py index f531600276..03da7fce79 100644 --- a/client/ayon_core/pipeline/plugin_discover.py +++ b/client/ayon_core/pipeline/plugin_discover.py @@ -51,7 +51,7 @@ class DiscoverResult: "*** Discovered {} plugins".format(len(self.plugins)) ) for cls in self.plugins: - lines.append("- {}".format(cls.__class__.__name__)) + lines.append("- {}".format(cls.__name__)) # Plugin that were defined to be ignored if self.ignored_plugins or full_report: