From f17529b0510704d29e1ae83c784f553e71060e22 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 27 Sep 2024 13:05:31 +0200 Subject: [PATCH 1/3] Make Publisher UI raised to the front when clicking `AYON > Create...` or `AYON > Publish...` in host integrations if it was already opened. --- client/ayon_core/tools/utils/host_tools.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/ayon_core/tools/utils/host_tools.py b/client/ayon_core/tools/utils/host_tools.py index 1eff746b9e..3cddb69eae 100644 --- a/client/ayon_core/tools/utils/host_tools.py +++ b/client/ayon_core/tools/utils/host_tools.py @@ -252,6 +252,9 @@ class HostToolsHelper: if tab: window.set_current_tab(tab) window.make_sure_is_visible() + window.raise_() + window.activateWindow() + window.showNormal() def get_tool_by_name(self, tool_name, parent=None, *args, **kwargs): """Show tool by it's name. From 3712152cb7d5d45abad425d97e235b234f93d797 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:52:48 +0200 Subject: [PATCH 2/3] removed 'HOST_WORKFILE_EXTENSIONS' --- client/ayon_core/pipeline/__init__.py | 2 -- client/ayon_core/pipeline/constants.py | 18 ------------------ 2 files changed, 20 deletions(-) diff --git a/client/ayon_core/pipeline/__init__.py b/client/ayon_core/pipeline/__init__.py index 4fcea60d5e..8e89029e7b 100644 --- a/client/ayon_core/pipeline/__init__.py +++ b/client/ayon_core/pipeline/__init__.py @@ -3,7 +3,6 @@ from .constants import ( AVALON_INSTANCE_ID, AYON_CONTAINER_ID, AYON_INSTANCE_ID, - HOST_WORKFILE_EXTENSIONS, ) from .anatomy import Anatomy @@ -114,7 +113,6 @@ __all__ = ( "AVALON_INSTANCE_ID", "AYON_CONTAINER_ID", "AYON_INSTANCE_ID", - "HOST_WORKFILE_EXTENSIONS", # --- Anatomy --- "Anatomy", diff --git a/client/ayon_core/pipeline/constants.py b/client/ayon_core/pipeline/constants.py index 88cddc6e1a..e6156b3138 100644 --- a/client/ayon_core/pipeline/constants.py +++ b/client/ayon_core/pipeline/constants.py @@ -4,21 +4,3 @@ AYON_INSTANCE_ID = "ayon.create.instance" # Backwards compatibility AVALON_CONTAINER_ID = "pyblish.avalon.container" AVALON_INSTANCE_ID = "pyblish.avalon.instance" - -# TODO get extensions from host implementations -HOST_WORKFILE_EXTENSIONS = { - "blender": [".blend"], - "celaction": [".scn"], - "cinema4d": [".c4d"], - "tvpaint": [".tvpp"], - "fusion": [".comp"], - "harmony": [".zip"], - "houdini": [".hip", ".hiplc", ".hipnc"], - "maya": [".ma", ".mb"], - "nuke": [".nk"], - "hiero": [".hrox"], - "photoshop": [".psd", ".psb"], - "premiere": [".prproj"], - "resolve": [".drp"], - "aftereffects": [".aep"] -} From d667f21625bdd043a3642fad5f36e7f0b6357ec0 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Tue, 1 Oct 2024 10:15:23 +0200 Subject: [PATCH 3/3] Move logic to `make_sure_is_visible` --- client/ayon_core/tools/publisher/window.py | 5 ++++- client/ayon_core/tools/utils/host_tools.py | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/ayon_core/tools/publisher/window.py b/client/ayon_core/tools/publisher/window.py index a8ca605ecb..434c2ca602 100644 --- a/client/ayon_core/tools/publisher/window.py +++ b/client/ayon_core/tools/publisher/window.py @@ -439,10 +439,13 @@ class PublisherWindow(QtWidgets.QDialog): def make_sure_is_visible(self): if self._window_is_visible: self.setWindowState(QtCore.Qt.WindowActive) - else: self.show() + self.raise_() + self.activateWindow() + self.showNormal() + def showEvent(self, event): self._window_is_visible = True super().showEvent(event) diff --git a/client/ayon_core/tools/utils/host_tools.py b/client/ayon_core/tools/utils/host_tools.py index 3cddb69eae..1eff746b9e 100644 --- a/client/ayon_core/tools/utils/host_tools.py +++ b/client/ayon_core/tools/utils/host_tools.py @@ -252,9 +252,6 @@ class HostToolsHelper: if tab: window.set_current_tab(tab) window.make_sure_is_visible() - window.raise_() - window.activateWindow() - window.showNormal() def get_tool_by_name(self, tool_name, parent=None, *args, **kwargs): """Show tool by it's name.