diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-06-28 12:47:22 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-06-28 12:47:22 +0400 |
commit | 855b6391ea3ee5eef819cfa73c72e016e461d74b (patch) | |
tree | b969e7905ded2e174478a26224e46c902a302e25 /release | |
parent | edf244cbf70d569484b937f58aa9fd69b4243bd5 (diff) |
Basic snapping in node transform operator.
Snapping actually was working already, but grid spacing was set to 1.0, which is basically pixel size in the node editor. Increased this to 1x grid step for fine snapping and 5x grid step for rough snapping.
Grid drawing in node editor now draws 2 levels in slightly different shades to indicate the different snapping modes better.
Node editor also supports the general use_snap tool setting to enable automatic snapping during transform. For now only the incremental snapping is supported, in future could be extended to enable alignment between nodes in a number of ways.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_node.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 70f0f300f86..d7f25a597ed 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -32,6 +32,7 @@ class NODE_HT_header(Header): snode = context.space_data snode_id = snode.id id_from = snode.id_from + toolsettings = context.tool_settings row = layout.row(align=True) row.template_header() @@ -86,6 +87,10 @@ class NODE_HT_header(Header): layout.separator() + # Snap + row = layout.row(align=True) + row.prop(toolsettings, "use_snap", text="") + layout.template_running_jobs() |