Q100226: Spacebar control customization in NukeStudio/Hiero
By default in NukeStudio/Hiero the spacebar keyboard shortcut is used to maximise the panel rather than to play/pause the Viewer, as is commonly done in other applications.
This is due to the spacebar keyboard shortcut being hardcoded in NukeStudio/Hiero to always maximize the active pane, so while it is possible to set the spacebar to play/pause the Viewer, it will also maximise the panel each time.
We have an open feature request to add a preference into NukeStudio/Hiero to control what the spacebar hotkey does, and for reference this is:
TP 141596 - NukeStudio - Add a preference for what the spacebar controls (Play/Stop vs. Expand pane)
To change the existing behaviour of the spacebar keyboard shortcut and set it to play/pause the Viewer, you can use the code below:
from PySide import QtGui ### For pre Nuke 11
from PySide2 import QtGui ### For Nuke 11+
playButton = hiero.ui.findMenuAction('Play/Pause')
To run please copy the code into a Script Editor panel and execute all lines of code.
To have this functionality consistent in all Nuke sessions you need to add it to your menu.py or init.py. For more information on locating or creating these files please see Nuke's Online Help.
We're sorry to hear thatPlease tell us why