tbaypaul
11-22-2006, 07:03 PM
I am browsing the geometryPaint.mel script in the maya install/script/others folder.
they push the DefaultTemplete onto the stack and then seem to parse the command values via this "#1" thingy...
WHAT the blank does #1 mean? It seems a powerful shortcut to getting values??? They seem to tokenize the ui textfield by using it and directly assigning contol values with it??
so ..example from line 165
where all of the variables are global.
textFieldGrp -label "Geometry:"
-text $geom
-cc "tokenize( \"#1\", $geometryGeom )"
geometryName;
textFieldGrp -label "Identifier:"
-text $geometryIdentifier
-cc "$geometryIdentifier = \"#1\""
geometryIdentifier;
...... more controls.....
checkBoxGrp -ncb 3 -l "Control:"
-l1 "X Scale" -v1 $geometryModifyAttr[0]
-cc1 "$geometryModifyAttr[0] = #1"
-l2 "Y Scale" -v2 $geometryModifyAttr[1]
-cc2 "$geometryModifyAttr[1] = #1"
-l3 "Z Scale" -v3 $geometryModifyAttr[2]
-cc3 "$geometryModifyAttr[2] = #1"
control0;
they push the DefaultTemplete onto the stack and then seem to parse the command values via this "#1" thingy...
WHAT the blank does #1 mean? It seems a powerful shortcut to getting values??? They seem to tokenize the ui textfield by using it and directly assigning contol values with it??
so ..example from line 165
where all of the variables are global.
textFieldGrp -label "Geometry:"
-text $geom
-cc "tokenize( \"#1\", $geometryGeom )"
geometryName;
textFieldGrp -label "Identifier:"
-text $geometryIdentifier
-cc "$geometryIdentifier = \"#1\""
geometryIdentifier;
...... more controls.....
checkBoxGrp -ncb 3 -l "Control:"
-l1 "X Scale" -v1 $geometryModifyAttr[0]
-cc1 "$geometryModifyAttr[0] = #1"
-l2 "Y Scale" -v2 $geometryModifyAttr[1]
-cc2 "$geometryModifyAttr[1] = #1"
-l3 "Z Scale" -v3 $geometryModifyAttr[2]
-cc3 "$geometryModifyAttr[2] = #1"
control0;
