Snap To Object Add-On
This project is a small tool made for a 3D art and animation suite called "Blender 3D".
-
Imagine a scenario where you are an artist working on multiple 3D models that need to be organized along the x, y, or z axis in the final scene. ie. designing a small city block may require organizing 3 or 4 building models along the x axis.
-
The tool eases an artist's job by "snapping" selected meshes together - that is, properly stacking them along the specified axis. Currently, this tool works for every two selected meshes(so you cannot stack more than two meshes at a time). The last selected mesh will maintain its location in 3D space, while the first selected mesh will be pulled towards it.
-
The tool allows some room for flexibility by allowing artists to add offset values. For example, to add space between buildings in a city block with ease, you can stack them with some offset between them.
Demos
First look at the tool
Other Issues
-
To implement this tool to work on more than two meshes at a time, we need to know the order in which the artist selected
those meshes in the first place. This information is not available with the Blender Python API - (looking into implementing a
sub-tool for this, if possible).
Testing
- Download Blender 3D, if you haven't done already
-
Clone the repository or download the file MeshAlign.py which can be found here
-
Open a new project and create a text editor window in the viewport, if you don't know how to do this you can check out free tutorials on the website
- Upload the .py file and run the script
- Once the script runs successfully, you can shift select any two object on the 3D viewport
- Press space bar to bring up search menu and look for "Snap To Object"
- You can check out the Demo section of this document for assistance