UI help

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 06 June 2007   #1
UI help

Quote: global proc aasLightBox()
{

string $aasLightBox = `window -title ("aasLightBox - v1.5") -wh 430 250`;
columnLayout;
// Creates Render Layers
frameLayout -label "Render Layers" -borderStyle "etchedIn" -font "boldLabelFont" -collapsable 0 -w 425;
rowLayout;
string $myTextFieldButtonGrp;
string $myButtonCommand = "createRenderLayer -name (`textFieldButtonGrp "+" -q -text $myTextFieldButtonGrp`)";

$myTextFieldButtonGrp = `textFieldButtonGrp
-label "Name"
-text ""
-buttonLabel "Create"`;
textFieldButtonGrp -e -bc $myButtonCommand $myTextFieldButtonGrp;
setParent ..;
setParent ..;

frameLayout -label "Render Stats" -borderStyle "etchedIn" -font "boldLabelFont" -collapsable 0 -w 425;
gridLayout -numberOfRowsColumns 1 8 -cellWidthHeight 52 40;
symbolButton -image "S:/Morgue/melScripts/icons/cShadows.bmp" -command "castsShadows" -ann "castShadows";
symbolButton -image "S:/Morgue/melScripts/icons/rShadows.bmp" -command "receiveShadows" -ann "receiveShadows";
symbolButton -image "S:/Morgue/melScripts/icons/mBlur.bmp" -command "mBlur" -ann "Motion Blur";
symbolButton -image "S:/Morgue/melScripts/icons/vIReflections.bmp" -command "visibleInReflections" -ann "visibleInReflections";
symbolButton -image "S:/Morgue/melScripts/icons/vIRefractions.bmp" -command "visibleInRefractions" -ann "visibleInRefractions";
symbolButton -image "S:/Morgue/melScripts/icons/pVisibility.bmp" -command "primaryVisibility" -ann "Primary Visibility";
symbolButton -image "S:/Morgue/melScripts/icons/allOff.bmp" -command "allOff";
symbolButton -image "S:/Morgue/melScripts/icons/allOn.bmp" -command "allOn";
setParent ..;
setParent ..;
showWindow $aasLightBox;

}

This code above is baffling me. When I run the script everything pops up the way it should. But when I select a object to test the render layer part of my script and excute the button. It gives me this error:
Quote: Error: $myTextFieldButtonGrp" is an undeclared variable.

Which this error isn't that baffling, but the baffling part is that I excute the same UI script but without the
Quote: global proc aasLightBox()
The render layer script seems to work. So my main question is why is it not working when the UI script is withing the global proc?
__________________
I dream in wireframes....
 
Old 06 June 2007   #2
$myTextFieldButtonGrp is only variable and has no value.

string $myTextFieldButtonGrp;

.... so you need to give the control a name.
ie.

string $myTextFieldButtonGrp = "myTFB_GRP_1";
string $myButtonCommand = "createRenderLayer -name (`textFieldButtonGrp "+" -q -text $myTextFieldButtonGrp`)";

textFieldButtonGrp -label "Name" -text "" -buttonLabel "Create" $myTextFieldButtonGrp;
textFieldButtonGrp -e -bc $myButtonCommand $myTextFieldButtonGrp;
 
Old 06 June 2007   #3
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
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 12:15 PM.


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