Hi Magno,
you should be setting and getting the flag on the curve inside the
shape, not on the shape itself.
HTH,
Wouter
On 04/04/2012 14:01, Magno Borgo wrote:
Thanks Wouter for the quick reply.
I was on the right track, still can't get it to work.
From the docs, eOpenFlag = 5, right?
Working on a rotopaint node with a closed shape, when I check the closed
shape with getFlag the feedback is False. I set the flag with setFlag to
True but nothing happens, shape remains closed on the viewer.
Sample code below:
rotoNode = nuke.selectedNode()
rotoCurve = rotoNode['curves']
rotoRoot = rotoCurve.rootLayer
for shape in rotoRoot:
print shape.getFlag(5)
shape.setFlag(5, True)
print shape.getFlag(5)
rotoCurve.changed()
Also, its interesting to note that if I create a shape inside a
rotopaint node, open it manually via right-click on the viewer and check
it with getFlag(5), the result is still False.
Magno.
On 04/04/2012 12:51, Magno Borgo wrote:
Trying to open/close roto shapes via python, just like we can do when
you right-click on the viewer "open/close shape", any pointers?
Is it a shape attribute or a flag somewhere?
Hello Magno,
It's the eOpenFlag on the shape.
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-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