[Bf-blender-cvs] [87f4c830180] blender2.8: Object Mode: Grid: Allow more subdivision in orthographic views
Clément Foucault
noreply at git.blender.org
Tue Oct 30 16:44:35 CET 2018
Commit: 87f4c830180d0590c62eece483f2231e01dea4b2
Author: Clément Foucault
Date: Tue Oct 30 16:44:02 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB87f4c830180d0590c62eece483f2231e01dea4b2
Object Mode: Grid: Allow more subdivision in orthographic views
2.7x was displaying 2 additional subdivision for theses views. Bumping to 3
just to say we improved it!
Hypothetically it can be increased as much as we want but float precision
can quickly become an issue.
===================================================================
M source/blender/draw/modes/object_mode.c
===================================================================
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c
index b494fbc740e..472de8ba47f 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -502,6 +502,11 @@ static void OBJECT_engine_init(void *vedata)
}
else {
+ if (rv3d->view != RV3D_VIEW_USER) {
+ /* Allow 3 more subdivisions. */
+ grid_scale /= powf(v3d->gridsubdiv, 3);
+ }
+
float viewdist = 1.0f / max_ff(fabsf(winmat[0][0]), fabsf(winmat[1][1]));
grid_res = viewdist / grid_scale;
More information about the Bf-blender-cvs
mailing list