Hm this method may not work... Nuke hangs while the original panel is open, so
I can't get my script to find it to fill in the fields.
Thanks for the advice!
den serras
@ stereoD
From: [email protected]
[mailto:[email protected]] On Behalf Of Jordan O
Sent: Thursday, November 07, 2013 1:50 PM
To: Nuke Python discussion
Subject: Re: [Nuke-python] Filling out a PythonPanel from a different script
do you have still have access to the panel object? I'm still not sure I
understand you fully, but this is how I'd go about modifying an existing panel.
For example, in my case I have an instance as t:
t=TestPanel()
t.show()
t.frameRangeKnob.setValue('blah')
k = nuke.AColor_Knob('asdf')
t.addKnob( k )
t.removeKnob( k )
All these commands can modify the panel after being shown.
Or, if you don't have access to the panel but you know the class name, perhaps
something like this might do the trick?
def find_panels():
results = []
for instance in globals():
if isinstance( eval( instance ), TestPanel ):
results.append( instance )
return results
It's a little dirty, but should do the trick.
On Fri, Nov 8, 2013 at 10:33 AM, Dennis Serras
<[email protected]<mailto:[email protected]>> wrote:
Someone else's code creates the popup - I can't do anything to that code except
run it... I have to launch their script with my script, and somehow fillout
their popup, if that's possible. If not, then I need to fork their code, which
I'm really trying to avoid.
den serras
@ stereoD
From:
[email protected]<mailto:[email protected]>
[mailto:[email protected]<mailto:[email protected]>]
On Behalf Of Jordan O
Sent: Thursday, November 07, 2013 1:29 PM
To: Nuke Python discussion
Subject: Re: [Nuke-python] Filling out a PythonPanel from a different script
Ok, so simple enough, you're making a python panel, adding knobs.
I'm still not sure what you mean by "fill it out" or what it is you'd like to
do with this panel?
cheers,
Jordan
On Fri, Nov 8, 2013 at 10:19 AM, Dennis Serras
<[email protected]<mailto:[email protected]>> wrote:
Dangit, I knew I'd forget to change the header (for an email I started a week
ago but never needed to send).
The PythonPanel comes from a class call with an __init__ that launches the
panel:
def __init__(self, job, shot):
nukescripts.PythonPanel.__init__(self, 'Render Submission')
first = int(nuke.root()['first_frame'].value())
last = int(nuke.root()['last_frame'].value())
self.frameRangeKnob = nuke.String_Knob('fRange', 'Frame Range', '%s-%s'
% (first, last))
self.addKnob(self.frameRangeKnob)
den serras
@ stereoD
From:
[email protected]<mailto:[email protected]>
[mailto:[email protected]<mailto:[email protected]>]
On Behalf Of Jordan O
Sent: Thursday, November 07, 2013 1:10 PM
To: Nuke Python discussion
Subject: Re: [Nuke-python] Finding common & unique "words" in a string
Hi Dennis,
Could you give a little bit more information? E.g. any example code of the
pythonpanel declaration?
And by "filling out" do you mean removing existing knobs and adding your own?
cheers,
Jordan
On Fri, Nov 8, 2013 at 9:56 AM, Dennis Serras
<[email protected]<mailto:[email protected]>> wrote:
Hi folks - I have an odd one. I need to fill in a pythonpanel popup that comes
from a different script. I have access to the other code, but I cannot change
it. I don't want to fork their code if I can help it. Anyone know if filling
out a pythonpanel created by a different function is possible?
den serras
@
senior technical artist | stereo D | deluxe 3D
This e-mail and any attachments are intended only for use by the addressee(s)
named herein and may contain confidential information. If you are not the
intended recipient of this e-mail, you are hereby notified any dissemination,
distribution or copying of this email and any attachments is strictly
prohibited. If you receive this email in error, please immediately notify the
sender by return email and permanently delete the original, any copy and any
printout thereof. The integrity and security of e-mail cannot be guaranteed.
_______________________________________________
Nuke-python mailing list
[email protected]<mailto:[email protected]>,
http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
This e-mail and any attachments are intended only for use by the addressee(s)
named herein and may contain confidential information. If you are not the
intended recipient of this e-mail, you are hereby notified any dissemination,
distribution or copying of this email and any attachments is strictly
prohibited. If you receive this email in error, please immediately notify the
sender by return email and permanently delete the original, any copy and any
printout thereof. The integrity and security of e-mail cannot be guaranteed.
_______________________________________________
Nuke-python mailing list
[email protected]<mailto:[email protected]>,
http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
This e-mail and any attachments are intended only for use by the addressee(s)
named herein and may contain confidential information. If you are not the
intended recipient of this e-mail, you are hereby notified any dissemination,
distribution or copying of this email and any attachments is strictly
prohibited. If you receive this email in error, please immediately notify the
sender by return email and permanently delete the original, any copy and any
printout thereof. The integrity and security of e-mail cannot be guaranteed.
_______________________________________________
Nuke-python mailing list
[email protected]<mailto:[email protected]>,
http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
This e-mail and any attachments are intended only for use by the addressee(s)
named herein and may contain confidential information. If you are not the
intended recipient of this e-mail, you are hereby notified any dissemination,
distribution or copying of this email and any attachments is strictly
prohibited. If you receive this email in error, please immediately notify the
sender by return email and permanently delete the original, any copy and any
printout thereof. The integrity and security of e-mail cannot be guaranteed.
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python