LayoutDialog with arguments

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 12 December 2011   #1
LayoutDialog with arguments

one quick stupid question: can i pass parameters to a layoutDialog?
i have something like this:
def chooseSavePath(l):
print l
form = cmds.setParent(q=True)
cmds.formLayout(form, e=True, width=500)


which i call with this:
cmds.layoutDialog(ui=chooseSavePath("lalala"))


the line :
cmds.formLayout(form, e=True, width=500)


generates the following error:

Error: RuntimeError: file <maya console> line 6: Object 'MayaWindow|MainAttributeEditorLayout|formLayout2| AEmenuBarLayout' not found.


If i get rid of the argument it works... How should i do it in order for it to work?
 
Old 12 December 2011   #2
unintentional, sorry...
__________________
..aut inveniam viam aut faciam..
::Copy SOP 4 Maya::
 
Old 12 December 2011   #3
i found the solution:
result = cmds.layoutDialog(ui = 'csGetShotChooseSavePathUI('+str(userVersions)+')' )

and the function csGetShotChooseSavePathUI can't belong to a class.

 
Old 12 December 2011   #4
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 06:49 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.