XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : Dynamic window generation

08-02-2012, 08:31 PM
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-02-2012, 09:39 PM
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.

CGTalk Moderation
08-02-2012, 09:39 PM
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.