From dad667ad68673fd1c966127b9b009ee0b949b969 Mon Sep 17 00:00:00 2001 From: "pascale@blackshipvfx.com" Date: Tue, 9 Dec 2025 18:31:43 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20`nuke=5Fwindow.children()`?= =?UTF-8?q?=20can't=20find=20menubars=20in=20macOS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/ayon_core/vendor/python/scriptsmenu/launchfornuke.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/ayon_core/vendor/python/scriptsmenu/launchfornuke.py b/client/ayon_core/vendor/python/scriptsmenu/launchfornuke.py index 3043d22d1c5..f44db433489 100644 --- a/client/ayon_core/vendor/python/scriptsmenu/launchfornuke.py +++ b/client/ayon_core/vendor/python/scriptsmenu/launchfornuke.py @@ -17,6 +17,10 @@ def _nuke_main_menubar(): menubar = [i for i in nuke_window.children() if isinstance(i, QtWidgets.QMenuBar)] + # OSX fix - nuke_window.children() can't find menubars + if not menubar: + menubar = [nuke_window.menuBar()] + assert len(menubar) == 1, "Error, could not find menu bar!" return menubar[0] From 6b0b02e6da6fd2928c2f031d83e9f5d786955671 Mon Sep 17 00:00:00 2001 From: "pascale@blackshipvfx.com" Date: Mon, 5 Jan 2026 14:17:59 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20unify=20menuBar=20for?= =?UTF-8?q?=20all=20os?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ayon_core/vendor/python/scriptsmenu/launchfornuke.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/client/ayon_core/vendor/python/scriptsmenu/launchfornuke.py b/client/ayon_core/vendor/python/scriptsmenu/launchfornuke.py index f44db433489..8c8316f4a43 100644 --- a/client/ayon_core/vendor/python/scriptsmenu/launchfornuke.py +++ b/client/ayon_core/vendor/python/scriptsmenu/launchfornuke.py @@ -14,15 +14,8 @@ def _nuke_main_window(): def _nuke_main_menubar(): """Retrieve the main menubar of the Nuke window""" nuke_window = _nuke_main_window() - menubar = [i for i in nuke_window.children() - if isinstance(i, QtWidgets.QMenuBar)] - # OSX fix - nuke_window.children() can't find menubars - if not menubar: - menubar = [nuke_window.menuBar()] - - assert len(menubar) == 1, "Error, could not find menu bar!" - return menubar[0] + return nuke_window.menuBar() def main(title="Scripts"):