Having some trouble creating a pulldown menu on a custom write node that I have created. The code that I have come up with so far is:
shots = ['010100', '010500', '010340', '010200']
shots.sort()
shotKnob = nuke.Pulldown_Knob("shotSelector","Load Shot")
shotList = []
for shot in shots:
shotOp = "%s" % (shot)
shotList.append((shot, shotOp))
shotKnob.setValues(shotList)
os.environ['ELEM'] = shotOp
The problem that I have, is that the menu comes up, but it doesn’t display the option that has been selected, and then when working with the output, it displays all of the options rather than just the one that was selected.
I’ve used ‘addEnumerationPulldown’ for other project panels, but this seems to be the best code for this so far.
Thanks for any help in advance.
Post a Comment