miMayaPlugins/snapToClosest/README.md
2024-10-01 19:59:07 +08:00

1.1 KiB

Snap to closest vertices/surface.

Build

MacOS/Linux

mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DMAYA_ROOT_DIR="path/to/maya/dir" ../
cmake --build . --config Release --target install

Windows

cmake -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=Release -DMAYA_ROOT_DIR="path/to/maya/dir" ../
cmake --build . --config Release --target install

Flags

Longname Shortname Argument types default Properties
mode m string C
searchDistance d float 10 C

Python examples

Snap selected vertices to specified closest vertex or surface.

cmds.snapToClosest("Plane1", mode="normal")

cmds.snapToClosest("Plane1", mode="surface")

cmds.snapToClosest("Plane1", mode="vertex")