Sub topic 13
Snapping to Increments and Scene Elements
This chapter assumes you can already move, rotate, and scale objects with G, R, and S. It also assumes you can constrain a transform to an axis and type values, and that you know pivot points and transform orientations. Snapping builds on those. It changes where a transform lands instead of how the transform is defined.
Snapping makes a transform jump to useful values. Those values are either regular steps (increments) or the positions of other things in the scene, such as vertices, edges, and faces. It is the quick way to place objects precisely when you don't need to type a number.
Turning snapping on
There are two ways to snap, and they behave differently.
- Persistent snapping. Click the magnet icon in the 3D Viewport header, or press Shift+Tab, to switch snapping on for every transform. The icon stays highlighted while it is on.
- Temporary snapping. Hold Ctrl while you drag or while a G, R, or S transform is running. Snapping is active only while the key is held.
Ctrl is an inverter. With the magnet off, holding Ctrl turns snapping on. With the magnet on, holding Ctrl turns it off for that moment. You can press and release Ctrl in the middle of a transform and the object follows.
Increment snapping
Increment is the default Snap To mode. The object moves, rotates, or scales in fixed steps.
| Transform | Ctrl (default step) | Ctrl+Shift (fine step) |
|---|---|---|
| Move | One grid unit as drawn in the viewport | One tenth of that |
| Rotate | 5 degrees | 1 degree |
| Scale | 0.1 | 0.01 |
The move step follows the grid you see. When you zoom in, the grid subdivides and the step gets smaller. When you zoom out, it gets larger. Zoom level therefore changes the step. If your object moves in unexpected amounts, check how far you are zoomed.
In recent versions you can change the rotation step. Open the Snapping popover (the arrow beside the magnet) and look for the rotation increment field.
Relative versus absolute increments
By default, increments are relative to the start of the transform. An object at x = 0.3 moved one step lands at x = 1.3, so it keeps its 0.3 offset. This is useful when you want to shift something by exact amounts without disturbing its alignment.
Enable Absolute Grid Snap in the Snapping popover to snap to the grid itself. The same object then lands at x = 1.0. Choose absolute snapping when you want objects to sit on grid lines, for example when laying out a modular floor.
Snapping to scene elements
Open the Snapping popover to choose the Snap To targets. The available elements depend on your Blender version. In Blender 4.0 and later they are:
- Vertex: snaps to the nearest vertex of another object.
- Edge: snaps to the closest point along an edge.
- Edge Center: snaps to an edge's midpoint.
- Edge Perpendicular: snaps so the move meets an edge at a right angle.
- Face Project: projects the object onto the face under the cursor, along your view direction.
- Face Nearest: snaps to the closest point on a face.
- Volume: places the object inside the volume of the mesh under the cursor.
- Increment: the step snapping from the previous section.
In 4.0 and later you can enable several at once, and Blender picks the closest match. In 3.x you choose one element, and Face is a single option.
Example of a vertex snap:
- Select a cube and press G.
- Hold Ctrl with Snap To set to Vertex.
- Move the cursor over a vertex of a second object.
- A snap marker appears. Click to confirm, and the cube lands on that vertex.
Snapping to elements only considers other objects in the scene. The selected objects themselves are excluded.
Snap Base: which point lands on the target
Snapping moves a point on your selection onto the target, so you must decide which point. This setting is called Snap Base in 4.0 and later, and Snap With in earlier versions.
| Option | The point that snaps |
|---|---|
| Closest | The selected vertex or bounding box corner closest to the target |
| Center | The pivot point |
| Median | The median of the selected geometry |
| Active | The active object's origin |
Closest is the best choice for stacking and docking, because the nearest corner or vertex of your object meets the target. Center and Active are better when you want an origin to land at an exact spot, such as an object's origin on a vertex.
If the object lands somewhere you did not expect, the Snap Base setting is the first thing to check.
Useful options in the popover
- Align Rotation to Target: when snapping to faces, rotates the object so its local Z axis follows the face normal. This is how you place a lamp flat against a sloped roof.
- Affect: toggles for Move, Rotate, and Scale decide which transform types snap at all. Turn off Scale if you want snapping while moving but free scaling.
- Backface Culling: ignores faces pointing away from the view, so you don't snap to a surface you can't see.
- Include and Exclude options: control whether the active object, objects being edited, or unselectable objects count as targets.
Combining snapping with constraints
Snapping works together with axis constraints. Press G, then X, then hold Ctrl, and the object slides along the X axis in steps. With element snapping, the object lands at the point on the X axis closest to the target element. You can place something level with another object's vertex without disturbing its other coordinates.
Typed values take priority. If you type 2 during a transform, the typed number wins and the snap has no effect.
Snapping from Python
Snapping settings live on the scene's tool settings. This script turns on persistent vertex snapping and sets a rotation step of 15 degrees. Rotation increments are stored in radians.
import bpy
import math
ts = bpy.context.scene.tool_settings
ts.use_snap = True
ts.snap_elements = {'VERTEX'}
ts.snap_angle_increment_3d = math.radians(15)
print(ts.use_snap, ts.snap_elements)The snapping setting only affects interactive transforms. Setting obj.location in a script never snaps. If you want grid-aligned values from a script, round them yourself:
import bpy
step = 0.5
obj = bpy.context.active_object
obj.location = tuple(round(v / step) * step for v in obj.location)
print(obj.name, obj.location)This acts like an absolute grid snap with a 0.5 step.
Common problems
- Nothing snaps. Check that the magnet is on and that you are not holding Ctrl by mistake, which inverts it. Also confirm the Affect toggle for your transform type is enabled.
- Steps seem random. The move step depends on zoom. Zoom in for finer steps, or use Ctrl+Shift.
- The object lands off the target. Check Snap Base. Closest and Center give different results.
- Face snapping tilts the object. Align Rotation to Target is on. Turn it off if you want to keep the rotation.
- Objects cannot be snapped to. Hidden objects and, depending on your settings, unselectable ones are not valid targets.
Exercise
The magnet icon is on and Absolute Grid Snap is off. A cube at x = 0.3 is moved one grid unit along X with Ctrl+Shift held. Does snapping apply, and where does the cube end up?
Show answer
Ctrl inverts the magnet, so holding it turns snapping off. The cube moves freely, not in steps. Ctrl+Shift would only give fine steps if snapping were otherwise active.
Exercise
You want to place a lamp flat on a sloped roof so it points straight out of the surface. Which Snap To element and which option do you choose?
Show answer
Use Face Project (or Face in 3.x) and enable Align Rotation to Target. The lamp snaps to the face under the cursor and its local Z axis follows the face normal.
Exercise
Write a line of Python that snaps the active object's X location to the nearest multiple of 0.25.
Show answer
obj.location.x = round(obj.location.x / 0.25) * 0.25