|
Blender V5.3
|
Public Member Functions | |
| AddOperationExecutor (const PaintStroke &stroke) | |
| void | execute (AddOperation &self, const StrokeExtension &stroke_extension) |
| void | sample_in_center_with_symmetry (Vector< float2 > &r_sampled_uvs) |
| void | sample_in_center (Vector< float2 > &r_sampled_uvs, const float3 &ray_start_su, const float3 &ray_end_su) |
| void | sample_projected_with_symmetry (RandomNumberGenerator &rng, Vector< float2 > &r_sampled_uvs) |
| void | sample_projected (RandomNumberGenerator &rng, Vector< float2 > &r_sampled_uvs, const float4x4 &brush_transform) |
| void | sample_spherical_with_symmetry (RandomNumberGenerator &rng, Vector< float2 > &r_sampled_uvs) |
| void | sample_spherical (RandomNumberGenerator &rng, Vector< float2 > &r_sampled_uvs, const float3 &brush_pos_su, const float brush_radius_su, const float3 &view_direction_su) |
| void | ensure_curve_roots_kdtree () |
Public Attributes | |
| AddOperation * | self_ = nullptr |
| CurvesSculptCommonContext | ctx_ |
| Object * | curves_ob_orig_ = nullptr |
| Curves * | curves_id_orig_ = nullptr |
| CurvesGeometry * | curves_orig_ = nullptr |
| Object * | surface_ob_eval_ = nullptr |
| Mesh * | surface_eval_ = nullptr |
| Span< float3 > | surface_positions_eval_ |
| Span< int > | surface_corner_verts_eval_ |
| Span< int3 > | surface_corner_tris_eval_ |
| VArraySpan< float2 > | surface_uv_map_eval_ |
| const bke::bvh::Tree * | surface_bvh_eval_ |
| CurvesSculpt * | curves_sculpt_ = nullptr |
| const Brush * | brush_ = nullptr |
| const BrushCurvesSculptSettings * | brush_settings_ = nullptr |
| int | add_amount_ |
| bool | use_front_face_ |
| float | brush_radius_re_ |
| float2 | brush_pos_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 76 of file sculpt_add.cc.
|
inline |
Definition at line 103 of file sculpt_add.cc.
References ctx_.
|
inline |
Definition at line 479 of file sculpt_add.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::bke::CurvesGeometry::curves_num(), curves_orig_, blender::array_utils::gather(), blender::bke::CurvesGeometry::offsets(), blender::bke::CurvesGeometry::positions(), blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), self_, and blender::Span< T >::take_front().
Referenced by execute().
|
inline |
Definition at line 105 of file sculpt_add.cc.
References blender::BrushCurvesSculptSettings::add_amount, add_amount_, blender::geometry::add_curves_on_mesh(), blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), blender::BKE_object_get_evaluated_mesh(), blender::BKE_paint_brush_for_read(), BLI_assert_unreachable, brush_, blender::BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_LENGTH, blender::BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_POINT_COUNT, blender::BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_RADIUS, blender::BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_SHAPE, blender::BRUSH_FRONTFACE, brush_pos_re_, blender::ed::sculpt_paint::brush_radius_get(), brush_radius_re_, brush_settings_, blender::bke::AttributeAccessor::contains(), blender::bke::Corner, blender::geometry::AddCurvesOnMeshInputs::corner_normals_su, ctx_, blender::BrushCurvesSculptSettings::curve_length, blender::BrushCurvesSculptSettings::curve_radius, curves_id_orig_, curves_ob_orig_, curves_orig_, blender::ToolSettings::curves_sculpt, curves_sculpt_, blender::Brush::curves_sculpt_settings, blender::bke::CurvesSurfaceTransforms::curves_to_world, blender::ed::sculpt_paint::CurvesSurfaceTransforms::CurvesSurfaceTransforms(), blender::Object::data, blender::DEG_get_evaluated(), blender::DEG_id_tag_update(), blender::ed::sculpt_paint::CurvesSculptCommonContext::depsgraph, blender::ED_region_tag_redraw(), ensure_curve_roots_kdtree(), blender::Mesh::faces_num, blender::geometry::AddCurvesOnMeshInputs::fallback_curve_length, blender::geometry::AddCurvesOnMeshInputs::fallback_curve_radius, blender::geometry::AddCurvesOnMeshInputs::fallback_point_count, blender::Brush::falloff_shape, blender::ed::curves::fill_selection_true(), blender::Brush::flag, blender::BrushCurvesSculptSettings::flag, blender::RandomNumberGenerator::from_random_seed(), blender::ID_RECALC_GEOMETRY, blender::geometry::AddCurvesOnMeshInputs::interpolate_length, blender::geometry::AddCurvesOnMeshInputs::interpolate_point_count, blender::geometry::AddCurvesOnMeshInputs::interpolate_radius, blender::geometry::AddCurvesOnMeshInputs::interpolate_resolution, blender::geometry::AddCurvesOnMeshInputs::interpolate_shape, blender::blender::Span< T >::is_empty(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::bke::MutableAttributeAccessor::lookup_for_write_span(), blender::bounds::min_max(), blender::ed::sculpt_paint::StrokeExtension::mouse_position, NC_GEOM, ND_DATA, blender::geometry::AddCurvesOnMeshOutputs::new_curves_range, blender::geometry::AddCurvesOnMeshOutputs::new_points_range, blender::OB_MESH, blender::ed::sculpt_paint::CurvesSculptCommonContext::object, blender::geometry::AddCurvesOnMeshInputs::old_roots_kdtree, blender::CurvesSculpt::paint, blender::PAINT_FALLOFF_SHAPE_SPHERE, blender::PAINT_FALLOFF_SHAPE_TUBE, blender::bke::Point, blender::BrushCurvesSculptSettings::points_per_curve, blender::bke::CurvesGeometry::positions(), blender::ed::sculpt_paint::CurvesSculptCommonContext::region, blender::ed::sculpt_paint::remember_stroke_position(), blender::ed::sculpt_paint::report_empty_evaluated_surface(), blender::ed::sculpt_paint::report_empty_original_surface(), blender::ed::sculpt_paint::report_invalid_uv_map(), 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::geometry::AddCurvesOnMeshInputs::reverse_uv_sampler, sample_in_center_with_symmetry(), sample_projected_with_symmetry(), sample_spherical_with_symmetry(), blender::ed::sculpt_paint::CurvesSculptCommonContext::scene, self_, blender::geometry::AddCurvesOnMeshInputs::surface, surface_bvh_eval_, blender::geometry::AddCurvesOnMeshInputs::surface_corner_tris, surface_corner_tris_eval_, surface_corner_verts_eval_, surface_eval_, surface_ob_eval_, surface_positions_eval_, surface_uv_map_eval_, blender::Scene::toolsettings, blender::math::transform_point(), blender::geometry::AddCurvesOnMeshInputs::transforms, transforms_, blender::U, use_front_face_, blender::USER_ORBIT_SELECTION, blender::geometry::AddCurvesOnMeshOutputs::uv_error, blender::geometry::AddCurvesOnMeshInputs::uvs, and blender::WM_main_add_notifier().
Referenced by blender::ed::sculpt_paint::AddOperation::on_stroke_extended().
|
inline |
Definition at line 277 of file sculpt_add.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::bke::mesh_surface_sample::compute_bary_coord_in_triangle(), blender::bke::bvh::Tree::ray_intersect(), blender::bke::mesh_surface_sample::sample_corner_attribute_with_bary_coords(), surface_bvh_eval_, surface_corner_tris_eval_, surface_corner_verts_eval_, surface_positions_eval_, and surface_uv_map_eval_.
Referenced by sample_in_center_with_symmetry().
|
inline |
Sample a single point exactly at the mouse position.
Definition at line 258 of file sculpt_add.cc.
References brush_pos_re_, ctx_, curves_id_orig_, blender::bke::CurvesSurfaceTransforms::curves_to_surface, blender::ed::sculpt_paint::CurvesSculptCommonContext::depsgraph, blender::ED_view3d_win_to_segment_clipped(), blender::ed::sculpt_paint::get_symmetry_brush_transforms(), blender::ed::sculpt_paint::CurvesSculptCommonContext::region, sample_in_center(), blender::math::transform_point(), transforms_, blender::ed::sculpt_paint::CurvesSculptCommonContext::v3d, and blender::bke::CurvesSurfaceTransforms::world_to_curves.
Referenced by execute().
|
inline |
Definition at line 310 of file sculpt_add.cc.
References add_amount_, blender::Vector< T, InlineBufferCapacity, Allocator >::append(), brush_pos_re_, brush_radius_re_, ctx_, blender::bke::CurvesSurfaceTransforms::curves_to_surface, blender::ed::sculpt_paint::CurvesSculptCommonContext::depsgraph, blender::ED_view3d_win_to_segment_clipped(), blender::IndexRange::IndexRange(), blender::ed::sculpt_paint::CurvesSculptCommonContext::region, blender::bke::mesh_surface_sample::sample_corner_attribute_with_bary_coords(), blender::bke::mesh_surface_sample::sample_surface_points_projected(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), surface_bvh_eval_, surface_corner_tris_eval_, surface_eval_, surface_uv_map_eval_, blender::math::transform_point(), transforms_, use_front_face_, blender::ed::sculpt_paint::CurvesSculptCommonContext::v3d, and blender::bke::CurvesSurfaceTransforms::world_to_curves.
Referenced by sample_projected_with_symmetry().
|
inline |
Sample points by shooting rays within the brush radius in the 3D view.
Definition at line 301 of file sculpt_add.cc.
References curves_id_orig_, blender::ed::sculpt_paint::get_symmetry_brush_transforms(), and sample_projected().
Referenced by execute().
|
inline |
Definition at line 405 of file sculpt_add.cc.
References add_amount_, blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::math::dot(), blender::RandomNumberGenerator::get_int32(), blender::IndexRange::IndexRange(), M_PI, blender::normal_tri_v3(), blender::pow2f(), blender::bke::bvh::Tree::range_query(), blender::Vector< T, InlineBufferCapacity, Allocator >::remove_and_reorder(), blender::bke::mesh_surface_sample::sample_corner_attribute_with_bary_coords(), blender::bke::mesh_surface_sample::sample_surface_points_spherical(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), surface_bvh_eval_, surface_corner_tris_eval_, surface_corner_verts_eval_, surface_eval_, surface_positions_eval_, surface_uv_map_eval_, and use_front_face_.
Referenced by sample_spherical_with_symmetry().
|
inline |
Sample points in a 3D sphere around the surface position that the mouse hovers over.
Definition at line 361 of file sculpt_add.cc.
References brush_pos_re_, brush_radius_re_, ctx_, curves_id_orig_, blender::bke::CurvesSurfaceTransforms::curves_to_surface, blender::ed::sculpt_paint::CurvesSculptCommonContext::depsgraph, blender::ED_view3d_win_to_segment_clipped(), blender::ed::sculpt_paint::get_symmetry_brush_transforms(), blender::math::normalize(), blender::ed::sculpt_paint::CurvesSculptCommonContext::region, blender::ed::sculpt_paint::sample_curves_surface_3d_brush(), sample_spherical(), surface_bvh_eval_, blender::ed::sculpt_paint::transform_brush_radius(), blender::math::transform_point(), transforms_, blender::ed::sculpt_paint::CurvesSculptCommonContext::v3d, and blender::bke::CurvesSurfaceTransforms::world_to_curves.
Referenced by execute().
| int blender::ed::sculpt_paint::AddOperationExecutor::add_amount_ |
Definition at line 95 of file sculpt_add.cc.
Referenced by execute(), sample_projected(), and sample_spherical().
Definition at line 93 of file sculpt_add.cc.
Referenced by execute().
| float2 blender::ed::sculpt_paint::AddOperationExecutor::brush_pos_re_ |
Definition at line 99 of file sculpt_add.cc.
Referenced by execute(), sample_in_center_with_symmetry(), sample_projected(), and sample_spherical_with_symmetry().
| float blender::ed::sculpt_paint::AddOperationExecutor::brush_radius_re_ |
Definition at line 98 of file sculpt_add.cc.
Referenced by execute(), sample_projected(), and sample_spherical_with_symmetry().
| const BrushCurvesSculptSettings* blender::ed::sculpt_paint::AddOperationExecutor::brush_settings_ = nullptr |
Definition at line 94 of file sculpt_add.cc.
Referenced by execute().
| CurvesSculptCommonContext blender::ed::sculpt_paint::AddOperationExecutor::ctx_ |
Definition at line 78 of file sculpt_add.cc.
Referenced by AddOperationExecutor(), execute(), sample_in_center_with_symmetry(), sample_projected(), and sample_spherical_with_symmetry().
Definition at line 81 of file sculpt_add.cc.
Referenced by execute(), sample_in_center_with_symmetry(), sample_projected_with_symmetry(), and sample_spherical_with_symmetry().
Definition at line 80 of file sculpt_add.cc.
Referenced by execute().
| CurvesGeometry* blender::ed::sculpt_paint::AddOperationExecutor::curves_orig_ = nullptr |
Definition at line 82 of file sculpt_add.cc.
Referenced by ensure_curve_roots_kdtree(), and execute().
| CurvesSculpt* blender::ed::sculpt_paint::AddOperationExecutor::curves_sculpt_ = nullptr |
Definition at line 92 of file sculpt_add.cc.
Referenced by execute().
| AddOperation* blender::ed::sculpt_paint::AddOperationExecutor::self_ = nullptr |
Definition at line 77 of file sculpt_add.cc.
Referenced by ensure_curve_roots_kdtree(), and execute().
| const bke::bvh::Tree* blender::ed::sculpt_paint::AddOperationExecutor::surface_bvh_eval_ |
Definition at line 90 of file sculpt_add.cc.
Referenced by execute(), sample_in_center(), sample_projected(), sample_spherical(), and sample_spherical_with_symmetry().
Definition at line 88 of file sculpt_add.cc.
Referenced by execute(), sample_in_center(), sample_projected(), and sample_spherical().
| Span<int> blender::ed::sculpt_paint::AddOperationExecutor::surface_corner_verts_eval_ |
Definition at line 87 of file sculpt_add.cc.
Referenced by execute(), sample_in_center(), and sample_spherical().
Definition at line 85 of file sculpt_add.cc.
Referenced by execute(), sample_projected(), and sample_spherical().
Definition at line 84 of file sculpt_add.cc.
Referenced by execute().
Definition at line 86 of file sculpt_add.cc.
Referenced by execute(), sample_in_center(), and sample_spherical().
| VArraySpan<float2> blender::ed::sculpt_paint::AddOperationExecutor::surface_uv_map_eval_ |
Definition at line 89 of file sculpt_add.cc.
Referenced by execute(), sample_in_center(), sample_projected(), and sample_spherical().
| CurvesSurfaceTransforms blender::ed::sculpt_paint::AddOperationExecutor::transforms_ |
Definition at line 101 of file sculpt_add.cc.
Referenced by execute(), sample_in_center_with_symmetry(), sample_projected(), and sample_spherical_with_symmetry().
| bool blender::ed::sculpt_paint::AddOperationExecutor::use_front_face_ |
Definition at line 96 of file sculpt_add.cc.
Referenced by execute(), sample_projected(), and sample_spherical().