diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-11-06 21:46:32 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-11-06 21:46:32 +0400 |
commit | 73986000902c34020f581a6ef7395a9259b7f6c2 (patch) | |
tree | b79234644a3b81a66514abb3fe9e16e877294050 /source/blender/makesdna | |
parent | 480d4317ded845dd69d167c909807290bddd77ab (diff) |
True grid snapping for nodes: This snaps nodes to the actual background grid instead of using incremental offset (which is not useful for nodes). Increment snapping has been disabled for nodes to avoid
confusion, grid snap is now the default as it seems to be the most wanted and easy to use mode.
Absolute grid snapping happens in a somewhat generic function 'applyGridAbsolute', which could also be used for objects and other transforms later on. It is conceptually similar to the 'project' snapping
option, in that it calculates a delta vector for each element on top of the overall transform, which places each node on the grid.
Node transform now uses the top-left node corner for TransformData->loc. The transform center is still the average of node centers, so that scaling and rotation works nicely.
snapGrid*** functions have been renamed to snapGridIncrement*** to distinguish better between incremental and absolute grid snapping.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 1ddc7d6ee06..ca328423072 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1457,6 +1457,7 @@ typedef struct Scene { #define SCE_SNAP_MODE_NODE_X 5 #define SCE_SNAP_MODE_NODE_Y 6 #define SCE_SNAP_MODE_NODE_XY 7 +#define SCE_SNAP_MODE_GRID 8 /* toolsettings->selectmode */ #define SCE_SELECT_VERTEX 1 /* for mesh */ |