[Bf-blender-cvs] [50eed6e54f8] sculpt-dev: Merge branch 'master' into sculpt-dev
Pablo Dobarro
noreply at git.blender.org
Wed Feb 10 21:33:16 CET 2021
Commit: 50eed6e54f838b5578a101dc681651ec16c090fb
Author: Pablo Dobarro
Date: Wed Feb 10 01:45:53 2021 +0100
Branches: sculpt-dev
https://developer.blender.org/rB50eed6e54f838b5578a101dc681651ec16c090fb
Merge branch 'master' into sculpt-dev
===================================================================
===================================================================
diff --cc source/blender/editors/sculpt_paint/paint_mask.c
index a5868f0c4b5,bacb3b549e3..0915a0ab0ee
--- a/source/blender/editors/sculpt_paint/paint_mask.c
+++ b/source/blender/editors/sculpt_paint/paint_mask.c
@@@ -1098,24 -1070,14 +1101,20 @@@ static void sculpt_gesture_trim_calcula
/* When using normal orientation, if the stroke started over the mesh, position the mid point
* at 0 distance from the shape plane. This positions the trimming shape half inside of the
* surface. */
- mid_point_depth = ss->gesture_initial_hit ?
- 0.0f :
- (trim_operation->depth_back + trim_operation->depth_front) * 0.5f;
-
-
+ if (SCULPT_GESTURE_TRIM_LOCATION_DEPTH_VOLUME) {
+ mid_point_depth = ss->gesture_initial_hit ?
+ dist_signed_to_plane_v3(world_space_gesture_initial_location,
+ shape_plane) :
+ (trim_operation->depth_back + trim_operation->depth_front) * 0.5f;
+ }
+ else {
+ mid_point_depth = ss->gesture_initial_hit ?
+ 0.0f :
+ (trim_operation->depth_back + trim_operation->depth_front) * 0.5f;
+ }
}
- Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
- Brush *brush = BKE_paint_brush(&sd->paint);
- Scene *scene = CTX_data_scene(C);
- const float depth_radius = BKE_brush_unprojected_radius_get(scene, brush);
-
+ const float depth_radius = ss->cursor_radius;
trim_operation->depth_front = mid_point_depth - depth_radius;
trim_operation->depth_back = mid_point_depth + depth_radius;
}
More information about the Bf-blender-cvs
mailing list