CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 08-02-2012, 08:31 PM   #1
what the ?!?!
animatedfox's Avatar
Benjamin Fox
Seat 43
Join Date: Feb 2010
Posts: 897
Dynamic window generation

I am trying to make a window that changes depending on the number of objects selected. The window is created without any errors but all the buttons call the proc multiple times. I assume this is because the groupNames are not unique. Which is why I tried the $i stuff. Is this possible?
///....other GUI Stuff int $i=0; for ($eachMesh in $bakeNodes) { columnLayout -columnAttach "left" 1 -cal "left" -rowSpacing 1 -columnWidth ($width - 100); textFieldGrp -text $eachMesh ("bakeMesh"+$i); textFieldButtonGrp -co2 0 50 -adj 2 -cl2 "left" "left" -cw2 0 50 -label "Bake File:" -fi `nyAlemBakeFileName ($eachMesh)` -bl "Browse" -bc "string $path[] = `fileDialog2 -fm 0 -ds 2`; textFieldGrp -e -fi $path[0] \"bakeFile\";" ("bakeFile"+$i); setParent ..; separator; button -align "center" -l "Alem-bake it!" -c ("nyAlemBake (`textFieldGrp -q -text startField`, `textFieldGrp -q -text endField`, `textFieldGrp -q -text bakeMesh"+$i+"`,\ `textFieldButtonGrp -q -text bakeFile"+$i+"`, 1)") ; setParent ..; $i++; } showWindow $nyAlemBakeWindow; }

Any thoughts would be greatly appreciated.
Old 08-02-2012, 09:39 PM   #2
what the ?!?!
animatedfox's Avatar
Benjamin Fox
Seat 43
Join Date: Feb 2010
Posts: 897
Actually my issue was a little farther on down the pipeline.
All figured out.
So, for what its worth this was a little preview of how to create GUI elements based on your written by some guy who doesn't really know how to script well.
Old 08-02-2012, 09:39 PM   #3
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,478
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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 12:53 AM.

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