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/curves_sculpt_grow_shrink.cc')
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_grow_shrink.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_grow_shrink.cc b/source/blender/editors/sculpt_paint/curves_sculpt_grow_shrink.cc
index 8ef18ba7da7..1ee43d98e6f 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_grow_shrink.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_grow_shrink.cc
@@ -342,7 +342,8 @@ struct CurvesEffectOperationExecutor {
void gather_influences_projected(
threading::EnumerableThreadSpecific<Influences> &influences_for_thread)
{
- const Span<float3> positions_cu = curves_->positions();
+ const bke::crazyspace::GeometryDeformation deformation =
+ bke::crazyspace::get_evaluated_curves_deformation(*ctx_.depsgraph, *object_);
float4x4 projection;
ED_view3d_ob_project_mat_get(ctx_.rv3d, object_, projection.values);
@@ -368,8 +369,8 @@ struct CurvesEffectOperationExecutor {
float max_move_distance_cu = 0.0f;
for (const float4x4 &brush_transform_inv : symmetry_brush_transforms_inv) {
for (const int segment_i : points.drop_back(1)) {
- const float3 p1_cu = brush_transform_inv * positions_cu[segment_i];
- const float3 p2_cu = brush_transform_inv * positions_cu[segment_i + 1];
+ const float3 p1_cu = brush_transform_inv * deformation.positions[segment_i];
+ const float3 p2_cu = brush_transform_inv * deformation.positions[segment_i + 1];
float2 p1_re, p2_re;
ED_view3d_project_float_v2_m4(ctx_.region, p1_cu, p1_re, projection.values);
@@ -430,7 +431,8 @@ struct CurvesEffectOperationExecutor {
void gather_influences_spherical(
threading::EnumerableThreadSpecific<Influences> &influences_for_thread)
{
- const Span<float3> positions_cu = curves_->positions();
+ const bke::crazyspace::GeometryDeformation deformation =
+ bke::crazyspace::get_evaluated_curves_deformation(*ctx_.depsgraph, *object_);
float3 brush_pos_start_wo, brush_pos_end_wo;
ED_view3d_win_to_3d(ctx_.v3d,
@@ -468,8 +470,8 @@ struct CurvesEffectOperationExecutor {
const float3 brush_pos_end_transformed_cu = brush_transform * brush_pos_end_cu;
for (const int segment_i : points.drop_back(1)) {
- const float3 &p1_cu = positions_cu[segment_i];
- const float3 &p2_cu = positions_cu[segment_i + 1];
+ const float3 &p1_cu = deformation.positions[segment_i];
+ const float3 &p2_cu = deformation.positions[segment_i + 1];
float3 closest_on_segment_cu;
float3 closest_on_brush_cu;