For the menu you can do something like this (basicallly combine standard
QT flow with hiero's registerInterest() logic:
import hiero
from PySide import QtGui
class MyMenuWidget(QtGui.QMenu):
def __init__(self, title, parent=None):
QtGui.QMenu.__init__(self, title, parent)
testAction = QtGui.QAction('test', self)
self.addAction(testAction)
def eventHandler(self, event):
# this enables the menu to be registered as a default context
menu item
event.menu.addMenu(self)
myMenuInstance = OhuMenuWidget('My Menu')
hiero.core.events.registerInterest('kShowContextMenu',
myMenuInstance.eventHandler)
As for renaming bin items, that method seems to be missing. Not sure
what the work around is.
On 19/10/16 11:35 AM, Joerg Bruemmer wrote:
hey gang,
I have 2 questions: :)
1. how do I rename a BinItem via Python after it was created? Seems to
be quite an easy task but I fail to do it, as there is no .setName on
this, right?
2. I have a new type of versioning so I add it to right click event on
timeline. I do not want to over write the build in method. As I will
add more stuff soon, I would like to gather stuff in sub menus. Like
"my versioning" > "versionUp", "versionDown"
Thanks heaps!
Joerg
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python