On 12/01/2012 18:45, Brogan Ross wrote:
Does anyone know if there is a "pythonic" way to get what type a shape
is in a Roto node?  Aka, Bspline or Bezier.  I know that the _rotopaint
module has the CurveType constants which are written to the .nk file, i
just haven't found a way to get that information from from a shape.  Or
really anything that could tell whether a shape is a Bezier or Bspline?
Anyone have ideas?

The CurveType is inherent to the Curve, not to the Shape. So you need to get a Curve object from your Shape, e.g:

rotoknob = nuke.toNode('RotoPaint1')['curves']
shape = rotoknob.toElement('Bezier1')
curve = shape.evaluate(0, frameNum)
type = curve.curveType


HTH

--
Wouter Klouwen, Software Engineer
The Foundry, 6th Floor, Comms Building, 48 Leicester Sq, London WC2H LT
Tel: +442079686828 • Fax: +4420 79308906 • thefoundry.co.uk
The Foundry Visionmongers Ltd • Reg.d in England and Wales No: 4642027
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to