Blender V4.3
blender::ed::sculpt_paint::CombOperationExecutor Struct Reference

Public Member Functions

 CombOperationExecutor (const bContext &C)
 
void execute (CombOperation &self, const bContext &C, const StrokeExtension &stroke_extension)
 
void comb_projected_with_symmetry (MutableSpan< bool > r_changed_curves)
 
void comb_projected (MutableSpan< bool > r_changed_curves, const float4x4 &brush_transform)
 
void comb_spherical_with_symmetry (MutableSpan< bool > r_changed_curves)
 
void comb_spherical (MutableSpan< bool > r_changed_curves, const float3 &brush_start_cu, const float3 &brush_end_cu, const float brush_radius_cu)
 
void initialize_spherical_brush_reference_point ()
 

Public Attributes

CombOperationself_ = nullptr
 
CurvesSculptCommonContext ctx_
 
const CurvesSculptcurves_sculpt_ = nullptr
 
const Brushbrush_ = nullptr
 
float brush_radius_base_re_
 
float brush_radius_factor_
 
float brush_strength_
 
Objectcurves_ob_orig_ = nullptr
 
Curvescurves_id_orig_ = nullptr
 
CurvesGeometrycurves_orig_ = nullptr
 
VArray< floatpoint_factors_
 
IndexMaskMemory selected_curve_memory_
 
IndexMask curve_selection_
 
float2 brush_pos_prev_re_
 
float2 brush_pos_re_
 
float2 brush_pos_diff_re_
 
CurvesSurfaceTransforms transforms_
 

Detailed Description

Utility class that actually executes the update when the stroke is updated. That's useful because it avoids passing a very large number of parameters between functions.

Definition at line 82 of file curves_sculpt_comb.cc.

Constructor & Destructor Documentation

◆ CombOperationExecutor()

blender::ed::sculpt_paint::CombOperationExecutor::CombOperationExecutor ( const bContext & C)
inline

Definition at line 106 of file curves_sculpt_comb.cc.

Member Function Documentation

◆ comb_projected()

void blender::ed::sculpt_paint::CombOperationExecutor::comb_projected ( MutableSpan< bool > r_changed_curves,
const float4x4 & brush_transform )
inline

◆ comb_projected_with_symmetry()

void blender::ed::sculpt_paint::CombOperationExecutor::comb_projected_with_symmetry ( MutableSpan< bool > r_changed_curves)
inline

Do combing in screen space.

Definition at line 189 of file curves_sculpt_comb.cc.

References comb_projected(), curves_id_orig_, blender::ed::sculpt_paint::get_symmetry_brush_transforms(), and Curves::symmetry.

Referenced by execute().

◆ comb_spherical()

◆ comb_spherical_with_symmetry()

◆ execute()

void blender::ed::sculpt_paint::CombOperationExecutor::execute ( CombOperation & self,
const bContext & C,
const StrokeExtension & stroke_extension )
inline

Definition at line 108 of file curves_sculpt_comb.cc.

References blender::bke::CurvesGeometry::attributes(), BKE_brush_size_get(), BKE_paint_brush_for_read(), BLI_assert_unreachable, BLI_SCOPED_DEFER, brush_, brush_pos_diff_re_, brush_pos_prev_re_, brush_pos_re_, brush_radius_base_re_, blender::ed::sculpt_paint::brush_radius_factor(), brush_radius_factor_, brush_strength_, blender::ed::sculpt_paint::brush_strength_get(), comb_projected_with_symmetry(), comb_spherical_with_symmetry(), ctx_, CTX_data_active_object(), curve_selection_, curves_id_orig_, blender::bke::CurvesGeometry::curves_num(), curves_ob_orig_, curves_orig_, ToolSettings::curves_sculpt, curves_sculpt_, CV_SCULPT_COLLISION_ENABLED, Object::data, DEG_id_tag_update(), ED_region_tag_redraw(), Brush::falloff_shape, Curves::flag, blender::index_mask::IndexMask::foreach_segment(), blender::index_mask::IndexMask::from_bools(), Curves::geometry, Curves::id, ID_RECALC_GEOMETRY, blender::ed::sculpt_paint::CurvesConstraintSolver::initialize(), initialize_spherical_brush_reference_point(), blender::ed::sculpt_paint::StrokeExtension::is_first, blender::bke::AttributeAccessor::lookup_or_default(), blender::ed::sculpt_paint::StrokeExtension::mouse_position, NC_GEOM, ND_DATA, OB_MESH, CurvesSculpt::paint, PAINT_FALLOFF_SHAPE_SPHERE, PAINT_FALLOFF_SHAPE_TUBE, blender::bke::Point, point_factors_, blender::bke::CurvesGeometry::points_by_curve(), blender::ed::sculpt_paint::CurvesSculptCommonContext::region, blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::ed::curves::retrieve_selected_curves(), blender::ed::sculpt_paint::CurvesSculptCommonContext::scene, blender::ed::sculpt_paint::CurvesConstraintSolver::segment_lengths(), selected_curve_memory_, self, self_, blender::Span< T >::slice(), blender::ed::sculpt_paint::CurvesConstraintSolver::solve_step(), Curves::surface, blender::bke::CurvesGeometry::tag_positions_changed(), Scene::toolsettings, transforms_, Object::type, and WM_main_add_notifier().

Referenced by blender::ed::sculpt_paint::CombOperation::on_stroke_extended().

◆ initialize_spherical_brush_reference_point()

void blender::ed::sculpt_paint::CombOperationExecutor::initialize_spherical_brush_reference_point ( )
inline

Member Data Documentation

◆ brush_

const Brush* blender::ed::sculpt_paint::CombOperationExecutor::brush_ = nullptr

Definition at line 87 of file curves_sculpt_comb.cc.

Referenced by comb_projected(), comb_spherical(), and execute().

◆ brush_pos_diff_re_

float2 blender::ed::sculpt_paint::CombOperationExecutor::brush_pos_diff_re_

Definition at line 102 of file curves_sculpt_comb.cc.

Referenced by comb_projected(), and execute().

◆ brush_pos_prev_re_

float2 blender::ed::sculpt_paint::CombOperationExecutor::brush_pos_prev_re_

Definition at line 100 of file curves_sculpt_comb.cc.

Referenced by comb_projected(), comb_spherical_with_symmetry(), and execute().

◆ brush_pos_re_

float2 blender::ed::sculpt_paint::CombOperationExecutor::brush_pos_re_

◆ brush_radius_base_re_

float blender::ed::sculpt_paint::CombOperationExecutor::brush_radius_base_re_

◆ brush_radius_factor_

float blender::ed::sculpt_paint::CombOperationExecutor::brush_radius_factor_

Definition at line 89 of file curves_sculpt_comb.cc.

Referenced by comb_projected(), comb_spherical_with_symmetry(), and execute().

◆ brush_strength_

float blender::ed::sculpt_paint::CombOperationExecutor::brush_strength_

Definition at line 90 of file curves_sculpt_comb.cc.

Referenced by comb_projected(), comb_spherical(), and execute().

◆ ctx_

CurvesSculptCommonContext blender::ed::sculpt_paint::CombOperationExecutor::ctx_

◆ curve_selection_

IndexMask blender::ed::sculpt_paint::CombOperationExecutor::curve_selection_

Definition at line 98 of file curves_sculpt_comb.cc.

Referenced by comb_projected(), comb_spherical(), and execute().

◆ curves_id_orig_

Curves* blender::ed::sculpt_paint::CombOperationExecutor::curves_id_orig_ = nullptr

◆ curves_ob_orig_

Object* blender::ed::sculpt_paint::CombOperationExecutor::curves_ob_orig_ = nullptr

◆ curves_orig_

CurvesGeometry* blender::ed::sculpt_paint::CombOperationExecutor::curves_orig_ = nullptr

Definition at line 94 of file curves_sculpt_comb.cc.

Referenced by comb_projected(), comb_spherical(), and execute().

◆ curves_sculpt_

const CurvesSculpt* blender::ed::sculpt_paint::CombOperationExecutor::curves_sculpt_ = nullptr

Definition at line 86 of file curves_sculpt_comb.cc.

Referenced by execute().

◆ point_factors_

VArray<float> blender::ed::sculpt_paint::CombOperationExecutor::point_factors_

Definition at line 96 of file curves_sculpt_comb.cc.

Referenced by comb_projected(), comb_spherical(), and execute().

◆ selected_curve_memory_

IndexMaskMemory blender::ed::sculpt_paint::CombOperationExecutor::selected_curve_memory_

Definition at line 97 of file curves_sculpt_comb.cc.

Referenced by execute().

◆ self_

CombOperation* blender::ed::sculpt_paint::CombOperationExecutor::self_ = nullptr

◆ transforms_

CurvesSurfaceTransforms blender::ed::sculpt_paint::CombOperationExecutor::transforms_

Definition at line 104 of file curves_sculpt_comb.cc.

Referenced by comb_projected(), comb_spherical_with_symmetry(), and execute().


The documentation for this struct was generated from the following file: