miMayaPlugins/snapToClosest
2024-10-01 19:59:07 +08:00
..
python Initial commit 2024-10-01 19:59:07 +08:00
src Initial commit 2024-10-01 19:59:07 +08:00
CMakeLists.txt Initial commit 2024-10-01 19:59:07 +08:00
README.md Initial commit 2024-10-01 19:59:07 +08:00

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")