Dear All

can you only have one knobChanged per node?

Can do it via a couple of NoOp nodes inside the group for each knobChanged but 
once again the group GUI does not update

Kind Regards
-adam


> On 12 Feb 2017, at 10:49 AM, adam jones <[email protected]> wrote:
> 
> Dear Vincent
> 
> It does in a way, I was airing towards that as I was getting this error in 
> the console 
> 
> 'TypeError: must be bool, not str’
> 
> I also miss spoke in my original email it is a pull down driving the switch 
> node that is driving  the checkbox. does the switch node not give out indexed 
> numbers
> 
> I think from the example you gave me in cut and paste I can work it out from 
> there, maybe 
> 
> Kind Regards
> -adam
> 
>  
>> On 12 Feb 2017, at 8:31 AM, Vincent Langer <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> maybe you could just paste your group here to make clearer what you are 
>> after.
>> 
>> with python pull down choices return the string not the index number of the 
>> current choice.
>> but the knob has the function .values() which returns a list of each option 
>> in the pulldown.
>> 
>> does this help you?
>> 
>> cheers,
>> VIncent
>> 
>> 2017-02-11 22:24 GMT+01:00 Vincent Langer <[email protected] 
>> <mailto:[email protected]>>:
>> I am not sure if that is what you are looking for:
>> 
>> set cut_paste_input [stack 0]
>> version 10.0 v4
>> push $cut_paste_input
>> Group {
>>  name Group1
>>  knobChanged "\nthis = nuke.thisNode()\nk = nuke.thisKnob()\n\nif k.name 
>> <http://k.name/>() == \"UseRGBKnob\":\n    if k.value() == \"Yes\":\n        
>> this\[\"RGB\"].setEnabled(True)\n    else:\n            
>> this\[\"RGB\"].setEnabled(False)\n"
>>  selected true
>>  xpos 168
>>  ypos -18
>>  addUserKnob {20 User}
>>  addUserKnob {4 UseRGBKnob M {Yes No}}
>>  addUserKnob {18 RGB}
>>  RGB {0 0 0}
>>  addUserKnob {6 RGB_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
>> }
>>  Input {
>>   inputs 0
>>   name Input1
>>   xpos 123
>>   ypos -67
>>  }
>>  NoOp {
>>   name NoOp1
>>   xpos 123
>>   ypos -27
>>  }
>>  Output {
>>   name Output1
>>   xpos 123
>>   ypos 73
>>  }
>> end_group
>> 
>> 
>> 2017-02-11 8:41 GMT+01:00 adam jones <[email protected] 
>> <mailto:[email protected]>>:
>> Dear all
>> 
>> So I really tried to work this out myself but I am stuck
>> 
>> I have set up a RGB knob and a check box to enable and disable it using
>> 
>> this snippet (frank posted it years back, thank you)
>> 
>> node = nuke.toNode('NoOp1')
>> code = 
>> '''nuke.thisNode()['pickDS'].setEnabled(nuke.thisNode()['enablePick'].value())'''
>> node['knobChanged'].setValue(code)
>> 
>> this works great,
>> 
>> interesting thing could not create it inside a group, created it outside of 
>> the group and cut and pasted into the group and all good
>> 
>> then I placed and expression on the check box to connect it to a pull down 
>> choice
>> 
>> switch1 > 3 ? 1 : 0 this switch node is connected to a pulldown choice on 
>> the groups GUI
>> 
>> it first appeared as though it was not working, the checkBox would update 
>> but nothing would (RGB) knob would not update its state in the GUI of the 
>> group unless I closed and re opened the NoOp1 node inside the group.
>> 
>> and it does what is expected, so I guess the question is how do I get the 
>> interface to update with out doing what I explained
>> 
>> Does that make sense
>> 
>> Kind Regards
>> -adam_______________________________________________
>> Nuke-users mailing list
>> [email protected] 
>> <mailto:[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>
>> 
>> 
>> 
>> -- 
>> Vincent Langer
>> Uhlandstr. 29
>> 71634 Ludwigsburg
>> +49 176 965 177 61 <tel:+49%20176%2096517761>
>> www.vincentlanger.com <http://www.vincentlanger.com/>
>> 
>> 
>> 
>> -- 
>> Vincent Langer
>> Uhlandstr. 29
>> 71634 Ludwigsburg
>> +49 176 965 177 61
>> www.vincentlanger.com <http://www.vincentlanger.com/>
>> _______________________________________________
>> Nuke-users mailing list
>> [email protected] 
>> <mailto:[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

_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to