From 73986000902c34020f581a6ef7395a9259b7f6c2 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Wed, 6 Nov 2013 17:46:32 +0000 Subject: 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. --- release/scripts/startup/bl_ui/space_node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 1721eacd8ac..b9aa3feb607 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -105,7 +105,7 @@ class NODE_HT_header(Header): 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': + if toolsettings.snap_node_element != 'GRID': row.prop(toolsettings, "snap_target", text="") row = layout.row(align=True) -- cgit v1.2.3