Python, …, again (animationCurve and Lookups)

I’m trying to create a Lookup interface with 3 animation curves in it …
Here is my approach in python … but I don’t get any results …
Does anyone know what I’m doing wrong?

Thanks to all!!

———————————————————————————————————————————–

n = nuke.toNode("Grain3W")

#these are 3 floating point sliders
lowCurve = n[‘lowCurve’]
midCurve = n[‘midCurve’]
highCurve = n[‘highCurve’]

# create an AnimationCurve for the channel 0
lowCurve.setAnimated(0)
highCurve.setAnimated(0)

# access all animation curves for the knob
alowCurve = lowCurve.animations()
ahighCurve = highCurve.animations()

# set the animation keys
alowCurve[0].setKey(0, 1)
alowCurve[0].setKey(0.25, 0)
ahighCurve[0].setKey(0.5, 0)
ahighCurve[0].setKey(1, 1)

#creates the lookup panel
ll = nuke.Node.addKnob(n, nuke.LookupCurves_Knob("defCurve", "ranges"))

#here comes the problem: the result in python feedback is ok but no lines appear in the lookup panel I have created
nuke.LookupCurves_Knob.addCurve (n[‘ranges’], alowCurve[0])
nuke.LookupCurves_Knob.addCurve (n[‘ranges’], ahighCurve[0])

———————————————————————————————————————————–

No Responses to “Python, …, again (animationCurve and Lookups)”

Post a Comment