Extended modes for snapping in the node editor.
authorLukas Toenne <lukas.toenne@googlemail.com>
Fri, 29 Jun 2012 14:34:46 +0000 (14:34 +0000)
committerLukas Toenne <lukas.toenne@googlemail.com>
Fri, 29 Jun 2012 14:34:46 +0000 (14:34 +0000)
commit83093d677049f6ba085c34d1719906e2ee3cc3d1
tree22c356af6a5657cd8bf1b37ddb3ca5503a243d73
parent344ca17247accd2848081e69eab00ab7aac4a0ae
Extended modes for snapping in the node editor.
The transform operators in nodes will now use the unselected nodes to generate snapping points. Unlike object snapping, node snapping works for the x/y axes separately and snaps node borders to same borders of unselected nodes. The sensitive area for node borders extends over the whole view2D range, to enable simple alignment of nodes in both x and y direction.

For snap points in the node editor an additional enum value is stored to indicate the type of node border (left/right/top/bottom). This works as a constraint on possible node alignments: only same border types align with each other.
13 files changed:
release/scripts/startup/bl_ui/space_node.py
source/blender/editors/include/ED_node.h
source/blender/editors/include/ED_transform.h
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform.h
source/blender/editors/transform/transform_constraints.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_snap.c
source/blender/makesdna/DNA_scene_types.h
source/blender/makesrna/RNA_enum_types.h
source/blender/makesrna/intern/rna_scene.c