Hey Mark,
If the light node's named 'my_light_node', you would do something like:
nuke.toNode('my_light_node')['name'].setValue(new)
Not in front of Nuke at the moment, but that should work (once you change
focus away from the lightName knob, probably).
Cheers,
Ean
On Sat, Aug 11, 2012 at 7:25 AM, Mark Nettleton <[email protected]> wrote:
> Hi,
>
> I have a Group which contains some Light nodes. The Group has a text entry
> knob.
> When the user enters text into that knob, I want the Light node inside the
> group to be renamed using the entered text.
>
> How do I do that?
>
> Thanks!
>
>
> set cut_paste_input [stack 0]
> version 6.3 v8
> push $cut_paste_input
> Group {
> name Group
> knobChanged "
> n = nuke.thisNode()
> k = nuke.thisKnob()
> if k.name() == \"lightName\":
> if n\['lightName'].value() != \"\":
> new = (n\['lightName'].getValue())
> #insert clever bit of code here to change name of Light node inside
> Group.
> n.setName(\"Group_Updated\")
> "
> selected true
> xpos 191
> ypos 76
> addUserKnob {20 User}
> addUserKnob {1 lightName l "Light name"}
> lightName "New light name"
> }
> Input {
> inputs 0
> name Input1
> xpos 210
> ypos 17
> }
> Light2 {
> name Light1
> xpos 220
> ypos 66
> }
> Output {
> name Output1
> xpos 210
> ypos 158
> }
> end_group
>
> ______________________________**_________________
> Nuke-users mailing list
> [email protected].**co.uk<[email protected]>,
> http://forums.thefoundry.co.**uk/ <http://forums.thefoundry.co.uk/>
> http://support.thefoundry.co.**uk/cgi-bin/mailman/listinfo/**nuke-users<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