A blog by Henry Lockett about CGI, doing up a van and web development, amongst other things. Soon to be living in London.

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

Week 15

Next

Setting variables of a spawned actor in Unreal Engine

Leave a Reply

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