Wow, thanks Falko!  I really appreciate it!  this is perfect!  I owe you one!
best-
-Nat Jencks

On May 10, 2013, at 6:56 AM, Falko Paeper <[email protected]> wrote:

> For some reason i got an ">" in the text input :). Of course this has to be 
> deleted and than replace pos3.z expression with this:
> 
> [expr {[lindex [split [lindex [split [lindex [split [knob  text] "("] 3] ")"] 
> 0] " "] 2]}]
> 
> best
> falko
> 
> 
> Zitat von Falko Paeper <[email protected]>:
> 
>> This probably makes it easier to understand:
>> 
>> set cut_paste_input [stack 0]
>> version 7.0 v4
>> push $cut_paste_input
>> PostageStamp {
>> name PostageStamp3
>> label "\[expr \{\[lindex \[split \[lindex \[split \[lindex \[split \[knob  
>> text] \"(\"] 1] \")\"] 0] \" \"] 2]\}]"
>> selected true
>> xpos -300
>> ypos -172
>> hide_input true
>> postage_stamp true
>> addUserKnob {20 User}
>> addUserKnob {13 pos1}
>> pos1 {{"\[expr \{\[lindex \[split \[lindex \[split \[lindex \[split \[knob  
>> text] \"(\"] 1] \")\"] 0] \" \"] 0]\}]"} {"\[expr \{\[lindex \[split 
>> \[lindex \[split \[lindex \[split \[knob  text] \"(\"] 1] \")\"] 0] \" \"] 
>> 1]\}]"} {"\[expr \{\[lindex \[split \[lindex \[split \[lindex \[split \[knob 
>>  text] \"(\"] 1] \")\"] 0] \" \"] 2]\}]"}}
>> addUserKnob {13 pos2}
>> pos2 {{"\[expr \{\[lindex \[split \[lindex \[split \[lindex \[split \[knob  
>> text] \"(\"] 2] \")\"] 0] \" \"] 0]\}]"} {"\[expr \{\[lindex \[split 
>> \[lindex \[split \[lindex \[split \[knob  text] \"(\"] 2] \")\"] 0] \" \"] 
>> 1]\}]"} {"\[expr \{\[lindex \[split \[lindex \[split \[lindex \[split \[knob 
>>  text] \"(\"] 2] \")\"] 0] \" \"] 2]\}]"}}
>> addUserKnob {13 pos3}
>> pos3 {{"\[expr \{\[lindex \[split \[lindex \[split \[lindex \[split \[knob  
>> text] \"(\"] 3] \")\"] 0] \" \"] 0]\}]"} {"\[expr \{\[lindex \[split 
>> \[lindex \[split \[lindex \[split \[knob  text] \"(\"] 3] \")\"] 0] \" \"] 
>> 2]\}]"} {"\[expr \{\[lindex \[split \[lindex \[split \[lindex \[split \[knob 
>>  text] \"(\"] 3] \")\"] 0] \" \"] 3]\}]"}}
>> addUserKnob {1 text}
>> text "(1.1223 1.1881 1.2673)(0.1574 0.1245 0.0909)(2.0573 \n> 2.0574 2.0575)"
>> }
>> 
>> 
>> best
>> falko
>> 
>> 
>> Zitat von Falko Paeper <[email protected]>:
>> 
>>> Try this:
>>> 
>>> set cut_paste_input [stack 0]
>>> version 7.0 v4
>>> push $cut_paste_input
>>> PostageStamp {
>>> name PostageStamp1
>>> label "\[expr \{\[lindex \[split \[lindex \[split \[lindex \[split \[knob  
>>> text] \"(\"] 1] \")\"] 0] \" \"] 2]\}]"
>>> selected true
>>> xpos -112
>>> ypos -207
>>> hide_input true
>>> postage_stamp true
>>> addUserKnob {20 User}
>>> addUserKnob {1 text}
>>> text "(1.1223 1.1881 1.2673)(0.1574 0.1245 0.0909)(2.0573 \n> 2.0574 
>>> 2.0575)"
>>> }
>>> 
>>> Use the first number(1) to select one of the three bracket pairs. The 
>>> second number(0) just deletes the last braket so no need to change that. 
>>> And the last one (2) selects the single values inside each braket pairs.
>>> 
>>> best
>>> falko
>>> 
>>> 
>>> Zitat von Nat Jencks <[email protected]>:
>>> 
>>>> Hi, sorry for the relatively simple question, but I'm relatively 
>>>> inexperienced with TCL and Python in nuke and this seems like it should be 
>>>> very easy.
>>>> 
>>>> I have a text string defined as a userknob which I have called 
>>>> CDL_TextValues. This contains a user enterable string which will be in teh 
>>>> format of "(1.1223 1.1881 1.2673)(0.1574 0.1245 0.0909)(2.0576 2.0576 
>>>> 2.0576)" I just need to take these individual numeric values and enter 
>>>> them into specific variables which can be defintes as an expression, in my 
>>>> case, the OCIOCDLTransform node.
>>>> 
>>>> I'd liek to use a range funciton to simply take the 2nd through 7th 
>>>> character and use that number.
>>>> 
>>>> So I'd like to set the expression for my value to be range (CDL_TextValues 
>>>> 2 7). But I can't get it to work... seems liek the native TCL commands 
>>>> dont support the range function, and I'm not sure how to do this.
>>>> 
>>>> Thanks for any help!
>>>> 
>>>> best-
>>>> -Nat Jencks
>>>> 
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Nuke-users mailing list
>>>> [email protected], http://forums.thefoundry.co.uk/
>>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>>> 
>>> 
>>> 
>>> 
>>> __________________________________________________
>>> Falko Paeper
>>> 
>>> Tel. 0173 74 84 449
>>> [email protected] | [email protected]
>>> Skype: fpaeper
>>> Karlsplatz 1 | 71638-Ludwigsburg
>>> 
>>> ----------------------------------------------------------------
>>> This message was sent using IMP, the Internet Messaging Program.
>>> 
>>> _______________________________________________
>>> Nuke-users mailing list
>>> [email protected], http://forums.thefoundry.co.uk/
>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>> 
>> 
>> 
>> 
>> __________________________________________________
>> Falko Paeper
>> 
>> Tel. 0173 74 84 449
>> [email protected] | [email protected]
>> Skype: fpaeper
>> Karlsplatz 1 | 71638-Ludwigsburg
>> 
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.
>> 
>> _______________________________________________
>> Nuke-users mailing list
>> [email protected], http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>> 
> 
> 
> 
> __________________________________________________
> Falko Paeper
> 
> Tel. 0173 74 84 449
> [email protected] | [email protected]
> Skype: fpaeper
> Karlsplatz 1 | 71638-Ludwigsburg
> 
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
> 
> _______________________________________________
> 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