Nathan,

Agreed. I will try to take some time today to send a bug report.

Rich

Sent from my iPod

On Nov 25, 2013, at 1:01 AM, Nathan Rusch <nathan_ru...@hotmail.com> wrote:

> That definitely sounds like an issue worth reporting.
>  
> -Nathan
> 
>  
> From: Richard Bobo
> Sent: Friday, November 22, 2013 7:48 PM
> To: Nuke Python discussion
> Subject: [Nuke-python] Re: Python Expression in Switch node not updating...
>  
> OK, I think I found a way to make sure that the “ret” value gets used… I 
> added another line to explicitly set the “which” knob value to “ret":
> 
> if 'SE_Preferred' in nuke.thisView():
>     ret = 0
>     nuke.thisKnode.knob(‘which’).setValue(ret)
> elif 'Sport' in nuke.thisView():
>     ret = 1
>     nuke.thisKnode.knob(‘which’).setValue(ret) 
> elif 'Limited_Tech' in nuke.thisView():
>     ret = 2
>     nuke.thisKnode.knob(‘which’).setValue(ret)
> 
> In any case, just using the “ret” variable did not work very well at all. 
> Setting the knob explicitly with thisNode.knob worked while switching views 
> in Nuke. And rendering on the farm…? Well, that worked too! ...Except for one 
> frame, which was still wrong. Go figure...
> 
> So, on Monday, I think I will add one more setValue command to each section 
> and see if hitting it with a hammer twice makes it work 100% of the time for 
> rendering… Maybe I need a bigger hammer…   (8^\
> 
> Happy Weekend,
> Rich
> 
> 
> 
>  
> On Nov 22, 2013, at 3:32 PM, Richard Bobo <richb...@mac.com> wrote:
> 
>> Hi,
>>  
>> I'm having a problem with getting an expression-driven Switch node to 
>> reliably update. And, I'm wondering if this a known problem or if I need to 
>> do something different with my expression...?
>>  
>> -- In my Switch node, I have an expression on the "which" knob like this:
>>  
>> if 'SE_Preferred' in nuke.thisView():
>>  
>>     ret = 0
>> elif 'Sport' in nuke.thisView():
>>     ret = 1
>> elif 'Limited_Tech' in nuke.thisView():
>>     ret = 2
>>  
>> (Yes, I have all of the expression option buttons turned on for multi-line, 
>> Python mode and using the "ret" variable...)
>>  
>> So, based on my selected view, the switch should change the knob - and it 
>> does... sort of. For example, if I use the views hotkeys to go through all 
>> the views, one by one, it switches, but it is always one view change behind. 
>> The updating seems to lag - like maybe the Python is being evaluated, but 
>> the switch is not updating until the next time around. And, when I render my 
>> script on the farm, the switch does not seem to be evaluating correctly at 
>> all.
>>  
>> Is there some way to force an update on the switch or is this just a bug...?
>>  
>> Thanks for any help,
>> Rich
>>  
>> 
>> Rich Bobo
>> Senior VFX Compositor
>> Armstrong-White
>> http://armstrong-white.com/
>>  
>> Email:  richb...@mac.com
>> Mobile:  (248) 840-2665
>> Web:  http://richbobo.com/
>> 
>> "The world stands aside to let anyone pass who knows where he is going."
>> - David Starr Jordan
> 
> _______________________________________________
> Nuke-python mailing list
> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
> _______________________________________________
> Nuke-python mailing list
> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to