A blog about VFX, scripting, van renovation, and some other gubbins.

@henloco

Maya MEL: Create a locator at selected vertices

Published 28th January 2019 by Henry

// Select the vertices you want a locator at and run this MEL script...

string $vertices[] = `ls -sl -fl`;
for($v in $vertices){
    float $pos[] = `xform -q -ws -t $v`;
    string $newLoc[] = `spaceLocator`;
    setAttr ($newLoc[0]+".translate") $pos[0] $pos[1] $pos[2];
}

More

Previous

Service - HTML5 Level Demo

Next

Setting variables of a spawned actor in Unreal Engine

Leave a Reply

Your email address will not be published. Required fields are marked *