diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-06-30 11:57:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-06-30 12:14:46 +0300 |
commit | c07bba1b05faf4d7ba0b129f1e178e3b2c6a8064 (patch) | |
tree | 92612eb66fcbd8c3ce8204d39756caf36238870c /source/blender/makesrna | |
parent | 5d3ba4fb80dc5def0a11d894bcba19f4fa08fd23 (diff) |
Transform: add back absolute snapping option
This ensures that vertices are grid-aligned while transforming,
instead of just snapping the input values for translate.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index d61f734e19c..bc05b37c9e4 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -158,10 +158,7 @@ EnumPropertyItem mesh_select_mode_items[] = { }; EnumPropertyItem snap_element_items[] = { - {SCE_SNAP_MODE_INCREMENT, "INCREMENT", ICON_ALIGN, "Grid (increment)", "Snap to increments of grid"}, -#if 0 - {SCE_SNAP_MODE_GRID, "GRID", ICON_SNAP_INCREMENT, "Grid (absolute)", "Snap to grid"}, -#endif + {SCE_SNAP_MODE_INCREMENT, "INCREMENT", ICON_ALIGN, "Increment", "Snap to increments of grid"}, {SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices"}, {SCE_SNAP_MODE_EDGE, "EDGE", ICON_SNAP_EDGE, "Edge", "Snap to edges"}, {SCE_SNAP_MODE_FACE, "FACE", ICON_SNAP_FACE, "Face", "Snap to faces"}, @@ -2218,6 +2215,12 @@ static void rna_def_tool_settings(BlenderRNA *brna) RNA_def_property_ui_icon(prop, ICON_SNAP_NORMAL, 0); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */ + prop = RNA_def_property(srna, "use_snap_grid_absolute", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_ABS_GRID); + RNA_def_property_ui_text(prop, "Absolute Grid Snap", "Grid align vertices during transform"); + RNA_def_property_ui_icon(prop, ICON_SNAP_INCREMENT, 0); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */ + prop = RNA_def_property(srna, "snap_element", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "snap_mode"); RNA_def_property_enum_items(prop, snap_element_items); |