Created
March 22, 2015 22:53
-
-
Save antiero/4df51f0387e4465a77a5 to your computer and use it in GitHub Desktop.
Add Copy Cuts Keyboard Shortcut
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add a Alt+Shift+X keyboard shortcut to Copy Cuts# | |
# Install into ~/.nuke/Python/Startup | |
import hiero.core | |
from hiero.ui import findMenuAction, registerAction, CopyCuts | |
import PySide.QtGui | |
# Change this String to be the keyboard shortcut you'd like... | |
gKeybaordShortcutString = "Alt+Shift+X" | |
def customInit(self): | |
global gKeybaordShortcutString | |
PySide.QtGui.QAction.__init__(self, "Copy Cuts...", None) | |
self.triggered.connect(self.doCuts) | |
hiero.core.events.registerInterest("kShowContextMenu/kTimeline", self.eventHandler) | |
self.setObjectName("foundry.timeline.copyCuts") | |
self.setShortcut(gKeybaordShortcutString) | |
self.enableSelectedCutsCopyMode = True | |
CopyCuts.CopyCutsFromTrackAction.__init__ = customInit | |
# Add Copy Cuts to Timeline menu so it can be given a Global keyboard shortcut | |
timelineMenu = findMenuAction("foundry.menu.sequence") | |
if timelineMenu: | |
timelineMenu.menu().addAction(CopyCuts.CopyCutsFromTrackAction()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment