thehive
03-07-2009, 03:10 PM
i have this global proc and im tryin to it in the the $SpecButtonCMD section an i cant seem to find a good way to add it in there so when you run the button from the textFieldButtonGrp.
if (`window -exists LayerCake`)
deleteUI -window LayerCake;
if (`windowPref -exists LayerCake`)
windowPref -remove LayerCake;
window -t "LayerCake" -w 562 -h 350 LayerCake;
rowLayout;
global proc specular ()
{
setAttr "Specular.specular" 1;
setAttr "Specular.beauty" 0;
setAttr "Specular.color" 0;
setAttr "Specular.shadow" 0;
setAttr "Specular.diffuse" 0;
}
string $SpecTxtfieldGrp;
string $SPECproc = "specular";
//////////////////////////////
string $SpecButtonCMD =
"createRenderLayer -name (`textFieldButtonGrp " +
"-q -text $SpecTxtfieldGrp`);
/////////////////////////////////////////////////
$SpecTxtfieldGrp = `textFieldButtonGrp
-label "layer name"
-text "layer"
-buttonLabel "Make"
-buttonCommand $SpecButtonCMD`;
showWindow;
if (`window -exists LayerCake`)
deleteUI -window LayerCake;
if (`windowPref -exists LayerCake`)
windowPref -remove LayerCake;
window -t "LayerCake" -w 562 -h 350 LayerCake;
rowLayout;
global proc specular ()
{
setAttr "Specular.specular" 1;
setAttr "Specular.beauty" 0;
setAttr "Specular.color" 0;
setAttr "Specular.shadow" 0;
setAttr "Specular.diffuse" 0;
}
string $SpecTxtfieldGrp;
string $SPECproc = "specular";
//////////////////////////////
string $SpecButtonCMD =
"createRenderLayer -name (`textFieldButtonGrp " +
"-q -text $SpecTxtfieldGrp`);
/////////////////////////////////////////////////
$SpecTxtfieldGrp = `textFieldButtonGrp
-label "layer name"
-text "layer"
-buttonLabel "Make"
-buttonCommand $SpecButtonCMD`;
showWindow;
