Hi all, I have a script that copy a roto node and should link the control points of the new shape to the original ones, but even if the script run without error, I don't get the result I want. Anyone can help?
rotoNode = nuke.selectedNode() rotoCurve = rotoNode['curves'] rotoRoot = rotoCurve.rootLayer stereoNode = nuke.createNode('Roto') stereoCurve = stereoNode['curves'] stereoRoot = stereoCurve.rootLayer for shape in rotoRoot: print 'root' if isinstance(shape, nuke.rotopaint.Shape): print 'shape' count = 0 newshape = nuke.rotopaint.Shape(stereoCurve) newshape.name = shape.name for points in shape: print 'point%s' % count newpoint = nuke.rotopaint.ShapeControlPoint() newcurve = nuke.rotopaint.AnimCurve() newcurve.expressionString = "%s.curves.%s.curve.%s.main.x" % (rotoNode.name(), shape.name, count) newpoint.center.setPositionAnimCurve(0, newcurve, 'left') newpoint.center.setPositionAnimCurve(1, newcurve, 'left') print newpoint.center.getPositionAnimCurve(0).expressionString newshape.append(newpoint) count += 1 stereoRoot.append(newshape) stereoCurve.changed() Nic
_______________________________________________ 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