fix parenting of nuke tools in openpype

This commit is contained in:
iLLiCiTiT 2021-11-18 14:29:36 +01:00
parent be9e898168
commit aa3274f950

View file

@ -6,11 +6,15 @@ from .lib import WorkfileSettings
from openpype.api import Logger, BuildWorkfile, get_current_project_settings
from openpype.tools.utils import host_tools
from avalon.nuke.pipeline import get_main_window
log = Logger().get_logger(__name__)
menu_label = os.environ["AVALON_LABEL"]
def install():
main_window = get_main_window()
menubar = nuke.menu("Nuke")
menu = menubar.findItem(menu_label)
@ -25,7 +29,7 @@ def install():
menu.removeItem(rm_item[1].name())
menu.addCommand(
name,
host_tools.show_workfiles,
lambda: host_tools.show_workfiles(parent=main_window),
index=2
)
menu.addSeparator(index=3)
@ -88,7 +92,7 @@ def install():
menu.addSeparator()
menu.addCommand(
"Experimental tools...",
host_tools.show_experimental_tools_dialog
lambda: host_tools.show_experimental_tools_dialog(parent=main_window)
)
# adding shortcuts