Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2012-06-29 18:34:46 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2012-06-29 18:34:46 +0400
commit83093d677049f6ba085c34d1719906e2ee3cc3d1 (patch)
tree22c356af6a5657cd8bf1b37ddb3ca5503a243d73 /source/blender/makesdna
parent344ca17247accd2848081e69eab00ab7aac4a0ae (diff)
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.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_scene_types.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 6a8022c07a5..02a7d0da325 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -899,7 +899,7 @@ typedef struct ToolSettings {
/* Subdivide Settings */
short cornertype;
- short pad3;
+ short pad1;
/*Triangle to Quad conversion threshold*/
float jointrilimit;
/* Editmode Tools */
@@ -995,12 +995,13 @@ typedef struct ToolSettings {
char edge_mode_live_unwrap;
/* Transform */
- char snap_mode;
+ char snap_mode, snap_node_mode;
+ char pad3;
short snap_flag, snap_target;
short proportional, prop_mode;
char proportional_objects; /* proportional edit, object mode */
char proportional_mask; /* proportional edit, object mode */
- char pad[4];
+ char pad4[2];
char auto_normalize; /*auto normalizing mode in wpaint*/
char multipaint; /* paint multiple bones in wpaint */
@@ -1012,7 +1013,7 @@ typedef struct ToolSettings {
int uv_relax_method;
/* XXX: these sculpt_paint_* fields are deprecated, use the
* unified_paint_settings field instead! */
- short sculpt_paint_settings DNA_DEPRECATED; short pad1;
+ short sculpt_paint_settings DNA_DEPRECATED; short pad5;
int sculpt_paint_unified_size DNA_DEPRECATED;
float sculpt_paint_unified_unprojected_radius DNA_DEPRECATED;
float sculpt_paint_unified_alpha DNA_DEPRECATED;
@@ -1370,6 +1371,9 @@ typedef struct Scene {
#define SCE_SNAP_MODE_EDGE 2
#define SCE_SNAP_MODE_FACE 3
#define SCE_SNAP_MODE_VOLUME 4
+#define SCE_SNAP_MODE_NODE_X 5
+#define SCE_SNAP_MODE_NODE_Y 6
+#define SCE_SNAP_MODE_NODE_XY 7
/* toolsettings->selectmode */
#define SCE_SELECT_VERTEX 1 /* for mesh */