Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/curves_sculpt_snake_hook.cc
| Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | void execute(SnakeHookOperation &self, | ||||
| curves_id_ = static_cast<Curves *>(object_->data); | curves_id_ = static_cast<Curves *>(object_->data); | ||||
| curves_ = &CurvesGeometry::wrap(curves_id_->geometry); | curves_ = &CurvesGeometry::wrap(curves_id_->geometry); | ||||
| if (curves_->curves_num() == 0) { | if (curves_->curves_num() == 0) { | ||||
| return; | return; | ||||
| } | } | ||||
| transforms_ = CurvesSurfaceTransforms(*object_, curves_id_->surface); | transforms_ = CurvesSurfaceTransforms(*object_, curves_id_->surface); | ||||
| curve_factors_ = get_curves_selection(*curves_id_); | curve_factors_ = curves_->attributes().lookup_or_default( | ||||
| curve_selection_ = retrieve_selected_curves(*curves_id_, selected_curve_indices_); | ".selection", ATTR_DOMAIN_CURVE, 1.0f); | ||||
| curve_selection_ = curves::retrieve_selected_curves(*curves_id_, selected_curve_indices_); | |||||
| brush_pos_prev_re_ = self.last_mouse_position_re_; | brush_pos_prev_re_ = self.last_mouse_position_re_; | ||||
| brush_pos_re_ = stroke_extension.mouse_position; | brush_pos_re_ = stroke_extension.mouse_position; | ||||
| brush_pos_diff_re_ = brush_pos_re_ - brush_pos_prev_re_; | brush_pos_diff_re_ = brush_pos_re_ - brush_pos_prev_re_; | ||||
| if (stroke_extension.is_first) { | if (stroke_extension.is_first) { | ||||
| if (falloff_shape_ == PAINT_FALLOFF_SHAPE_SPHERE) { | if (falloff_shape_ == PAINT_FALLOFF_SHAPE_SPHERE) { | ||||
| std::optional<CurvesBrush3D> brush_3d = sample_curves_3d_brush(*ctx_.depsgraph, | std::optional<CurvesBrush3D> brush_3d = sample_curves_3d_brush(*ctx_.depsgraph, | ||||
| ▲ Show 20 Lines • Show All 176 Lines • Show Last 20 Lines | |||||