Hi I wrote a code for random color of roto, it work for any number of bezier in roto, but not work if create a layers :(
_________ import random import nuke def allRoto(): ���tn = nuke.thisNode() ���def list(): ������cKnob= tn['curves'] ������rRoot = cKnob.rootLayer ������for shape in rRoot: ���������attrs = shape.getAttributes() ���������if attrs.getValue(1,'ro') == 0 and attrs.getValue(1,'go') == 0 and attrs.getValue(1,'bo') == 0: ������������attrs.set('ro', random.random()) ������������attrs.set('go', random.random()) ������������attrs.set('bo', random.random()) ������������attrs.set('ao', 1) ���������break ������else: ���������break ���nuke.addKnobChanged(list, nodeClass='Roto') nuke.addOnCreate(allRoto, nodeClass='Roto') ------------------------ aleksey nagibin composer | www.cgfww.com
_______________________________________________ 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