Blender
V3.3
|
Public Member Functions | |
SlideOperationExecutor (const bContext &C) | |
void | execute (SlideOperation &self, const bContext &C, const StrokeExtension &stroke_extension) |
void | find_curves_to_slide_with_symmetry () |
void | find_curves_to_slide (const float3 &brush_pos_cu, const float brush_radius_cu, const ReverseUVSampler &reverse_uv_sampler_orig, Vector< SlideCurveInfo > &r_curves_to_slide) |
void | slide_with_symmetry () |
void | slide (const Span< SlideCurveInfo > slide_curves, const ReverseUVSampler &reverse_uv_sampler_orig, const float4x4 &brush_transform) |
bool | find_closest_ray_hit (const float3 &ray_start_su, const float3 &ray_direction_su, const float3 &point_su, int &r_looptri_index, float3 &r_hit_pos) |
float4x4 | get_slide_transform (const float3 &old_root_pos, const float3 &new_root_pos, const float3 &old_normal, const float3 &new_normal) |
Public Attributes | |
SlideOperation * | 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_ |
Object * | curves_ob_orig_ = nullptr |
Curves * | curves_id_orig_ = nullptr |
CurvesGeometry * | curves_orig_ = nullptr |
Object * | surface_ob_orig_ = nullptr |
Mesh * | surface_orig_ = nullptr |
Span< MLoopTri > | surface_looptris_orig_ |
VArraySpan< float2 > | surface_uv_map_orig_ |
Span< float3 > | corner_normals_orig_su_ |
Object * | surface_ob_eval_ = nullptr |
Mesh * | surface_eval_ = nullptr |
Span< MLoopTri > | surface_looptris_eval_ |
VArraySpan< float2 > | surface_uv_map_eval_ |
BVHTreeFromMesh | surface_bvh_eval_ |
VArray< float > | curve_factors_ |
Vector< int64_t > | selected_curve_indices_ |
IndexMask | curve_selection_ |
float2 | brush_pos_re_ |
CurvesSurfaceTransforms | transforms_ |
std::atomic< bool > | found_invalid_uv_mapping_ {false} |
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 93 of file curves_sculpt_slide.cc.
|
inline |
Definition at line 129 of file curves_sculpt_slide.cc.
References C.
|
inline |
Definition at line 133 of file curves_sculpt_slide.cc.
References ATTR_DOMAIN_CORNER, 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_object_get_evaluated_mesh(), BKE_paint_brush_for_read(), BKE_report(), 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_orig_su_, ctx_, CTX_data_active_object(), curve_factors_, curve_selection_, curves_id_orig_, blender::bke::CurvesGeometry::curves_num(), curves_ob_orig_, curves_orig_, ToolSettings::curves_sculpt, curves_sculpt_, CustomData_get_layer(), CustomData_has_layer(), Object::data, DEG_get_evaluated_object(), DEG_id_tag_update(), blender::ed::sculpt_paint::CurvesSculptCommonContext::depsgraph, ED_region_tag_redraw(), find_curves_to_slide_with_symmetry(), found_invalid_uv_mapping_, free_bvhtree_from_mesh(), Curves::geometry, blender::ed::sculpt_paint::get_curves_selection(), blender::bke::crazyspace::get_evaluated_curves_deformation(), Curves::id, ID_RECALC_GEOMETRY, blender::ed::sculpt_paint::StrokeExtension::is_first, Mesh::ldata, blender::bke::AttributeAccessor::lookup(), blender::bke::mesh_attributes(), blender::ed::sculpt_paint::StrokeExtension::mouse_position, NC_GEOM, ND_DATA, OB_MESH, CurvesSculpt::paint, blender::bke::crazyspace::GeometryDeformation::positions, blender::bke::CurvesGeometry::positions(), blender::ed::sculpt_paint::CurvesSculptCommonContext::region, blender::ed::sculpt_paint::report_empty_evaluated_surface(), blender::ed::sculpt_paint::report_empty_original_surface(), blender::ed::sculpt_paint::report_missing_surface(), blender::ed::sculpt_paint::report_missing_uv_map_on_evaluated_surface(), blender::ed::sculpt_paint::report_missing_uv_map_on_original_surface(), blender::ed::sculpt_paint::StrokeExtension::reports, blender::ed::sculpt_paint::retrieve_selected_curves(), RPT_WARNING, blender::ed::sculpt_paint::CurvesSculptCommonContext::scene, selected_curve_indices_, self_, slide_with_symmetry(), Curves::surface, surface_bvh_eval_, surface_eval_, surface_looptris_eval_, surface_looptris_orig_, surface_ob_eval_, surface_ob_orig_, surface_orig_, blender::bke::CurvesGeometry::surface_uv_coords(), Curves::surface_uv_map, surface_uv_map_eval_, surface_uv_map_orig_, blender::bke::CurvesGeometry::tag_positions_changed(), TIP_, Scene::toolsettings, Mesh::totloop, Mesh::totpoly, transforms_, Object::type, UNUSED_VARS, WM_main_add_notifier(), and blender::bke::CurvesGeometry::wrap().
|
inline |
Definition at line 428 of file curves_sculpt_slide.cc.
References BVHTreeRayHit::co, blender::math::distance_squared(), if(), and BVHTreeRayHit::index.
|
inline |
Definition at line 270 of file curves_sculpt_slide.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BKE_brush_curve_strength(), brush_, blender::geometry::compute_surface_point_normal(), corner_normals_orig_su_, curve_selection_, curves_orig_, blender::math::distance_squared(), found_invalid_uv_mapping_, blender::math::normalize(), blender::bke::CurvesGeometry::offsets(), blender::geometry::ReverseUVSampler::Ok, pow2f(), result, blender::geometry::ReverseUVSampler::sample(), self_, sqrt(), blender::bke::CurvesSurfaceTransforms::surface_to_curves_normal, blender::bke::CurvesGeometry::surface_uv_coords(), and transforms_.
Referenced by find_curves_to_slide_with_symmetry().
|
inline |
Definition at line 243 of file curves_sculpt_slide.cc.
References brush_pos_re_, brush_radius_base_re_, brush_radius_factor_, blender::ed::sculpt_paint::SlideInfo::brush_transform, ctx_, curves_id_orig_, blender::ed::sculpt_paint::SlideInfo::curves_to_slide, blender::ed::sculpt_paint::CurvesSculptCommonContext::depsgraph, find_curves_to_slide(), blender::ed::sculpt_paint::get_symmetry_brush_transforms(), blender::ed::sculpt_paint::CurvesSculptCommonContext::region, blender::ed::sculpt_paint::sample_curves_surface_3d_brush(), self_, surface_bvh_eval_, surface_looptris_orig_, surface_uv_map_orig_, Curves::symmetry, transforms_, and blender::ed::sculpt_paint::CurvesSculptCommonContext::v3d.
Referenced by execute().
|
inline |
Definition at line 465 of file curves_sculpt_slide.cc.
References add_v3_v3(), copy_m4_m3(), mul_m4_m4_pre(), rotation_between_vecs_to_mat3(), sub_v3_v3(), transform(), blender::float3x3::values, and blender::float4x4::values.
|
inline |
Definition at line 316 of file curves_sculpt_slide.cc.
References brush_pos_re_, ctx_, curves_ob_orig_, curves_orig_, blender::bke::CurvesSurfaceTransforms::curves_to_surface, ED_view3d_ob_project_mat_get(), blender::Span< T >::index_range(), blender::float4x4::inverted(), Mesh::mloop, Mesh::mvert, blender::threading::parallel_for(), blender::bke::CurvesGeometry::positions_for_write(), blender::ed::sculpt_paint::CurvesSculptCommonContext::rv3d, self_, surface_orig_, blender::bke::CurvesGeometry::surface_uv_coords_for_write(), Mesh::totloop, Mesh::totvert, transforms_, blender::float4x4::values, and blender::bke::CurvesSurfaceTransforms::world_to_curves.
Referenced by slide_with_symmetry().
|
inline |
Definition at line 308 of file curves_sculpt_slide.cc.
References blender::ed::sculpt_paint::SlideInfo::brush_transform, blender::ed::sculpt_paint::SlideInfo::curves_to_slide, self_, slide(), surface_looptris_orig_, and surface_uv_map_orig_.
Referenced by execute().
const Brush* blender::ed::sculpt_paint::SlideOperationExecutor::brush_ = nullptr |
Definition at line 98 of file curves_sculpt_slide.cc.
Referenced by execute(), and find_curves_to_slide().
float2 blender::ed::sculpt_paint::SlideOperationExecutor::brush_pos_re_ |
Definition at line 123 of file curves_sculpt_slide.cc.
Referenced by execute(), find_curves_to_slide_with_symmetry(), and slide().
float blender::ed::sculpt_paint::SlideOperationExecutor::brush_radius_base_re_ |
Definition at line 99 of file curves_sculpt_slide.cc.
Referenced by execute(), and find_curves_to_slide_with_symmetry().
float blender::ed::sculpt_paint::SlideOperationExecutor::brush_radius_factor_ |
Definition at line 100 of file curves_sculpt_slide.cc.
Referenced by execute(), and find_curves_to_slide_with_symmetry().
float blender::ed::sculpt_paint::SlideOperationExecutor::brush_strength_ |
Definition at line 101 of file curves_sculpt_slide.cc.
Referenced by execute().
Definition at line 111 of file curves_sculpt_slide.cc.
Referenced by execute(), and find_curves_to_slide().
CurvesSculptCommonContext blender::ed::sculpt_paint::SlideOperationExecutor::ctx_ |
Definition at line 95 of file curves_sculpt_slide.cc.
Referenced by execute(), find_curves_to_slide_with_symmetry(), and slide().
Definition at line 119 of file curves_sculpt_slide.cc.
Referenced by execute().
IndexMask blender::ed::sculpt_paint::SlideOperationExecutor::curve_selection_ |
Definition at line 121 of file curves_sculpt_slide.cc.
Referenced by execute(), and find_curves_to_slide().
Curves* blender::ed::sculpt_paint::SlideOperationExecutor::curves_id_orig_ = nullptr |
Definition at line 104 of file curves_sculpt_slide.cc.
Referenced by execute(), and find_curves_to_slide_with_symmetry().
Object* blender::ed::sculpt_paint::SlideOperationExecutor::curves_ob_orig_ = nullptr |
Definition at line 103 of file curves_sculpt_slide.cc.
CurvesGeometry* blender::ed::sculpt_paint::SlideOperationExecutor::curves_orig_ = nullptr |
Definition at line 105 of file curves_sculpt_slide.cc.
Referenced by execute(), find_curves_to_slide(), and slide().
const CurvesSculpt* blender::ed::sculpt_paint::SlideOperationExecutor::curves_sculpt_ = nullptr |
Definition at line 97 of file curves_sculpt_slide.cc.
Referenced by execute().
std::atomic<bool> blender::ed::sculpt_paint::SlideOperationExecutor::found_invalid_uv_mapping_ {false} |
Definition at line 127 of file curves_sculpt_slide.cc.
Referenced by execute(), and find_curves_to_slide().
Definition at line 120 of file curves_sculpt_slide.cc.
Referenced by execute().
SlideOperation* blender::ed::sculpt_paint::SlideOperationExecutor::self_ = nullptr |
Definition at line 94 of file curves_sculpt_slide.cc.
Referenced by execute(), find_curves_to_slide(), find_curves_to_slide_with_symmetry(), slide(), and slide_with_symmetry().
BVHTreeFromMesh blender::ed::sculpt_paint::SlideOperationExecutor::surface_bvh_eval_ |
Definition at line 117 of file curves_sculpt_slide.cc.
Referenced by execute(), and find_curves_to_slide_with_symmetry().
Mesh* blender::ed::sculpt_paint::SlideOperationExecutor::surface_eval_ = nullptr |
Definition at line 114 of file curves_sculpt_slide.cc.
Referenced by execute().
Definition at line 115 of file curves_sculpt_slide.cc.
Referenced by execute().
Definition at line 109 of file curves_sculpt_slide.cc.
Referenced by execute(), find_curves_to_slide_with_symmetry(), and slide_with_symmetry().
Object* blender::ed::sculpt_paint::SlideOperationExecutor::surface_ob_eval_ = nullptr |
Definition at line 113 of file curves_sculpt_slide.cc.
Referenced by execute().
Object* blender::ed::sculpt_paint::SlideOperationExecutor::surface_ob_orig_ = nullptr |
Definition at line 107 of file curves_sculpt_slide.cc.
Referenced by execute().
Mesh* blender::ed::sculpt_paint::SlideOperationExecutor::surface_orig_ = nullptr |
Definition at line 108 of file curves_sculpt_slide.cc.
VArraySpan<float2> blender::ed::sculpt_paint::SlideOperationExecutor::surface_uv_map_eval_ |
Definition at line 116 of file curves_sculpt_slide.cc.
Referenced by execute().
VArraySpan<float2> blender::ed::sculpt_paint::SlideOperationExecutor::surface_uv_map_orig_ |
Definition at line 110 of file curves_sculpt_slide.cc.
Referenced by execute(), find_curves_to_slide_with_symmetry(), and slide_with_symmetry().
CurvesSurfaceTransforms blender::ed::sculpt_paint::SlideOperationExecutor::transforms_ |
Definition at line 125 of file curves_sculpt_slide.cc.
Referenced by execute(), find_curves_to_slide(), find_curves_to_slide_with_symmetry(), and slide().