you will have to assign a knobChanged callback to the node that
activates/deactivates knobs depending on the state of your checkbox.
So with a node called NoOp1, a checkbox called "active" and a slider
called "test", this would be a (rough) example:
node = nuke.toNode('NoOp1')
code =
'''nuke.thisNode()['test'].setEnabled(nuke.thisNode()['active'].value())'''
node['knobChanged'].setValue(code)
The result:
NoOp {
name NoOp1
knobChanged
"nuke.thisNode()\['test'].setEnabled(nuke.thisNode()\['active'].value())"
addUserKnob {20 User}
addUserKnob {6 active +STARTLINE}
addUserKnob {7 test +DISABLED}
}
On 10/07/12 10:43 AM, Aélis Héraud wrote:
Hi,
I've a gizmo-related question.
Does anyone know how to mimic the Enable/Disable ''visual'' behavior
from Nuke's native nodes in the UI ?
I've a enable/disable checkbox in my gizmo. It works perfectly but
I'd like to have the ''grey inactive boxes thing'' when the checkbox
is turned off, like in the IBKgizmo.
Any idea how I could do that ?
Thx
Aélis
_______________________________________________
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