[Bf-blender-cvs] [55cd481bf2d] master: Fix T62208: constant detail picker not taking object scale into account

Jacques Lucke noreply at git.blender.org
Tue Mar 5 16:45:15 CET 2019


Commit: 55cd481bf2d85df3b7febe75c8f604ef3c5144a0
Author: Jacques Lucke
Date:   Tue Mar 5 16:44:37 2019 +0100
Branches: master
https://developer.blender.org/rB55cd481bf2d85df3b7febe75c8f604ef3c5144a0

Fix T62208: constant detail picker not taking object scale into account

===================================================================

M	source/blender/editors/sculpt_paint/sculpt.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index f3b0b32c8d5..800d9e6d562 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -6185,7 +6185,7 @@ static void sample_detail(bContext *C, int mx, int my)
 
 	if (srd.hit && srd.edge_length > 0.0f) {
 		/* Convert edge length to world space detail resolution. */
-		sd->constant_detail = mat4_to_scale(ob->obmat) / srd.edge_length;
+		sd->constant_detail = 1 / (srd.edge_length * mat4_to_scale(ob->obmat));
 	}
 
 	/* Restore context. */



More information about the Bf-blender-cvs mailing list