Something similar to this came up recently for someone else as well, and it
seems The Foundry may have changed their interpolation constants without
updating the Python layer.
nuke.LINEAR is supposedly equal to 3, but setting a key to Linear and then
checking its interpolation attribute shows that it's actually 2, so instead
of setting the interpolation to nuke.LINEAR, try setting it to 2.
The current value list seems to be:
0: Smooth
1: Constant
2: Linear
3: Catmull-Rom
4: Cubic
20: Horizontal
Hope this helps,
-Nathan
-----Original Message-----
From: Colin Jenken
Sent: Tuesday, July 12, 2011 5:45 PM
To: [email protected]
Subject: [Nuke-python] nuke.LINEAR is not linear?
I've been testing with this little python snipet and I can't seem to
get it to work:
nuke.selectedNode().knobs()['offset'].animations()[0].changeInterpolation(
nuke.selectedNode().knobs()['offset'].animations()[0].keys() ,
nuke.LINEAR)
This will not change my keyframes to linear but if I do this:
nuke.selectedNode().knobs()['offset'].animations()[0].changeInterpolation(
nuke.selectedNode().knobs()['offset'].animations()[0].keys() ,
nuke.CONSTANT)
it will change them to constant. If it works changing it to constant
why not linear?
Is there something I'm missing here?
Cheers,
Colin
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python