diff options
author | mano-wii <germano.costa@ig.com.br> | 2019-08-19 17:49:07 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2019-08-19 18:05:57 +0300 |
commit | 4bf37bafc2701afc8d8f7482c1ebbdd5f9db8e3f (patch) | |
tree | c064dc64162dbffb06362d6f698b176956671497 /source/blender/editors/include/ED_view3d.h | |
parent | 3cbf2462391c4adecd5be0bcd3e9654d494d9ed2 (diff) |
View3D Grid: fix imperial grid drawing
This is a step to finish the D4325 and fix the T61286.
Currently the grid is highlighted in steps of 10 out of 10, which is wrong for the imperial units as seen in `buImperialLenDef`.
The idea of the code is to pass the steps of the grid already dimensioned as a uniform.
Another important thing to note is that subdivisions now only affect the grid without unity.
This matches the 2.7x Blender versions.
No performance loss (almost no gain too).
Reviewers: fclem
Subscribers: zlsa, rl.amorato
Differential Revision: https://developer.blender.org/D4379
Diffstat (limited to 'source/blender/editors/include/ED_view3d.h')
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 67dfb184d19..56661b992c4 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -690,6 +690,10 @@ bool ED_view3d_distance_set_from_location(struct RegionView3D *rv3d, float ED_scene_grid_scale(struct Scene *scene, const char **grid_unit); float ED_view3d_grid_scale(struct Scene *scene, struct View3D *v3d, const char **grid_unit); +void ED_view3d_grid_steps(struct Scene *scene, + struct View3D *v3d, + struct RegionView3D *rv3d, + float *r_grid_steps); float ED_view3d_grid_view_scale(struct Scene *scene, struct View3D *v3d, struct RegionView3D *rv3d, |