Blender
V3.3
|
Namespaces | |
canvas | |
image | |
min_distance_edit | |
paint | |
select_end | |
select_grow | |
select_random | |
Classes | |
class | AddOperation |
struct | AddOperationExecutor |
struct | BrushPositionCandidate |
class | CombOperation |
struct | CombOperationExecutor |
class | DeleteOperation |
struct | DeleteOperationExecutor |
class | DensityAddOperation |
struct | DensityAddOperationExecutor |
class | DensitySubtractOperation |
struct | DensitySubtractOperationExecutor |
class | CurvesEffect |
class | ShrinkCurvesEffect |
class | ExtrapolateCurvesEffect |
class | ScaleCurvesEffect |
class | CurvesEffectOperation |
struct | CurvesEffectOperationExecutor |
struct | StrokeExtension |
class | CurvesSculptStrokeOperation |
struct | CurvesBrush3D |
class | CurvesSculptCommonContext |
struct | SculptCurvesBrushStrokeData |
class | PinchOperation |
struct | PinchOperationExecutor |
class | PuffOperation |
struct | PuffOperationExecutor |
class | SelectionPaintOperation |
struct | SelectionPaintOperationExecutor |
struct | SlideCurveInfo |
struct | SlideInfo |
class | SlideOperation |
struct | SlideOperationExecutor |
class | SmoothOperation |
struct | SmoothOperationExecutor |
class | SnakeHookOperation |
struct | SnakeHookOperatorExecutor |
Variables | |
constexpr int | AntiAliasingSamplesPerTexelAxisMin = 3 |
constexpr int | AntiAliasingSamplesPerTexelAxisMax = 16 |
constexpr int | CurveSamplesBaseLen = 1024 |
Number of samples to use between 0..1. More... | |
constexpr int | CurveSamplesLen = M_SQRT2 * CurveSamplesBaseLen + 1 |
Number of samples to store in the cache. More... | |
The code below uses a suffix naming convention to indicate the coordinate space: cu: Local space of the curves object that is being edited. su: Local space of the surface object. wo: World space. re: 2D coordinates within the region.
The code below uses a prefix naming convention to indicate the coordinate space: cu: Local space of the curves object that is being edited. su: Local space of the surface object. wo: World space. re: 2D coordinates within the region.
The code below uses a suffix naming convention to indicate the coordinate space: cu: Local space of the curves object that is being edited. wo: World space. re: 2D coordinates within the region.
The code below uses a suffix naming convention to indicate the coordinate space:
cu
: Local space of the curves object that is being edited.su
: Local space of the surface object.wo
: World space.re
: 2D coordinates within the region.The code below uses a prefix naming convention to indicate the coordinate space: cu
: Local space of the curves object that is being edited. su
: Local space of the surface object. wo
: World space. re
: 2D coordinates within the region.
The code below uses a prefix naming convention to indicate the coordinate space:
cu
: Local space of the curves object that is being edited.su
: Local space of the surface object.wo
: World space.re
: 2D coordinates within the region.
|
static |
Definition at line 34 of file paint_image_2d_curve_mask.cc.
References AntiAliasingSamplesPerTexelAxisMax, AntiAliasingSamplesPerTexelAxisMin, BRUSH_PAINT_ANTIALIASING, clamp_i(), and Brush::sampling_flag.
Referenced by update_curve_mask().
float blender::ed::sculpt_paint::brush_radius_factor | ( | const Brush & | brush, |
const StrokeExtension & | stroke_extension | ||
) |
Definition at line 82 of file curves_sculpt_ops.cc.
References BKE_brush_use_size_pressure(), and blender::ed::sculpt_paint::StrokeExtension::pressure.
Referenced by brush_radius_get(), blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::DeleteOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), and blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute().
float blender::ed::sculpt_paint::brush_radius_get | ( | const Scene & | scene, |
const Brush & | brush, | ||
const StrokeExtension & | stroke_extension | ||
) |
Definition at line 90 of file curves_sculpt_ops.cc.
References BKE_brush_size_get(), brush_radius_factor(), and scene.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), and blender::ed::sculpt_paint::DensityAddOperationExecutor::execute().
float blender::ed::sculpt_paint::brush_strength_factor | ( | const Brush & | brush, |
const StrokeExtension & | stroke_extension | ||
) |
Definition at line 97 of file curves_sculpt_ops.cc.
References BKE_brush_use_alpha_pressure(), and blender::ed::sculpt_paint::StrokeExtension::pressure.
Referenced by brush_strength_get().
float blender::ed::sculpt_paint::brush_strength_get | ( | const Scene & | scene, |
const Brush & | brush, | ||
const StrokeExtension & | stroke_extension | ||
) |
Definition at line 105 of file curves_sculpt_ops.cc.
References BKE_brush_alpha_get(), brush_strength_factor(), and scene.
Referenced by blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), and blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute().
|
static |
Definition at line 140 of file paint_image_2d_curve_mask.cc.
References CurveMaskCache::curve_mask, CurveMaskCache::curve_mask_size, diameter_to_curve_mask_size(), and MEM_mallocN.
Referenced by paint_curve_mask_cache_update().
|
static |
Definition at line 134 of file paint_image_2d_curve_mask.cc.
References CurveMaskCache::curve_mask, CurveMaskCache::curve_mask_size, and MEM_SAFE_FREE.
Referenced by paint_curve_mask_cache_free_data(), and paint_curve_mask_cache_update().
|
static |
Definition at line 331 of file curves_sculpt_ops.cc.
References blender::ed::curves::curves_poll(), curves_sculptmode_toggle_exec(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_sculpt_curves().
Definition at line 277 of file curves_sculpt_ops.cc.
References BKE_paint_ensure(), C, CTX_data_active_object(), CTX_data_scene(), CTX_wm_message_bus(), ToolSettings::curves_sculpt, CURVES_SCULPT_mode_poll_view3d(), DEG_id_tag_update(), ED_paint_cursor_start(), Object::id, ID_RECALC_COPY_ON_WRITE, Object::mode, NC_SCENE, ND_MODE, OB_MODE_SCULPT_CURVES, CurvesSculpt::paint, scene, Scene::toolsettings, WM_event_add_notifier(), and WM_msg_publish_rna_prop.
Referenced by curves_sculptmode_toggle_exec().
Definition at line 296 of file curves_sculpt_ops.cc.
References C, CTX_data_active_object(), Object::mode, and OB_MODE_OBJECT.
Referenced by curves_sculptmode_toggle_exec().
|
static |
Definition at line 302 of file curves_sculpt_ops.cc.
References C, CTX_data_active_object(), CTX_wm_message_bus(), curves_sculptmode_enter(), curves_sculptmode_exit(), DEG_id_tag_update(), ED_object_mode_compat_set(), Object::id, ID_RECALC_COPY_ON_WRITE, Object::mode, NC_SCENE, ND_MODE, OB_MODE_SCULPT_CURVES, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, WM_event_add_notifier(), WM_msg_publish_rna_prop, and WM_toolsystem_update_from_context_view3d().
Referenced by CURVES_OT_sculptmode_toggle().
|
static |
Definition at line 124 of file paint_image_2d_curve_mask.cc.
Referenced by curve_mask_allocate(), and is_curve_mask_size_valid().
|
static |
Determine the 3D position of a brush based on curve segments under a screen position.
Definition at line 52 of file curves_sculpt_brush.cc.
References Freestyle::a, usdtokens::b(), closest_to_line_segment_v3(), curves, blender::ed::sculpt_paint::BrushPositionCandidate::depth_sq_cu, blender::ed::sculpt_paint::BrushPositionCandidate::distance_sq_re, blender::math::distance_squared(), ED_view3d_ob_project_mat_get(), ED_view3d_project_float_v2_m4(), init, blender::threading::parallel_reduce(), blender::ed::sculpt_paint::BrushPositionCandidate::position_cu, pow2f(), blender::IndexRange::size(), UI_UNIT_X, and blender::float4x4::values.
Referenced by sample_curves_3d_brush().
Get the floating point selection on the curve domain, averaged from points if necessary.
Definition at line 27 of file curves_sculpt_selection.cc.
References blender::bke::CurvesGeometry::curves_num(), CV_SCULPT_SELECTION_ENABLED, Curves::flag, blender::VArray< T >::ForSingle(), Curves::geometry, Curves::selection_domain, and blender::bke::CurvesGeometry::wrap().
Referenced by blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), and blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute().
|
static |
Definition at line 13 of file curves_sculpt_selection.cc.
References ATTR_DOMAIN_CURVE, ATTR_DOMAIN_POINT, BLI_assert_unreachable, and curves.
Get the floating point selection on the curve domain, copied from curves if necessary.
Definition at line 50 of file curves_sculpt_selection.cc.
References CV_SCULPT_SELECTION_ENABLED, Curves::flag, blender::VArray< T >::ForSingle(), Curves::geometry, blender::bke::CurvesGeometry::points_num(), Curves::selection_domain, and blender::bke::CurvesGeometry::wrap().
Referenced by blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), and blender::ed::sculpt_paint::SmoothOperationExecutor::execute().
|
static |
Definition at line 36 of file curves_sculpt_selection.cc.
References ATTR_DOMAIN_CURVE, ATTR_DOMAIN_POINT, BLI_assert_unreachable, and curves.
Vector< float4x4 > blender::ed::sculpt_paint::get_symmetry_brush_transforms | ( | const eCurvesSymmetryType | symmetry | ) |
Definition at line 317 of file curves_sculpt_brush.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), CURVES_SYMMETRY_X, CURVES_SYMMETRY_Y, CURVES_SYMMETRY_Z, type, blender::float4x4::values, x, y, and z.
Referenced by blender::ed::sculpt_paint::CombOperationExecutor::comb_projected_with_symmetry(), blender::ed::sculpt_paint::CombOperationExecutor::comb_spherical_with_symmetry(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_projected_with_symmetry(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_spherical_with_symmetry(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curve_weights_projected_with_symmetry(), blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide_with_symmetry(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curves_weights_spherical_with_symmetry(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_projected_smooth_factors_with_symmetry(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_spherical_smooth_factors_with_symmetry(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_projected(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_spherical(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_curve_selection_projected_with_symmetry(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_curve_selection_spherical_with_symmetry(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_point_selection_projected_with_symmetry(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_point_selection_spherical_with_symmetry(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_projected_with_symmetry(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_spherical_with_symmetry(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::projected_snake_hook_with_symmetry(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_projected_with_symmetry(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_spherical_with_symmetry(), blender::ed::sculpt_paint::AddOperationExecutor::sample_in_center_with_symmetry(), blender::ed::sculpt_paint::AddOperationExecutor::sample_projected_with_symmetry(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_projected_with_symmetry(), blender::ed::sculpt_paint::AddOperationExecutor::sample_spherical_with_symmetry(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_spherical_with_symmetry(), and blender::ed::sculpt_paint::SnakeHookOperatorExecutor::spherical_snake_hook_with_symmetry().
|
static |
Definition at line 129 of file paint_image_2d_curve_mask.cc.
References CurveMaskCache::curve_mask_size, and diameter_to_curve_mask_size().
Referenced by paint_curve_mask_cache_update().
|
static |
Definition at line 95 of file paint_image_2d_curve_mask.cc.
References CurveMapping::changed_timestamp, Brush::curve, CurveMaskCache::last_curve_timestamp, and CurveMaskCache::sampled_curve.
Referenced by paint_curve_mask_cache_update().
void blender::ed::sculpt_paint::move_last_point_and_resample | ( | MutableSpan< float3 > | positions, |
const float3 & | new_last_position | ||
) |
Definition at line 355 of file curves_sculpt_brush.cc.
References blender::math::distance(), blender::IndexRange::drop_front(), blender::Array< T, InlineBufferCapacity, Allocator >::first(), blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), indices, blender::Array< T, InlineBufferCapacity, Allocator >::last(), positions, blender::math::safe_divide(), blender::length_parameterize::sample_at_lengths(), and blender::bke::curves::segments_num().
std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_add_operation | ( | ) |
Definition at line 507 of file curves_sculpt_add.cc.
Referenced by start_brush_operation().
std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_comb_operation | ( | ) |
Definition at line 406 of file curves_sculpt_comb.cc.
Referenced by start_brush_operation().
std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_delete_operation | ( | ) |
Definition at line 285 of file curves_sculpt_delete.cc.
Referenced by start_brush_operation().
std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_density_operation | ( | const BrushStrokeMode | brush_mode, |
const bContext & | C, | ||
const StrokeExtension & | stroke_start | ||
) |
Definition at line 913 of file curves_sculpt_density.cc.
References C, and use_add_density_mode().
Referenced by start_brush_operation().
std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_grow_shrink_operation | ( | const BrushStrokeMode | brush_mode, |
const bContext & | C | ||
) |
Definition at line 517 of file curves_sculpt_grow_shrink.cc.
References BKE_paint_brush_for_read(), BRUSH_CURVES_SCULPT_FLAG_SCALE_UNIFORM, BRUSH_DIR_IN, BRUSH_STROKE_INVERT, C, CTX_data_scene(), ToolSettings::curves_sculpt, Brush::curves_sculpt_settings, BrushCurvesSculptSettings::flag, Brush::flag, CurvesSculpt::paint, scene, and Scene::toolsettings.
Referenced by start_brush_operation().
std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_pinch_operation | ( | const BrushStrokeMode | brush_mode, |
const bContext & | C | ||
) |
Definition at line 314 of file curves_sculpt_pinch.cc.
References BKE_paint_brush_for_read(), BRUSH_DIR_IN, BRUSH_STROKE_INVERT, C, CTX_data_scene(), ToolSettings::curves_sculpt, Brush::flag, CurvesSculpt::paint, scene, and Scene::toolsettings.
Referenced by start_brush_operation().
std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_puff_operation | ( | ) |
Definition at line 377 of file curves_sculpt_puff.cc.
Referenced by start_brush_operation().
std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_selection_paint_operation | ( | const BrushStrokeMode | brush_mode, |
const bContext & | C | ||
) |
Definition at line 388 of file curves_sculpt_selection_paint.cc.
References BKE_paint_brush(), BRUSH_DIR_IN, BRUSH_STROKE_INVERT, BRUSH_STROKE_SMOOTH, C, CTX_data_scene(), ToolSettings::curves_sculpt, ELEM, Brush::flag, CurvesSculpt::paint, scene, and Scene::toolsettings.
Referenced by start_brush_operation().
std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_slide_operation | ( | ) |
Definition at line 489 of file curves_sculpt_slide.cc.
Referenced by start_brush_operation().
std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_smooth_operation | ( | ) |
Definition at line 256 of file curves_sculpt_smooth.cc.
Referenced by start_brush_operation().
std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_snake_hook_operation | ( | ) |
Definition at line 306 of file curves_sculpt_snake_hook.cc.
Referenced by start_brush_operation().
void blender::ed::sculpt_paint::report_empty_evaluated_surface | ( | ReportList * | reports | ) |
Definition at line 399 of file curves_sculpt_brush.cc.
References BKE_report(), RPT_WARNING, and TIP_.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), and blender::ed::sculpt_paint::SlideOperationExecutor::execute().
void blender::ed::sculpt_paint::report_empty_original_surface | ( | ReportList * | reports | ) |
Definition at line 394 of file curves_sculpt_brush.cc.
References BKE_report(), RPT_WARNING, and TIP_.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), and blender::ed::sculpt_paint::SlideOperationExecutor::execute().
void blender::ed::sculpt_paint::report_invalid_uv_map | ( | ReportList * | reports | ) |
Definition at line 421 of file curves_sculpt_brush.cc.
References BKE_report(), RPT_WARNING, and TIP_.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute().
void blender::ed::sculpt_paint::report_missing_surface | ( | ReportList * | reports | ) |
Definition at line 404 of file curves_sculpt_brush.cc.
References BKE_report(), RPT_WARNING, and TIP_.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), and blender::ed::sculpt_paint::SlideOperationExecutor::execute().
void blender::ed::sculpt_paint::report_missing_uv_map_on_evaluated_surface | ( | ReportList * | reports | ) |
Definition at line 415 of file curves_sculpt_brush.cc.
References BKE_report(), RPT_WARNING, and TIP_.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), and blender::ed::sculpt_paint::SlideOperationExecutor::execute().
void blender::ed::sculpt_paint::report_missing_uv_map_on_original_surface | ( | ReportList * | reports | ) |
Definition at line 409 of file curves_sculpt_brush.cc.
References BKE_report(), RPT_WARNING, and TIP_.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), and blender::ed::sculpt_paint::SlideOperationExecutor::execute().
IndexMask blender::ed::sculpt_paint::retrieve_selected_curves | ( | const Curves & | curves_id, |
Vector< int64_t > & | r_indices | ||
) |
Definition at line 97 of file curves_sculpt_selection.cc.
References CV_SCULPT_SELECTION_ENABLED, Curves::flag, Curves::geometry, Curves::selection_domain, and blender::bke::image::partial_update::wrap().
|
static |
Definition at line 59 of file curves_sculpt_selection.cc.
References ATTR_DOMAIN_CURVE, ATTR_DOMAIN_POINT, BLI_assert_unreachable, curves, blender::index_mask_ops::find_indices_based_on_predicate(), blender::VArrayCommon< T >::get_internal_single(), and blender::VArrayCommon< T >::is_single().
Referenced by blender::ed::spreadsheet::GeometryDataSource::apply_selection_filter(), blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::DeleteOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), and blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute().
IndexMask blender::ed::sculpt_paint::retrieve_selected_points | ( | const Curves & | curves_id, |
Vector< int64_t > & | r_indices | ||
) |
Definition at line 142 of file curves_sculpt_selection.cc.
References CV_SCULPT_SELECTION_ENABLED, Curves::flag, Curves::geometry, Curves::selection_domain, and blender::bke::image::partial_update::wrap().
|
static |
Definition at line 107 of file curves_sculpt_selection.cc.
References ATTR_DOMAIN_CURVE, ATTR_DOMAIN_POINT, BLI_assert_unreachable, curves, blender::index_mask_ops::find_indices_based_on_predicate(), blender::VArrayCommon< T >::get_internal_single(), and blender::VArrayCommon< T >::is_single().
Referenced by blender::ed::spreadsheet::GeometryDataSource::apply_selection_filter().
std::optional< CurvesBrush3D > blender::ed::sculpt_paint::sample_curves_3d_brush | ( | const Depsgraph & | depsgraph, |
const ARegion & | region, | ||
const View3D & | v3d, | ||
const RegionView3D & | rv3d, | ||
const Object & | curves_object, | ||
const float2 & | brush_pos_re, | ||
const float | brush_radius_re | ||
) |
Find 3d brush position based on cursor position for curves sculpting.
Definition at line 174 of file curves_sculpt_brush.cc.
References BKE_bvhtree_from_mesh_get(), BKE_object_get_evaluated_mesh(), BLI_bvhtree_ray_cast(), BLI_SCOPED_DEFER, BVHTREE_FROM_LOOPTRI, BVHTreeRayHit::co, curves, Object::data, DEG_get_evaluated_object(), depsgraph, BVHTreeRayHit::dist, dist_to_line_v3(), blender::math::distance(), ED_view3d_win_to_segment_clipped(), find_curves_brush_position(), free_bvhtree_from_mesh(), Curves::geometry, blender::bke::crazyspace::get_evaluated_curves_deformation(), BVHTreeRayHit::index, blender::float4x4::inverted(), blender::math::normalize(), Object::obmat, blender::ed::sculpt_paint::CurvesBrush3D::position_cu, blender::bke::crazyspace::GeometryDeformation::positions, blender::ed::sculpt_paint::CurvesBrush3D::radius_cu, BVHTreeFromMesh::raycast_callback, Curves::surface, BVHTreeFromMesh::tree, and blender::bke::image::partial_update::wrap().
Referenced by blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute(), blender::ed::sculpt_paint::CombOperationExecutor::initialize_spherical_brush_reference_point(), blender::ed::sculpt_paint::DeleteOperationExecutor::initialize_spherical_brush_reference_point(), and blender::ed::sculpt_paint::SelectionPaintOperationExecutor::initialize_spherical_brush_reference_point().
std::optional< CurvesBrush3D > blender::ed::sculpt_paint::sample_curves_surface_3d_brush | ( | const Depsgraph & | depsgraph, |
const ARegion & | region, | ||
const View3D & | v3d, | ||
const CurvesSurfaceTransforms & | transforms, | ||
const BVHTreeFromMesh & | surface_bvh, | ||
const float2 & | brush_pos_re, | ||
const float | brush_radius_re | ||
) |
Definition at line 268 of file curves_sculpt_brush.cc.
References BLI_bvhtree_ray_cast(), BVHTreeRayHit::co, depsgraph, BVHTreeRayHit::dist, dist_to_line_v3(), ED_view3d_win_to_segment_clipped(), BVHTreeRayHit::index, blender::math::normalize(), BVHTreeFromMesh::raycast_callback, blender::bke::CurvesSurfaceTransforms::surface_to_curves, BVHTreeFromMesh::tree, blender::bke::CurvesSurfaceTransforms::world_to_curves, and blender::bke::CurvesSurfaceTransforms::world_to_surface.
Referenced by blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide_with_symmetry(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_spherical_with_symmetry(), blender::ed::sculpt_paint::AddOperationExecutor::sample_spherical_with_symmetry(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_spherical_with_symmetry(), and use_add_density_mode().
|
static |
Definition at line 103 of file paint_image_2d_curve_mask.cc.
References CurveMaskCache::last_curve_timestamp, MEM_SAFE_FREE, and CurveMaskCache::sampled_curve.
Referenced by paint_curve_mask_cache_free_data().
|
static |
Definition at line 256 of file curves_sculpt_ops.cc.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_stroke_operator_properties(), sculpt_curves_stroke_cancel(), sculpt_curves_stroke_invoke(), and sculpt_curves_stroke_modal().
Referenced by ED_operatortypes_sculpt_curves().
|
static |
Definition at line 1256 of file curves_sculpt_ops.cc.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_invoke(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_modal(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_poll(), wmOperatorType::modal, wmOperatorType::name, OPTYPE_DEPENDS_ON_CURSOR, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_sculpt_curves().
|
static |
Definition at line 571 of file curves_sculpt_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, INT32_MAX, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), RNA_def_int(), blender::ed::sculpt_paint::select_end::select_end_exec(), blender::ed::sculpt_paint::select_end::select_end_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt_curves().
|
static |
Definition at line 901 of file curves_sculpt_ops.cc.
References wmOperatorType::description, blender::ed::curves::editable_curves_poll(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_DISTANCE, RNA_def_float(), RNA_def_property_subtype(), blender::ed::sculpt_paint::select_grow::select_grow_invoke(), blender::ed::sculpt_paint::select_grow::select_grow_modal(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt_curves().
|
static |
Definition at line 474 of file curves_sculpt_ops.cc.
References wmOperatorType::description, blender::ed::curves::editable_curves_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, INT32_MAX, INT32_MIN, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), RNA_def_float(), RNA_def_int(), blender::ed::sculpt_paint::select_random::select_random_exec(), blender::ed::sculpt_paint::select_random::select_random_ui(), wmOperatorType::srna, and wmOperatorType::ui.
Referenced by ED_operatortypes_sculpt_curves().
|
static |
Definition at line 246 of file curves_sculpt_ops.cc.
References C, wmOperator::customdata, paint_stroke_cancel(), and blender::ed::sculpt_paint::SculptCurvesBrushStrokeData::stroke.
Referenced by SCULPT_CURVES_OT_brush_stroke().
|
static |
Definition at line 202 of file curves_sculpt_ops.cc.
References BKE_paint_brush_for_read(), BKE_paint_get_active_from_context(), C, wmOperator::customdata, wmOperatorType::modal, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, paint_stroke_free(), paint_stroke_new(), blender::ed::sculpt_paint::SculptCurvesBrushStrokeData::stroke, stroke_done(), stroke_get_location(), stroke_test_start(), stroke_update_step(), wmOperator::type, wmEvent::type, and WM_event_add_modal_handler().
Referenced by SCULPT_CURVES_OT_brush_stroke().
|
static |
Definition at line 234 of file curves_sculpt_ops.cc.
References C, wmOperator::customdata, ELEM, OPERATOR_CANCELLED, OPERATOR_FINISHED, paint_stroke_modal(), and blender::ed::sculpt_paint::SculptCurvesBrushStrokeData::stroke.
Referenced by SCULPT_CURVES_OT_brush_stroke().
|
static |
Definition at line 112 of file curves_sculpt_ops.cc.
References BKE_paint_brush_for_read(), BLI_assert_unreachable, C, CTX_data_scene(), ToolSettings::curves_sculpt, Brush::curves_sculpt_tool, CURVES_SCULPT_TOOL_ADD, CURVES_SCULPT_TOOL_COMB, CURVES_SCULPT_TOOL_DELETE, CURVES_SCULPT_TOOL_DENSITY, CURVES_SCULPT_TOOL_GROW_SHRINK, CURVES_SCULPT_TOOL_PINCH, CURVES_SCULPT_TOOL_PUFF, CURVES_SCULPT_TOOL_SELECTION_PAINT, CURVES_SCULPT_TOOL_SLIDE, CURVES_SCULPT_TOOL_SMOOTH, CURVES_SCULPT_TOOL_SNAKE_HOOK, new_add_operation(), new_comb_operation(), new_delete_operation(), new_density_operation(), new_grow_shrink_operation(), new_pinch_operation(), new_puff_operation(), new_selection_paint_operation(), new_slide_operation(), new_smooth_operation(), new_snake_hook_operation(), CurvesSculpt::paint, wmOperator::ptr, RNA_enum_get(), scene, and Scene::toolsettings.
Referenced by stroke_update_step().
|
static |
Definition at line 197 of file curves_sculpt_ops.cc.
References C, and UNUSED_VARS.
Referenced by sculpt_curves_stroke_invoke().
|
static |
Definition at line 153 of file curves_sculpt_ops.cc.
References C, usdtokens::out(), and UNUSED_VARS.
Referenced by sculpt_curves_stroke_invoke().
|
static |
Definition at line 165 of file curves_sculpt_ops.cc.
References C, and UNUSED_VARS.
Referenced by sculpt_curves_stroke_invoke().
|
static |
Definition at line 171 of file curves_sculpt_ops.cc.
References C, wmOperator::customdata, blender::ed::sculpt_paint::StrokeExtension::is_first, blender::ed::sculpt_paint::StrokeExtension::mouse_position, blender::ed::sculpt_paint::SculptCurvesBrushStrokeData::operation, blender::ed::sculpt_paint::StrokeExtension::pressure, blender::ed::sculpt_paint::StrokeExtension::reports, wmOperator::reports, RNA_float_get(), RNA_float_get_array(), and start_brush_operation().
Referenced by sculpt_curves_stroke_invoke().
float blender::ed::sculpt_paint::transform_brush_radius | ( | const float4x4 & | transform, |
const float3 & | brush_position, | ||
const float | old_radius | ||
) |
Definition at line 345 of file curves_sculpt_brush.cc.
References blender::math::distance(), and transform().
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::sample_spherical_with_symmetry(), and blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_spherical_with_symmetry().
|
static |
Definition at line 48 of file paint_image_2d_curve_mask.cc.
References aa_samples_per_texel_axis(), BLI_assert, CurveMaskCache::curve_mask, CurveSamplesBaseLen, CurveSamplesLen, float(), floorf, len, len_v2v2(), max_ff(), min_ii(), offset, CurveMaskCache::sampled_curve, x, and y.
Referenced by paint_curve_mask_cache_update().
|
static |
Definition at line 109 of file paint_image_2d_curve_mask.cc.
References BKE_brush_curve_strength_clamped(), CurveMapping::changed_timestamp, Brush::curve, CurveSamplesBaseLen, CurveSamplesLen, float(), CurveMaskCache::last_curve_timestamp, len, MEM_mallocN, and CurveMaskCache::sampled_curve.
Referenced by paint_curve_mask_cache_update().
|
static |
Detects whether the brush should be in Add or Subtract mode.
Definition at line 801 of file curves_sculpt_density.cc.
References BKE_brush_size_get(), BKE_bvhtree_from_mesh_get(), BKE_object_get_evaluated_mesh(), BKE_paint_brush_for_read(), BLI_SCOPED_DEFER, BRUSH_CURVES_SCULPT_DENSITY_MODE_ADD, BRUSH_CURVES_SCULPT_DENSITY_MODE_REMOVE, BRUSH_STROKE_INVERT, BVHTREE_FROM_LOOPTRI, C, CTX_data_active_object(), CTX_data_depsgraph_on_load(), CTX_data_scene(), CTX_wm_region(), CTX_wm_view3d(), curves, ToolSettings::curves_sculpt, Brush::curves_sculpt_settings, Object::data, DEG_get_evaluated_object(), BrushCurvesSculptSettings::density_mode, depsgraph, free_bvhtree_from_mesh(), Curves::geometry, blender::bke::crazyspace::get_evaluated_curves_deformation(), blender::ed::sculpt_paint::StrokeExtension::mouse_position, CurvesSculpt::paint, blender::threading::parallel_for(), pow2f(), sample_curves_surface_3d_brush(), scene, Curves::surface, Scene::toolsettings, and blender::bke::image::partial_update::wrap().
Referenced by new_density_operation().
|
constexpr |
Definition at line 21 of file paint_image_2d_curve_mask.cc.
Referenced by aa_samples_per_texel_axis().
|
constexpr |
Definition at line 20 of file paint_image_2d_curve_mask.cc.
Referenced by aa_samples_per_texel_axis().
|
constexpr |
Number of samples to use between 0..1.
Definition at line 25 of file paint_image_2d_curve_mask.cc.
Referenced by update_curve_mask(), and update_sampled_curve().
|
constexpr |
Number of samples to store in the cache.
M_SQRT2 is used as brushes are circles and the curve_mask is square.
Definition at line 32 of file paint_image_2d_curve_mask.cc.
Referenced by update_curve_mask(), and update_sampled_curve().