diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-06-29 18:34:46 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-06-29 18:34:46 +0400 |
commit | 83093d677049f6ba085c34d1719906e2ee3cc3d1 (patch) | |
tree | 22c356af6a5657cd8bf1b37ddb3ca5503a243d73 /release/scripts | |
parent | 344ca17247accd2848081e69eab00ab7aac4a0ae (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 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_ui/space_node.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index d7f25a597ed..bb29e415c19 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -90,6 +90,9 @@ class NODE_HT_header(Header): # Snap row = layout.row(align=True) row.prop(toolsettings, "use_snap", text="") + row.prop(toolsettings, "snap_node_element", text="", icon_only=True) + if toolsettings.snap_node_element != 'INCREMENT': + row.prop(toolsettings, "snap_target", text="") layout.template_running_jobs() |