Home Technical Talk

Free Maya Script - Tinny script for easy align

FredKoch85
polycounter lvl 2
Offline / Send Message
FredKoch85 polycounter lvl 2
HI. i am new this mel scripts but i wan to share this you some little mel script to easy align/snap object like 3ds max do, may be some of you it will be usefull
like this
like this..

assign hotkey for press/release this mel code :

//for PressPart 
float $posA[] = `pointPosition -l`;  
SelectVertexMask; ///convert to objectMode
SelectToggleMode;
TranslateToolWithSnapMarkingMenu;
buildTranslateMM;
setToolTo $gMove;
changeToolIcon;
TranslateToolWithSnapMarkingMenuPopDown;
MarkingMenuPopDown;
if (`popupMenu -exists tempMM`) { deleteUI tempMM; }if (`popupMenu -exists tempMM2`) { deleteUI tempMM2; };
float $revPivos[] = `xform -q -t .scalePivot`; 
xform -pivots $posA[0] $posA[1] $posA[2] ;
dR_DoCmd("pointSnapPress");


//and for Release
xform -pivots $revPivos[0] $revPivos[1] $revPivos[2] ;
dR_DoCmd("pointSnapRelease");

so how it work. select one vertex push button (hold it)  and snap to whatever u want.

Sign In or Register to comment.