Check out this code, should help.
http://www.nukepedia.com/python/nodegraph/setrotolifetimeall/
Heya everybody,
I finally have some time to get back to this issue. I did not get any further with it.
The interesting thing is, it seems to work from time to time, but only for the first stroke in the hirarchy.
doing the same with a different approach results in the same problem:
Sooo anybody with suggestion shwo to get this workig in Nuke 6.3? I still absically want to create a Python button allwoing me to set my lifetime for all selected nodes after painting.
import nuke.rotopaint as rp
import _curvelib
import _curveknob
rotoNode = nuke.toNode('RotoPaint1')
cKnob = rotoNode['curves']
rootLayer = cKnob.rootLayer
for i in rootLayer:
>>>print i.name
>>>if isinstance(i, rp.Stroke):
>>>>>attribs = i.getAttributes()
>>>>>>attribs.set(0,_curvelib.AnimAttributes.kLifeTimeTypeAttribute, 0 )
thanks a lot[/code]
--
Magno Borgo
www.borgo.tv
3D | VFX | Motion Graphics
+55.41.9982-5537
+55.41.3013-4921
Brasil:Curitiba:GMT= -3
www.borgo.tv
3D | VFX | Motion Graphics
+55.41.9982-5537
+55.41.3013-4921
Brasil:Curitiba:GMT= -3
_______________________________________________ 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