Amazing, many thanks. I knew it was something simple that I was missing.


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




--
**************************
Magno Borgo

www.borgo.tv
www.boundaryvfx.com
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to