Many thanks Carl, wow that was harder than I thought.

How did you find out about setPivotPointAnimCurve?
Is there a way to list what's in the transform node?

// F
fre 12 dec 2014 kl. 12:50 skrev Carl Schröter <[email protected]>:

> Hi Fredrik,
>
> This seems to work for me:
>
> #####
> pn = nuke.selectedNode()
> if pn.Class() == 'RotoPaint':
>    ck = pn['curves']
>
> lt = ck.rootLayer.getTransform()
>
> pivot_curve = nuke.rotopaint.AnimCurve()
> pivot_curve.constantValue = 0
> lt.setPivotPointAnimCurve(1,pivot_curve)
>
> ck.rootLayer.setTransform(lt)
> ck.changed()
> #####
>
>
> Cheers,
> Carl
>
>
> Am 2014-12-12 12:00, schrieb Fredrik Averpil:
> > Hi,
> >
> > I'm having a hard time being able to set the center value to 0 of the
> > "Root" layer in a Roto node using python.
> >
> > If I just set the nuke.selectedNode().knob('center') to 0, it will
> > set the Root layer's center to 0 only if it is selected. If another
> > bezier is selected in the bezier/layer list, this entity's center
> > will
> > instead be set to 0 (which is not what I want).
> >
> > How can I make sure I set the center of the Root?
> > It seems that if I could somehow select "Root" (setSelected does not
> > work) then my code would work.
> >
> > Any ideas?
> >
> > // Fredrik
> >
> >
> > _______________________________________________
> > Nuke-python mailing list
> > [email protected], http://forums.thefoundry.co.uk/
> > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
> _______________________________________________
> Nuke-python mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
_______________________________________________
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