Blender  V3.3
Public Member Functions | Public Attributes | List of all members
blender::ed::sculpt_paint::PuffOperationExecutor Struct Reference

Public Member Functions

 PuffOperationExecutor (const bContext &C)
 
void execute (PuffOperation &self, const bContext &C, const StrokeExtension &stroke_extension)
 
void find_curve_weights_projected_with_symmetry (MutableSpan< float > r_curve_weights)
 
void find_curve_weights_projected (const float4x4 &brush_transform, MutableSpan< float > r_curve_weights)
 
void find_curves_weights_spherical_with_symmetry (MutableSpan< float > r_curve_weights)
 
void find_curves_weights_spherical (const float3 &brush_pos_cu, const float brush_radius_cu, MutableSpan< float > r_curve_weights)
 
void puff (const Span< float > curve_weights)
 
void initialize_segment_lengths ()
 
void restore_segment_lengths ()
 

Public Attributes

PuffOperationself_ = nullptr
 
CurvesSculptCommonContext ctx_
 
Objectobject_ = nullptr
 
Curvescurves_id_ = nullptr
 
CurvesGeometrycurves_ = nullptr
 
VArray< floatpoint_factors_
 
Vector< int64_tselected_curve_indices_
 
IndexMask curve_selection_
 
const CurvesSculptcurves_sculpt_ = nullptr
 
const Brushbrush_ = nullptr
 
float brush_radius_base_re_
 
float brush_radius_factor_
 
float brush_strength_
 
float2 brush_pos_re_
 
eBrushFalloffShape falloff_shape_
 
CurvesSurfaceTransforms transforms_
 
Objectsurface_ob_ = nullptr
 
Meshsurface_ = nullptr
 
Span< MLoopTrisurface_looptris_
 
Span< float3corner_normals_su_
 
BVHTreeFromMesh surface_bvh_
 

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 48 of file curves_sculpt_puff.cc.

Constructor & Destructor Documentation

◆ PuffOperationExecutor()

blender::ed::sculpt_paint::PuffOperationExecutor::PuffOperationExecutor ( const bContext C)
inline

Definition at line 77 of file curves_sculpt_puff.cc.

References C.

Member Function Documentation

◆ execute()

void blender::ed::sculpt_paint::PuffOperationExecutor::execute ( PuffOperation self,
const bContext C,
const StrokeExtension stroke_extension 
)
inline

Definition at line 81 of file curves_sculpt_puff.cc.

References BKE_brush_size_get(), BKE_bvhtree_from_mesh_get(), BKE_mesh_calc_normals_split(), BKE_mesh_runtime_looptri_ensure(), BKE_mesh_runtime_looptri_len(), BKE_paint_brush_for_read(), BLI_assert_unreachable, BLI_SCOPED_DEFER, brush_, 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(), BVHTREE_FROM_LOOPTRI, C, CD_NORMAL, corner_normals_su_, ctx_, CTX_data_active_object(), curve_selection_, curves_, curves_id_, blender::bke::CurvesGeometry::curves_num(), ToolSettings::curves_sculpt, curves_sculpt_, CustomData_get_layer(), CustomData_has_layer(), Object::data, DEG_id_tag_update(), blender::ed::sculpt_paint::CurvesSculptCommonContext::depsgraph, ED_region_tag_redraw(), Brush::falloff_shape, falloff_shape_, find_curve_weights_projected_with_symmetry(), find_curves_weights_spherical_with_symmetry(), free_bvhtree_from_mesh(), Curves::geometry, blender::ed::sculpt_paint::get_point_selection(), Curves::id, ID_RECALC_GEOMETRY, initialize_segment_lengths(), blender::ed::sculpt_paint::StrokeExtension::is_first, Mesh::ldata, blender::ed::sculpt_paint::StrokeExtension::mouse_position, NC_GEOM, ND_DATA, OB_MESH, object_, CurvesSculpt::paint, PAINT_FALLOFF_SHAPE_SPHERE, PAINT_FALLOFF_SHAPE_TUBE, point_factors_, puff(), blender::ed::sculpt_paint::CurvesSculptCommonContext::region, restore_segment_lengths(), blender::ed::sculpt_paint::retrieve_selected_curves(), blender::ed::sculpt_paint::CurvesSculptCommonContext::rv3d, blender::ed::sculpt_paint::sample_curves_3d_brush(), blender::ed::sculpt_paint::CurvesSculptCommonContext::scene, selected_curve_indices_, self_, blender::IndexMask::size(), Curves::surface, surface_, surface_bvh_, surface_looptris_, surface_ob_, blender::bke::CurvesGeometry::tag_positions_changed(), Scene::toolsettings, Mesh::totloop, transforms_, Object::type, UNUSED_VARS, blender::ed::sculpt_paint::CurvesSculptCommonContext::v3d, WM_main_add_notifier(), and blender::bke::CurvesGeometry::wrap().

◆ find_curve_weights_projected()

void blender::ed::sculpt_paint::PuffOperationExecutor::find_curve_weights_projected ( const float4x4 brush_transform,
MutableSpan< float r_curve_weights 
)
inline

◆ find_curve_weights_projected_with_symmetry()

void blender::ed::sculpt_paint::PuffOperationExecutor::find_curve_weights_projected_with_symmetry ( MutableSpan< float r_curve_weights)
inline

◆ find_curves_weights_spherical()

void blender::ed::sculpt_paint::PuffOperationExecutor::find_curves_weights_spherical ( const float3 brush_pos_cu,
const float  brush_radius_cu,
MutableSpan< float r_curve_weights 
)
inline

◆ find_curves_weights_spherical_with_symmetry()

void blender::ed::sculpt_paint::PuffOperationExecutor::find_curves_weights_spherical_with_symmetry ( MutableSpan< float r_curve_weights)
inline

◆ initialize_segment_lengths()

void blender::ed::sculpt_paint::PuffOperationExecutor::initialize_segment_lengths ( )
inline

Definition at line 334 of file curves_sculpt_puff.cc.

References blender::threading::parallel_for().

Referenced by execute().

◆ puff()

void blender::ed::sculpt_paint::PuffOperationExecutor::puff ( const Span< float curve_weights)
inline

◆ restore_segment_lengths()

void blender::ed::sculpt_paint::PuffOperationExecutor::restore_segment_lengths ( )
inline

Definition at line 351 of file curves_sculpt_puff.cc.

References blender::threading::parallel_for().

Referenced by execute().

Member Data Documentation

◆ brush_

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

Definition at line 61 of file curves_sculpt_puff.cc.

Referenced by execute().

◆ brush_pos_re_

float2 blender::ed::sculpt_paint::PuffOperationExecutor::brush_pos_re_

Definition at line 65 of file curves_sculpt_puff.cc.

Referenced by execute().

◆ brush_radius_base_re_

float blender::ed::sculpt_paint::PuffOperationExecutor::brush_radius_base_re_

Definition at line 62 of file curves_sculpt_puff.cc.

Referenced by execute(), and find_curve_weights_projected().

◆ brush_radius_factor_

float blender::ed::sculpt_paint::PuffOperationExecutor::brush_radius_factor_

Definition at line 63 of file curves_sculpt_puff.cc.

Referenced by execute(), and find_curve_weights_projected().

◆ brush_strength_

float blender::ed::sculpt_paint::PuffOperationExecutor::brush_strength_

Definition at line 64 of file curves_sculpt_puff.cc.

Referenced by execute().

◆ corner_normals_su_

Span<float3> blender::ed::sculpt_paint::PuffOperationExecutor::corner_normals_su_

Definition at line 74 of file curves_sculpt_puff.cc.

Referenced by execute().

◆ ctx_

CurvesSculptCommonContext blender::ed::sculpt_paint::PuffOperationExecutor::ctx_

Definition at line 50 of file curves_sculpt_puff.cc.

Referenced by execute(), and find_curve_weights_projected().

◆ curve_selection_

IndexMask blender::ed::sculpt_paint::PuffOperationExecutor::curve_selection_

Definition at line 58 of file curves_sculpt_puff.cc.

Referenced by execute(), and find_curve_weights_projected().

◆ curves_

CurvesGeometry* blender::ed::sculpt_paint::PuffOperationExecutor::curves_ = nullptr

Definition at line 54 of file curves_sculpt_puff.cc.

Referenced by execute().

◆ curves_id_

Curves* blender::ed::sculpt_paint::PuffOperationExecutor::curves_id_ = nullptr

Definition at line 53 of file curves_sculpt_puff.cc.

Referenced by execute(), and find_curve_weights_projected_with_symmetry().

◆ curves_sculpt_

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

Definition at line 60 of file curves_sculpt_puff.cc.

Referenced by execute().

◆ falloff_shape_

eBrushFalloffShape blender::ed::sculpt_paint::PuffOperationExecutor::falloff_shape_

Definition at line 67 of file curves_sculpt_puff.cc.

Referenced by execute().

◆ object_

Object* blender::ed::sculpt_paint::PuffOperationExecutor::object_ = nullptr

Definition at line 52 of file curves_sculpt_puff.cc.

Referenced by execute(), and find_curve_weights_projected().

◆ point_factors_

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

Definition at line 56 of file curves_sculpt_puff.cc.

Referenced by execute().

◆ selected_curve_indices_

Vector<int64_t> blender::ed::sculpt_paint::PuffOperationExecutor::selected_curve_indices_

Definition at line 57 of file curves_sculpt_puff.cc.

Referenced by execute().

◆ self_

PuffOperation* blender::ed::sculpt_paint::PuffOperationExecutor::self_ = nullptr

Definition at line 49 of file curves_sculpt_puff.cc.

Referenced by execute().

◆ surface_

Mesh* blender::ed::sculpt_paint::PuffOperationExecutor::surface_ = nullptr

Definition at line 72 of file curves_sculpt_puff.cc.

Referenced by execute().

◆ surface_bvh_

BVHTreeFromMesh blender::ed::sculpt_paint::PuffOperationExecutor::surface_bvh_

Definition at line 75 of file curves_sculpt_puff.cc.

Referenced by execute().

◆ surface_looptris_

Span<MLoopTri> blender::ed::sculpt_paint::PuffOperationExecutor::surface_looptris_

Definition at line 73 of file curves_sculpt_puff.cc.

Referenced by execute().

◆ surface_ob_

Object* blender::ed::sculpt_paint::PuffOperationExecutor::surface_ob_ = nullptr

Definition at line 71 of file curves_sculpt_puff.cc.

Referenced by execute().

◆ transforms_

CurvesSurfaceTransforms blender::ed::sculpt_paint::PuffOperationExecutor::transforms_

Definition at line 69 of file curves_sculpt_puff.cc.

Referenced by execute().


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