Blender
V3.3
|
Public Member Functions | |
CombOperationExecutor (const bContext &C) | |
void | execute (CombOperation &self, const bContext &C, const StrokeExtension &stroke_extension) |
void | comb_projected_with_symmetry (EnumerableThreadSpecific< Vector< int >> &r_changed_curves) |
void | comb_projected (EnumerableThreadSpecific< Vector< int >> &r_changed_curves, const float4x4 &brush_transform) |
void | comb_spherical_with_symmetry (EnumerableThreadSpecific< Vector< int >> &r_changed_curves) |
void | comb_spherical (EnumerableThreadSpecific< Vector< int >> &r_changed_curves, const float3 &brush_start_cu, const float3 &brush_end_cu, const float brush_radius_cu) |
void | initialize_spherical_brush_reference_point () |
void | initialize_segment_lengths () |
void | restore_segment_lengths (EnumerableThreadSpecific< Vector< int >> &changed_curves) |
Public Attributes | |
CombOperation * | self_ = nullptr |
CurvesSculptCommonContext | ctx_ |
const CurvesSculpt * | curves_sculpt_ = nullptr |
const Brush * | brush_ = nullptr |
float | brush_radius_base_re_ |
float | brush_radius_factor_ |
float | brush_strength_ |
eBrushFalloffShape | falloff_shape_ |
Object * | curves_ob_orig_ = nullptr |
Curves * | curves_id_orig_ = nullptr |
CurvesGeometry * | curves_orig_ = nullptr |
VArray< float > | point_factors_ |
Vector< int64_t > | selected_curve_indices_ |
IndexMask | curve_selection_ |
float2 | brush_pos_prev_re_ |
float2 | brush_pos_re_ |
float2 | brush_pos_diff_re_ |
CurvesSurfaceTransforms | transforms_ |
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.
|
inline |
Definition at line 108 of file curves_sculpt_comb.cc.
References C.
|
inline |
Definition at line 183 of file curves_sculpt_comb.cc.
References brush_radius_base_re_, brush_radius_factor_, ctx_, curve_selection_, curves_ob_orig_, curves_orig_, blender::ed::sculpt_paint::CurvesSculptCommonContext::depsgraph, ED_view3d_ob_project_mat_get(), blender::bke::crazyspace::get_evaluated_curves_deformation(), blender::IndexMask::index_range(), blender::float4x4::inverted(), blender::threading::parallel_for(), blender::bke::CurvesGeometry::positions_for_write(), pow2f(), blender::ed::sculpt_paint::CurvesSculptCommonContext::rv3d, and blender::float4x4::values.
Referenced by comb_projected_with_symmetry().
|
inline |
Do combing in screen space.
Definition at line 174 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().
|
inline |
Definition at line 286 of file curves_sculpt_comb.cc.
References blender::bke::crazyspace::get_evaluated_curves_deformation(), blender::threading::parallel_for(), and pow2f().
|
inline |
Do combing in 3D space.
Definition at line 255 of file curves_sculpt_comb.cc.
References ED_view3d_ob_project_mat_get(), ED_view3d_win_to_3d(), blender::ed::sculpt_paint::get_symmetry_brush_transforms(), and blender::float4x4::values.
Referenced by execute().
|
inline |
Definition at line 112 of file curves_sculpt_comb.cc.
References 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(), C, 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_, Object::data, DEG_id_tag_update(), ED_region_tag_redraw(), Brush::falloff_shape, falloff_shape_, Curves::geometry, blender::ed::sculpt_paint::get_point_selection(), Curves::id, ID_RECALC_GEOMETRY, initialize_segment_lengths(), initialize_spherical_brush_reference_point(), blender::ed::sculpt_paint::StrokeExtension::is_first, blender::ed::sculpt_paint::StrokeExtension::mouse_position, NC_GEOM, ND_DATA, CurvesSculpt::paint, PAINT_FALLOFF_SHAPE_SPHERE, PAINT_FALLOFF_SHAPE_TUBE, point_factors_, blender::ed::sculpt_paint::CurvesSculptCommonContext::region, restore_segment_lengths(), blender::ed::sculpt_paint::retrieve_selected_curves(), blender::ed::sculpt_paint::CurvesSculptCommonContext::scene, selected_curve_indices_, self_, Curves::surface, blender::bke::CurvesGeometry::tag_positions_changed(), Scene::toolsettings, transforms_, WM_main_add_notifier(), and blender::bke::CurvesGeometry::wrap().
|
inline |
Remember the initial length of all curve segments. This allows restoring the length after combing.
Definition at line 358 of file curves_sculpt_comb.cc.
References blender::threading::parallel_for().
Referenced by execute().
|
inline |
Sample depth under mouse by looking at curves and the surface.
Definition at line 340 of file curves_sculpt_comb.cc.
References blender::ed::sculpt_paint::sample_curves_3d_brush().
Referenced by execute().
|
inline |
Restore previously stored length for each segment in the changed curves.
Definition at line 378 of file curves_sculpt_comb.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::threading::parallel_for(), and blender::threading::parallel_for_each().
Referenced by execute().
const Brush* blender::ed::sculpt_paint::CombOperationExecutor::brush_ = nullptr |
Definition at line 87 of file curves_sculpt_comb.cc.
Referenced by execute().
float2 blender::ed::sculpt_paint::CombOperationExecutor::brush_pos_diff_re_ |
Definition at line 104 of file curves_sculpt_comb.cc.
Referenced by execute().
float2 blender::ed::sculpt_paint::CombOperationExecutor::brush_pos_prev_re_ |
Definition at line 102 of file curves_sculpt_comb.cc.
Referenced by execute().
float2 blender::ed::sculpt_paint::CombOperationExecutor::brush_pos_re_ |
Definition at line 103 of file curves_sculpt_comb.cc.
Referenced by execute().
float blender::ed::sculpt_paint::CombOperationExecutor::brush_radius_base_re_ |
Definition at line 88 of file curves_sculpt_comb.cc.
Referenced by comb_projected(), and execute().
float blender::ed::sculpt_paint::CombOperationExecutor::brush_radius_factor_ |
Definition at line 89 of file curves_sculpt_comb.cc.
Referenced by comb_projected(), and execute().
float blender::ed::sculpt_paint::CombOperationExecutor::brush_strength_ |
Definition at line 90 of file curves_sculpt_comb.cc.
Referenced by execute().
CurvesSculptCommonContext blender::ed::sculpt_paint::CombOperationExecutor::ctx_ |
Definition at line 84 of file curves_sculpt_comb.cc.
Referenced by comb_projected(), and execute().
IndexMask blender::ed::sculpt_paint::CombOperationExecutor::curve_selection_ |
Definition at line 100 of file curves_sculpt_comb.cc.
Referenced by comb_projected(), and execute().
Curves* blender::ed::sculpt_paint::CombOperationExecutor::curves_id_orig_ = nullptr |
Definition at line 95 of file curves_sculpt_comb.cc.
Referenced by comb_projected_with_symmetry(), and execute().
Object* blender::ed::sculpt_paint::CombOperationExecutor::curves_ob_orig_ = nullptr |
Definition at line 94 of file curves_sculpt_comb.cc.
Referenced by comb_projected(), and execute().
CurvesGeometry* blender::ed::sculpt_paint::CombOperationExecutor::curves_orig_ = nullptr |
Definition at line 96 of file curves_sculpt_comb.cc.
Referenced by comb_projected(), and execute().
const CurvesSculpt* blender::ed::sculpt_paint::CombOperationExecutor::curves_sculpt_ = nullptr |
Definition at line 86 of file curves_sculpt_comb.cc.
Referenced by execute().
eBrushFalloffShape blender::ed::sculpt_paint::CombOperationExecutor::falloff_shape_ |
Definition at line 92 of file curves_sculpt_comb.cc.
Referenced by execute().
Definition at line 98 of file curves_sculpt_comb.cc.
Referenced by execute().
Definition at line 99 of file curves_sculpt_comb.cc.
Referenced by execute().
CombOperation* blender::ed::sculpt_paint::CombOperationExecutor::self_ = nullptr |
Definition at line 83 of file curves_sculpt_comb.cc.
Referenced by execute().
CurvesSurfaceTransforms blender::ed::sculpt_paint::CombOperationExecutor::transforms_ |
Definition at line 106 of file curves_sculpt_comb.cc.
Referenced by execute().