mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Vendor: updating scriptmenu to 1.5.2
This commit is contained in:
parent
dd6c41d30f
commit
ce882641e7
4 changed files with 6 additions and 9 deletions
|
|
@ -119,7 +119,8 @@ module.{module_name}()"""
|
|||
"""
|
||||
|
||||
# get the current application and its linked keyboard modifiers
|
||||
modifiers = QtWidgets.QApplication.keyboardModifiers()
|
||||
app = QtWidgets.QApplication.instance()
|
||||
modifiers = app.keyboardModifiers()
|
||||
|
||||
# If the menu has a callback registered for the current modifier
|
||||
# we run the callback instead of the action itself.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ def _nuke_main_window():
|
|||
if (obj.inherits('QMainWindow') and
|
||||
obj.metaObject().className() == 'Foundry::UI::DockMainWindow'):
|
||||
return obj
|
||||
raise RuntimeError('Could not find Nuke MainWindow instance')
|
||||
raise RuntimeError('Could not find Nuke MainWindow instance')
|
||||
|
||||
|
||||
def _nuke_main_menubar():
|
||||
|
|
@ -22,9 +22,6 @@ def _nuke_main_menubar():
|
|||
|
||||
|
||||
def main(title="Scripts"):
|
||||
# Register control + shift callback to add to shelf (Nuke behavior)
|
||||
# modifiers = QtCore.Qt.ControlModifier | QtCore.Qt.ShiftModifier
|
||||
# menu.register_callback(modifiers, to_shelf)
|
||||
nuke_main_bar = _nuke_main_menubar()
|
||||
for nuke_bar in nuke_main_bar.children():
|
||||
if isinstance(nuke_bar, scriptsmenu.ScriptsMenu):
|
||||
|
|
@ -33,4 +30,4 @@ def main(title="Scripts"):
|
|||
return menu
|
||||
|
||||
menu = scriptsmenu.ScriptsMenu(title=title, parent=nuke_main_bar)
|
||||
return menu
|
||||
return menu
|
||||
|
|
|
|||
|
|
@ -264,8 +264,7 @@ class ScriptsMenu(QtWidgets.QMenu):
|
|||
action.setVisible(True)
|
||||
else:
|
||||
for action in self._script_actions:
|
||||
if not action.has_tag(search.lower()):
|
||||
action.setVisible(False)
|
||||
action.setVisible(action.has_tag(search.lower()))
|
||||
|
||||
# Set visibility for all submenus
|
||||
for action in self.actions():
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
VERSION_MAJOR = 1
|
||||
VERSION_MINOR = 5
|
||||
VERSION_PATCH = 1
|
||||
VERSION_PATCH = 2
|
||||
|
||||
|
||||
version = '{}.{}.{}'.format(VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue