The Object spawn tool was meant to be a quick tool to layout buildings on a grid. After the assets were made you could quickly spawn a grid of locators, to then be replaced with the object with what ever parameters were entered into the tool and it worked pretty well.
Showing posts with label mel. Show all posts
Showing posts with label mel. Show all posts
Monday, May 18, 2015
The Object spawn tool was meant to be a quick tool to layout buildings on a grid. After the assets were made you could quickly spawn a grid of locators, to then be replaced with the object with what ever parameters were entered into the tool and it worked pretty well.
Saturday, November 9, 2013
Mirror Object Tool
The Original idea for the tool I did not come up with I saw some one
else have the tool on there blog and I though it would be a good
excersie in making a simple mel tool. http://ttrentlyta.blogspot.com/2011/10/mel-mirror-on-pivot-tool.html
So Here is my version free to use.
/* *** Mirror Object Tool v 1.0.0 ***
The tool is very simple it makes a duplicate or instance of
the object you has selected over the pivot point in the
"x", "y", or "z" Axis. */
// checks if there is a window with this ID in memory and if so delets it. also ' != `
if (`window -exists M_Window`) { deleteUI -window M_Window; }
window -title "Mirror Object Tool" -widthHeight 300 100 M_Window;
formLayout -numberOfDivisions 50 myForm;
radioButtonGrp
-numberOfRadioButtons 3
-label "select type"
-labelArray3 "x" "y" "z"
-select 1
D_Btn;
button -label "Duplicate object" -command "duplAxis()" myBtn1;
button -label "Instance object" -command "instAxis()" myBtn2;
formLayout -edit
-attachForm D_Btn "top" 10
-attachForm D_Btn "left" -50
-attachForm myBtn1 "bottom" 10
-attachForm myBtn1 "left" 10
-attachForm myBtn2 "bottom" 10
-attachForm myBtn2 "left" 100
myForm;
showWindow M_Window;
proc duplAxis() {
if (`radioButtonGrp -q -select D_Btn` == 1) { duplicate -rr; scale -r -1 1 1; }
if (`radioButtonGrp -q -select D_Btn` == 2) { duplicate -rr; scale -r 1 -1 1; }
if (`radioButtonGrp -q -select D_Btn` == 3) { duplicate -rr; scale -r 1 1 -1; }
}
proc instAxis() {
if (`radioButtonGrp -q -select D_Btn` == 1) { instance; scale -r -1 1 1; }
if (`radioButtonGrp -q -select D_Btn` == 2) { instance; scale -r 1 -1 1; }
if (`radioButtonGrp -q -select D_Btn` == 3) { instance; scale -r 1 1 -1; }
}
Subscribe to:
Posts (Atom)