Hi Ned.
I’ve done something for the roto node but it works for the rotopaint node too.
give that a go
for i in nuke.selectedNodes():
tc = i['toolbar_paint_color'].getValue()
if tc == [1.0, 1.0, 1.0, 1.0]:
i['toolbar_paint_color'].setValue([0.0, 0.0, 0.0,0.0])
else:
i['toolbar_paint_color'].setValue([1.0, 1.0, 1.0,1.0])
> On 20/12/2016, at 13:25, Ned Wilson <[email protected]> wrote:
>
> Hello all,
>
> I’m going through and cleaning up some dodgy mattes. As such, I am using a
> paint brush and either filling in or removing bits with a black or white
> brush color.
>
> Getting the active RotoPaint node is simple enough.
>
> activeNode = nuke.toNode(nuke.openPanels()[-1])
>
> What I would like to do is switch the brush color between black and white
> with a keyboard shortcut.
>
> Getting the color set is the tricky bit.
>
> The knob in question is “RotoToolboxKnob”, and I can not find any
> documentation on this anywhere. There is some information about setting knob
> defaults, but I can’t seem to figure out the syntax for setting a color.
>
> Anyone come across this before?
>
> -n
>
> _______________________________________________
> Nuke-users mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users