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:
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 2e98d463945..5e1a36e8873 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -6989,9 +6989,11 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, Po
if (BKE_brush_use_size_pressure(scene, brush) &&
paint_supports_dynamic_size(brush, PAINT_MODE_SCULPT)) {
cache->radius = sculpt_brush_dynamic_size_get(brush, cache, cache->initial_radius);
+ cache->dyntopo_radius = cache->initial_radius * cache->pressure;
}
else {
cache->radius = cache->initial_radius;
+ cache->dyntopo_radius = cache->initial_radius;
}
cache->radius_squared = cache->radius * cache->radius;
@@ -7603,11 +7605,12 @@ static void sculpt_stroke_update_step(bContext *C,
BKE_pbvh_bmesh_detail_size_set(ss->pbvh, object_space_constant_detail);
}
else if (sd->flags & SCULPT_DYNTOPO_DETAIL_BRUSH) {
- BKE_pbvh_bmesh_detail_size_set(ss->pbvh, ss->cache->radius * sd->detail_percent / 100.0f);
+ BKE_pbvh_bmesh_detail_size_set(ss->pbvh,
+ ss->cache->dyntopo_radius * sd->detail_percent / 100.0f);
}
else {
BKE_pbvh_bmesh_detail_size_set(ss->pbvh,
- (ss->cache->radius / (float)ups->pixel_radius) *
+ (ss->cache->dyntopo_radius / (float)ups->pixel_radius) *
(float)(sd->detail_size * U.pixelsize) / 0.4f);
}