Nathan,

That worked perfectly - thanks!

Rich


On Jul 22, 2013, at 2:52 PM, Richard Bobo <[email protected]> wrote:

> Nathan,
> 
> Thanks! I was already using super to add some stuff to the "show' function 
> and 'showPanel', so that makes sense. I'll give it a try…
> 
> Rich
> 
> 
> On Jul 22, 2013, at 1:11 PM, Nathan Rusch <[email protected]> wrote:
> 
>> The simplest way to accomplish this is to override one of the methods Nuke 
>> calls to set up a panel (I would probably use either `create` or 
>> `addToPane`).
>>  
>> class TestPanel(nukescripts.PythonPanel):
>>     def addToPane(self, pane=None):
>>         super(TestPanel, self).addToPane(pane=pane)
>>         # Do your custom setup work here
>>  
>>  
>> -Nathan
>> 
>>  
>> From: Richard Bobo
>> Sent: Tuesday, July 16, 2013 11:55 AM
>> To: Nuke Python discussion
>> Subject: [Nuke-python] Pane Menu / knobChanged question...
>>  
>> Hi,
>>  
>> I'm trying to figure out what mechanism exposes/adds control panels to the 
>> Properties Panel when you pick them via the Pane menu…?  For example, when 
>> executing a command for something like the SearchReplace python panel, you 
>> right-click on the Properties tab, zip down to the Pane menu and click on 
>> the SearchReplace item on the submenu and the panel is added to the 
>> Properties bin. When it does this, it does not seem to use "showPanel" to do 
>> it. If, instead, I use a hot key to startup the SearchReplace panel, it does 
>> use showPanel to open it.
>>  
>> The reason I'd like to know what mechanism is opening the panel from the 
>> Pane menu is because I want to run some functions on a panel *before* it 
>> opens in the Properties bin. I was trying to use a knobChanged test  --  if 
>> knob.name() == 'showPanel':  --  to trigger the pre-opening functions to 
>> run. That works in the case of a hot key which uses showPanel but, since 
>> adding panels via the Pane menu does not seem to use showPanel, that's not 
>> working…
>>  
>> So, does anyone know what hidden knob or command I could use as a trigger in 
>> knobChanged to detect when a panel is getting opened via the Pane menu…? (I 
>> hope that's clear.)
>>  
>> Thanks for any help!
>>  
>> Rich
>>  
>> 
>> Rich Bobo
>> Senior VFX Compositor
>> Armstrong-White
>> http://armstrong-white.com/
>>  
>> Email:  [email protected]
>> Mobile:  (248) 840-2665
>> Web:  http://richbobo.com/
>>  
>> "That only which we have within, can we see without. If we meet no Gods, it 
>> is because we harbor none. If there is a grandeur in you, you will find 
>> grandeur in porters and sweeps."
>> - Ralph Waldo Emerson
>> 
>> 
>> 
>> 
>>  
>> 
>> _______________________________________________
>> Nuke-python mailing list
>> [email protected], http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>> _______________________________________________
>> Nuke-python mailing list
>> [email protected], http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
> 
> _______________________________________________
> Nuke-python mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

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

Reply via email to