blendMinds
12-27-2005, 09:46 AM
hi folks
see this script it's giving error "undetermind string"
i trying to connect to circle to mutiplydivide node
how we can call the string in global procedure
window;
columnLayout ;
textFieldButtonGrp -l "GlobalCurve:" -bl "sel" -bc "globalsel" my;
button -l"scaleJoints" -c("apply");
showWindow;
global proc globalsel()
{ string $objs[0];
$objs = `ls -sl`;
if (size($objs) == 0)
error "You have nothing selected, try again.";
$shape = `listRelatives -f -c $objs[0]`;
if (`nodeType $shape[0]` != "nurbsCurve")
error "You don't have a nurbs curve selected.\n";
textFieldButtonGrp -e -tx $objs[0] my;
}
global proc apply ()
{
string $curvesrt;
$curvesrt=`textFieldButtonGrp -q -tx my`;
$cmd = "Do ";
$cmd += "\"";
evalEcho $cmd;
}
global proc Do(string $curvesrt)
{
$curvesrt=`textFieldButtonGrp -q -tx my`;
string $globalScale;
string $curveScale;
$curveScale =`createNode multiplyDivide`;
$globalScale=`createNode multiplyDivide`;
setAttr ($globalScale +".operation") 1;
$ty=`getAttr($curveScale+".input2X")`;
setAttr($globalScale+".input2X") $ty;
connectAttr ($globalScale+".input2X")($curveScale+".input2X");
connectAttr ($curvesrt+".scaleX")($globalScale+".input1X");
}
thanks
see this script it's giving error "undetermind string"
i trying to connect to circle to mutiplydivide node
how we can call the string in global procedure
window;
columnLayout ;
textFieldButtonGrp -l "GlobalCurve:" -bl "sel" -bc "globalsel" my;
button -l"scaleJoints" -c("apply");
showWindow;
global proc globalsel()
{ string $objs[0];
$objs = `ls -sl`;
if (size($objs) == 0)
error "You have nothing selected, try again.";
$shape = `listRelatives -f -c $objs[0]`;
if (`nodeType $shape[0]` != "nurbsCurve")
error "You don't have a nurbs curve selected.\n";
textFieldButtonGrp -e -tx $objs[0] my;
}
global proc apply ()
{
string $curvesrt;
$curvesrt=`textFieldButtonGrp -q -tx my`;
$cmd = "Do ";
$cmd += "\"";
evalEcho $cmd;
}
global proc Do(string $curvesrt)
{
$curvesrt=`textFieldButtonGrp -q -tx my`;
string $globalScale;
string $curveScale;
$curveScale =`createNode multiplyDivide`;
$globalScale=`createNode multiplyDivide`;
setAttr ($globalScale +".operation") 1;
$ty=`getAttr($curveScale+".input2X")`;
setAttr($globalScale+".input2X") $ty;
connectAttr ($globalScale+".input2X")($curveScale+".input2X");
connectAttr ($curvesrt+".scaleX")($globalScale+".input1X");
}
thanks
