Hi all,
I recently started getting into MEL and I ran into problems here and there... usualy I manage to solve them myself, but this time im very frustrated, and you guys are not my last hope, but Im hoping you will manage to help me out.
As the title says, im writing a little code, and i have a button that calls out a procedure, and this procedure does it's magic and doesnt return anything...
here is a simplified version of what im trying to get:
//you basicaly select vertices.
{
string $gExVsA[];
string $gExVsB[];
global proc string[] sourceVs() {
string $srcVsA[] = ls -sl
;
string $gExVsA[] = filterExpand -sm 31 $srcVsA
;
print $gExVsA; //this prints all the stuff
return $gExVsA; //seposingly returns something?
}
proc magic() {
print $gExVsA; //prints nothing
print $gExVsB; //prints nothing
}
}
//create a window and store namestring
$win = window -title "magic button"
;
window -e -width 200 -height 100 $win;
//assign layout
columnLayout;
//define buttons
button -label "source" -command sourceVs;
button -label "target" -command targetVs;
button -label "MAGIC" -command magic;
button -label "cleanUp" -command cleanup;
//show created window
showWindow;
ignore the missing procedures... "target" is the same as "source"... "cleanUp" just removes unused joints.
thanks alot for any help