Skip to content

Instantly share code, notes, and snippets.

# Workaround for the fact that Bins have no setName method.
# Check help for comments on the Undo problems associated with this!
from hiero.core import Bin
from copy import copy
def _setName(self, name):
"""
self.setName() -> set the name of the Bin.
@param: string new name
from hiero.ui import menuBar, findMenuAction, registerAction
from PySide import QtGui
# Get the top-level MenuBar
m = menuBar()
myMenu = m.addMenu( 'SuperMenu' )
def doMyThing():
print "Doing Ma Thing"
myAction = QtGui.QAction ( 'my entry', None )
import hiero.exporters
def hidePresets(event):
# Edit this list to be the name of the preset you'd like to hide:
presetNamesToRemove = ["Basic Nuke Shot With Annotations", "Final Cut Pro 7 XML"]
# Get hold of the exporters registry object:
R = hiero.exporters.registry
# Remove the presets in the list above by name...
@antiero
antiero / CopyCutsShortcutOverride.py
Created March 22, 2015 22:53
Add Copy Cuts Keyboard Shortcut
# 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):
@antiero
antiero / menuHider.py
Created July 10, 2014 14:17
Hiding actions on right-click menus
import hiero.core
from PySide.QtGui import QAction
class ContextMenuOverride(QAction):
def __init__(self):
QAction.__init__(self, "kill menu", None)
hiero.core.events.registerInterest("kShowContextMenu/kTimeline", self.eventHandler)
hiero.core.events.registerInterest("kShowContextMenu/kBin", self.eventHandler)
hiero.core.events.registerInterest("kShowContextMenu/kSpreadsheet", self.eventHandler)