On 04/01/2012 15:27, Magno Borgo wrote:
Like this:
***
import nuke.rotopaint as rp
SplineWarpNode = nuke.createNode('SplineWarp3')
curvesKnob = SplineWarpNode['curves']
shape = rp.Shape(curvesKnob)
^
\- this is the problem
***
shape gives: TypeError: argument 1 must be (unspecified), not
_splinewarp.SplineKnob
Unfortunately the error message is most unhelpful here though.
I know that rotopaint node uses _rotopaint.RotoKnob and when i try
shape = rp.Shape(curvesKnob)on a roto node it works.
So which method should i use to create shapes inside a SplineKnob?
You are mixing the rotopaint and splinewarp Python bindings. While they
reuse code, they have different runtime objects.
To make it work, import the splinewarp module instead of rotopaint, like so:
import nuke.splinewarp as sw
then you can do:
shape = sw.Shape(curvesKnob)
And for the rest of the code keep in mind that you shouldn't mix the
splinewarp and rotopaint modules.
HTH,
Wouter
--
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-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users