okay, lets say - solved, just used Animation menu to place a command into it, how useful will it be? Questionable :D :D. Here is the code anyway: (run the code and you will have in Animation menu of the knob new command called "Fader"
Code: menubar = nuke.menu('Animation') def fader(): curFrame = str(nuke.frame()) inFrame = str(nuke.frame()-1) outFrame = str(nuke.frame()+1) n = nuke.thisNode() k = nuke.thisKnob() curValue = str(k.getValue()) k.setAnimated() class ShapePanel(nukescripts.PythonPanel): def __init__(self): nukescripts.PythonPanel.__init__(self, 'Fader menu') self.inValue = nuke.String_Knob("inValue",'in value',"0") self.inFrame = nuke.String_Knob("inFrame",' in frame', inFrame) self.inFrame.clearFlag(nuke.STARTLINE) self.currentValue = nuke.String_Knob("currentValue",'current value',curValue) self.currentFrame = nuke.String_Knob("currentFrame",'current frame', curFrame) self.currentFrame.clearFlag(nuke.STARTLINE) self.outValue = nuke.String_Knob("outValue",'out value',"0") self.outFrame = nuke.String_Knob("outFrame",' out frame', outFrame) self.outFrame.clearFlag(nuke.STARTLINE) for k in (self.inValue,self.inFrame,self.currentValue,self.currentFrame,self.outValue,self.outFrame): self.addKnob(k) p = ShapePanel() p.showModalDialog() inV = float(p.inValue.value()) inF = float(p.inFrame.value()) k.setValueAt(inV,inF) curV = float(p.currentValue.value()) curF = float(p.currentFrame.value()) k.setValueAt(curV,curF) outV = float(p.outValue.value()) outF = float(p.outFrame.value()) k.setValueAt(outV,outF) menubar.addCommand("Fader", "fader()")
_______________________________________________ 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