diff options
author | Jacques Lucke <mail@jlucke.com> | 2019-02-19 17:52:49 +0300 |
---|---|---|
committer | Jacques Lucke <mail@jlucke.com> | 2019-02-19 17:52:49 +0300 |
commit | 7c53bca1dd20460ebc4c404c058faeff5afb0ce0 (patch) | |
tree | fbb0dd6e2ebfa0a7b063dcf95fc0bd15e1a05a9f /source/blender/editors/sculpt_paint | |
parent | 655eb8eabd7a2ba73d7bd7dedbd59ed6461c3989 (diff) |
Fix T61702: obmat used incorrectly when calculating constant detail size
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4372
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index d3506b44770..f3b0b32c8d5 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -5157,7 +5157,7 @@ static void sculpt_stroke_update_step(bContext *C, struct PaintStroke *UNUSED(st sculpt_restore_mesh(sd, ob); if (sd->flags & (SCULPT_DYNTOPO_DETAIL_CONSTANT | SCULPT_DYNTOPO_DETAIL_MANUAL)) { - float object_space_constant_detail = mat4_to_scale(ob->obmat) / sd->constant_detail; + float object_space_constant_detail = 1.0f / (sd->constant_detail * mat4_to_scale(ob->obmat)); BKE_pbvh_bmesh_detail_size_set(ss->pbvh, object_space_constant_detail); } else if (sd->flags & SCULPT_DYNTOPO_DETAIL_BRUSH) { @@ -6104,7 +6104,7 @@ static int sculpt_detail_flood_fill_exec(bContext *C, wmOperator *UNUSED(op)) size = max_fff(dim[0], dim[1], dim[2]); /* update topology size */ - float object_space_constant_detail = mat4_to_scale(ob->obmat) / sd->constant_detail; + float object_space_constant_detail = 1.0f / (sd->constant_detail * mat4_to_scale(ob->obmat)); BKE_pbvh_bmesh_detail_size_set(ss->pbvh, object_space_constant_detail); sculpt_undo_push_begin("Dynamic topology flood fill"); |