Merge pull request #669 from ynput/bugfix/'fix-KeyboardModifier'-not-found-in-maya-2025

Maya: Fix the scriptmenu error found during launch maya 2025
This commit is contained in:
Kayla Man 2024-06-19 19:01:06 +08:00 committed by GitHub
commit 506c9975af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -130,7 +130,10 @@ def main(title="Scripts", parent=None, objectName=None):
# Register control + shift callback to add to shelf (maya behavior)
modifiers = QtCore.Qt.ControlModifier | QtCore.Qt.ShiftModifier
menu.register_callback(int(modifiers), to_shelf)
if int(cmds.about(version=True)) <= 2025:
modifiers = int(modifiers)
menu.register_callback(modifiers, to_shelf)
menu.register_callback(0, register_repeat_last)