[Bf-blender-cvs] [29f25da7692] master: Fix T70324: Layer Brush has bad behaviours and create artifacts
Pablo Dobarro
noreply at git.blender.org
Wed Oct 2 15:56:21 CEST 2019
Commit: 29f25da76924a59e82e5c01d9c54ff75943a1f1a
Author: Pablo Dobarro
Date: Tue Oct 1 20:14:45 2019 +0200
Branches: master
https://developer.blender.org/rB29f25da76924a59e82e5c01d9c54ff75943a1f1a
Fix T70324: Layer Brush has bad behaviours and create artifacts
Reviewed By: brecht
Maniphest Tasks: T70324
Differential Revision: https://developer.blender.org/D5934
===================================================================
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 80be8143630..19eed2d4ec2 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -1429,7 +1429,10 @@ static void calc_area_normal_and_center_task_cb(void *__restrict userdata,
/* Update the test radius to sample the normal using the normal radius of the brush */
if (data->brush->ob_mode == OB_MODE_SCULPT) {
float test_radius = sqrtf(test.radius_squared);
- test_radius *= data->brush->normal_radius_factor;
+ /* Layer brush produces artifacts with normal radius */
+ if (!(ss->cache && data->brush->sculpt_tool == SCULPT_TOOL_LAYER)) {
+ test_radius *= data->brush->normal_radius_factor;
+ }
test.radius_squared = test_radius * test_radius;
}
More information about the Bf-blender-cvs
mailing list