Dynamic window generation

Become a member of the CGSociety

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

Thread Tools Display Modes
  08 August 2012
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);
 	 -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\";"
 	 setParent ..;
 		-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 ..;
 showWindow $nyAlemBakeWindow;

Any thoughts would be greatly appreciated.
  08 August 2012
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 selection...as written by some guy who doesn't really know how to script well.
  08 August 2012
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

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:28 PM.

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