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-28 12:47:22 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2012-06-28 12:47:22 +0400
commit855b6391ea3ee5eef819cfa73c72e016e461d74b (patch)
treeb969e7905ded2e174478a26224e46c902a302e25 /source/blender/editors/include
parentedf244cbf70d569484b937f58aa9fd69b4243bd5 (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 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/UI_view2d.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h
index 469388219d6..5039a30b61a 100644
--- a/source/blender/editors/include/UI_view2d.h
+++ b/source/blender/editors/include/UI_view2d.h
@@ -166,6 +166,7 @@ void UI_view2d_view_restore(const struct bContext *C);
View2DGrid *UI_view2d_grid_calc(struct Scene *scene, struct View2D *v2d, short xunits, short xclamp, short yunits, short yclamp, int winx, int winy);
void UI_view2d_grid_draw(struct View2D *v2d, View2DGrid *grid, int flag);
void UI_view2d_constant_grid_draw(struct View2D *v2d);
+void UI_view2d_multi_grid_draw(struct View2D *v2d, float step, int level_size, int totlevels);
void UI_view2d_grid_size(View2DGrid *grid, float *r_dx, float *r_dy);
void UI_view2d_grid_free(View2DGrid *grid);