LayoutDialog with arguments

Become a member of the CGSociety

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

Thread Tools Display Modes
  12 December 2011
LayoutDialog with arguments

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

which i call with this:

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

generates the following error:

Quote: 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?
  12 December 2011
unintentional, sorry...
..aut inveniam viam aut faciam..
::Copy SOP 4 Maya::
  12 December 2011
i found the solution:
result = cmds.layoutDialog(ui = 'csGetShotChooseSavePathUI('+str(userVersions)+')' )

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

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
Society of Digital Artists

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

All times are GMT. The time now is 11:55 AM.

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