- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi!
The script is supposed to do the following:
1. open a window with 1 button and 1 textfield
2. when the button is pressed i want to create a nurbs circle that is named according to what was typed into the textfield.
When executing the script i get an error saying:
"Error: Line 20.24: "$ctrlName" is an undeclared variable."
This is my script:
//Window creation
if ( `window -exists MyRigging` )
{
deleteUI MyRigging;
}
window -wh 300 500 MyRigging;
//
columnLayout;
string $ctrlName;
text -label "Enter Control Name";
textField -w 100 $ctrlName;
//Button and Procedure:
button -w 110 -h 35 -l "Create FK Control" -command "createFK()" MyButton1;
proc createFK()
{
circle -n $ctrlName;
}
//
//Show the final window
showWindow MyRigging;
//
The problem of the script seems to be that the procedure createFK is not able to call the $ctrlName string. But I am absolutely clueless how i would do that.
Greatly appreciate any help!
Solved! Go to Solution.