Blender  V3.3
Namespaces | Classes | Functions | Variables
blender::ed::sculpt_paint Namespace Reference

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
 

Functions

std::unique_ptr< CurvesSculptStrokeOperationnew_add_operation ()
 
static std::optional< float3find_curves_brush_position (const CurvesGeometry &curves, const float3 &ray_start_cu, const float3 &ray_end_cu, const float brush_radius_re, const ARegion &region, const RegionView3D &rv3d, const Object &object, const Span< float3 > positions)
 
std::optional< CurvesBrush3Dsample_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)
 
std::optional< CurvesBrush3Dsample_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)
 
Vector< float4x4get_symmetry_brush_transforms (const eCurvesSymmetryType symmetry)
 
float transform_brush_radius (const float4x4 &transform, const float3 &brush_position, const float old_radius)
 
void move_last_point_and_resample (MutableSpan< float3 > positions, const float3 &new_last_position)
 
void report_empty_original_surface (ReportList *reports)
 
void report_empty_evaluated_surface (ReportList *reports)
 
void report_missing_surface (ReportList *reports)
 
void report_missing_uv_map_on_original_surface (ReportList *reports)
 
void report_missing_uv_map_on_evaluated_surface (ReportList *reports)
 
void report_invalid_uv_map (ReportList *reports)
 
std::unique_ptr< CurvesSculptStrokeOperationnew_comb_operation ()
 
std::unique_ptr< CurvesSculptStrokeOperationnew_delete_operation ()
 
static bool use_add_density_mode (const BrushStrokeMode brush_mode, const bContext &C, const StrokeExtension &stroke_start)
 
std::unique_ptr< CurvesSculptStrokeOperationnew_density_operation (const BrushStrokeMode brush_mode, const bContext &C, const StrokeExtension &stroke_start)
 
std::unique_ptr< CurvesSculptStrokeOperationnew_grow_shrink_operation (const BrushStrokeMode brush_mode, const bContext &C)
 
std::unique_ptr< CurvesSculptStrokeOperationnew_snake_hook_operation ()
 
std::unique_ptr< CurvesSculptStrokeOperationnew_selection_paint_operation (const BrushStrokeMode brush_mode, const bContext &C)
 
std::unique_ptr< CurvesSculptStrokeOperationnew_pinch_operation (const BrushStrokeMode brush_mode, const bContext &C)
 
std::unique_ptr< CurvesSculptStrokeOperationnew_smooth_operation ()
 
std::unique_ptr< CurvesSculptStrokeOperationnew_puff_operation ()
 
std::unique_ptr< CurvesSculptStrokeOperationnew_slide_operation ()
 
VArray< floatget_curves_selection (const Curves &curves_id)
 
VArray< floatget_point_selection (const Curves &curves_id)
 
static void SCULPT_CURVES_OT_select_random (wmOperatorType *ot)
 
static void SCULPT_CURVES_OT_select_end (wmOperatorType *ot)
 
static void SCULPT_CURVES_OT_select_grow (wmOperatorType *ot)
 
static void SCULPT_CURVES_OT_min_distance_edit (wmOperatorType *ot)
 
static VArray< floatget_curves_selection (const CurvesGeometry &curves, const eAttrDomain domain)
 
static VArray< floatget_point_selection (const CurvesGeometry &curves, const eAttrDomain domain)
 
static IndexMask retrieve_selected_curves (const CurvesGeometry &curves, const eAttrDomain domain, Vector< int64_t > &r_indices)
 
IndexMask retrieve_selected_curves (const Curves &curves_id, Vector< int64_t > &r_indices)
 
static IndexMask retrieve_selected_points (const CurvesGeometry &curves, const eAttrDomain domain, Vector< int64_t > &r_indices)
 
IndexMask retrieve_selected_points (const Curves &curves_id, Vector< int64_t > &r_indices)
 
static int aa_samples_per_texel_axis (const Brush *brush, const float radius)
 
static void update_curve_mask (CurveMaskCache *curve_mask_cache, const Brush *brush, const int diameter, const float radius, const float cursor_position[2])
 
static bool is_sampled_curve_valid (const CurveMaskCache *curve_mask_cache, const Brush *brush)
 
static void sampled_curve_free (CurveMaskCache *curve_mask_cache)
 
static void update_sampled_curve (CurveMaskCache *curve_mask_cache, const Brush *brush)
 
static size_t diameter_to_curve_mask_size (const int diameter)
 
static bool is_curve_mask_size_valid (const CurveMaskCache *curve_mask_cache, const int diameter)
 
static void curve_mask_free (CurveMaskCache *curve_mask_cache)
 
static void curve_mask_allocate (CurveMaskCache *curve_mask_cache, const int diameter)
 
* SCULPT_CURVES_OT_brush_stroke
float brush_radius_factor (const Brush &brush, const StrokeExtension &stroke_extension)
 
float brush_radius_get (const Scene &scene, const Brush &brush, const StrokeExtension &stroke_extension)
 
float brush_strength_factor (const Brush &brush, const StrokeExtension &stroke_extension)
 
float brush_strength_get (const Scene &scene, const Brush &brush, const StrokeExtension &stroke_extension)
 
static std::unique_ptr< CurvesSculptStrokeOperationstart_brush_operation (bContext &C, wmOperator &op, const StrokeExtension &stroke_start)
 
static bool stroke_get_location (bContext *C, float out[3], const float mouse[2], bool UNUSED(force_original))
 
static bool stroke_test_start (bContext *C, struct wmOperator *op, const float mouse[2])
 
static void stroke_update_step (bContext *C, wmOperator *op, PaintStroke *UNUSED(stroke), PointerRNA *stroke_element)
 
static void stroke_done (const bContext *C, PaintStroke *stroke)
 
static int sculpt_curves_stroke_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static int sculpt_curves_stroke_modal (bContext *C, wmOperator *op, const wmEvent *event)
 
static void sculpt_curves_stroke_cancel (bContext *C, wmOperator *op)
 
static void SCULPT_CURVES_OT_brush_stroke (struct wmOperatorType *ot)
 
* CURVES_OT_sculptmode_toggle
static void curves_sculptmode_enter (bContext *C)
 
static void curves_sculptmode_exit (bContext *C)
 
static int curves_sculptmode_toggle_exec (bContext *C, wmOperator *op)
 
static void CURVES_OT_sculptmode_toggle (wmOperatorType *ot)
 

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...
 

Detailed Description

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:

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:

Function Documentation

◆ aa_samples_per_texel_axis()

static int blender::ed::sculpt_paint::aa_samples_per_texel_axis ( const Brush brush,
const float  radius 
)
static

◆ brush_radius_factor()

float blender::ed::sculpt_paint::brush_radius_factor ( const Brush brush,
const StrokeExtension stroke_extension 
)

◆ brush_radius_get()

float blender::ed::sculpt_paint::brush_radius_get ( const Scene scene,
const Brush brush,
const StrokeExtension stroke_extension 
)

◆ brush_strength_factor()

float blender::ed::sculpt_paint::brush_strength_factor ( const Brush brush,
const StrokeExtension stroke_extension 
)

◆ brush_strength_get()

float blender::ed::sculpt_paint::brush_strength_get ( const Scene scene,
const Brush brush,
const StrokeExtension stroke_extension 
)

◆ curve_mask_allocate()

static void blender::ed::sculpt_paint::curve_mask_allocate ( CurveMaskCache curve_mask_cache,
const int  diameter 
)
static

◆ curve_mask_free()

static void blender::ed::sculpt_paint::curve_mask_free ( CurveMaskCache curve_mask_cache)
static

◆ CURVES_OT_sculptmode_toggle()

static void blender::ed::sculpt_paint::CURVES_OT_sculptmode_toggle ( wmOperatorType ot)
static

◆ curves_sculptmode_enter()

static void blender::ed::sculpt_paint::curves_sculptmode_enter ( bContext C)
static

◆ curves_sculptmode_exit()

static void blender::ed::sculpt_paint::curves_sculptmode_exit ( bContext C)
static

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().

◆ curves_sculptmode_toggle_exec()

static int blender::ed::sculpt_paint::curves_sculptmode_toggle_exec ( bContext C,
wmOperator op 
)
static

◆ diameter_to_curve_mask_size()

static size_t blender::ed::sculpt_paint::diameter_to_curve_mask_size ( const int  diameter)
static

Definition at line 124 of file paint_image_2d_curve_mask.cc.

Referenced by curve_mask_allocate(), and is_curve_mask_size_valid().

◆ find_curves_brush_position()

static std::optional<float3> blender::ed::sculpt_paint::find_curves_brush_position ( const CurvesGeometry curves,
const float3 ray_start_cu,
const float3 ray_end_cu,
const float  brush_radius_re,
const ARegion region,
const RegionView3D rv3d,
const Object object,
const Span< float3 positions 
)
static

◆ get_curves_selection() [1/2]

VArray< float > blender::ed::sculpt_paint::get_curves_selection ( const Curves curves_id)

◆ get_curves_selection() [2/2]

static VArray<float> blender::ed::sculpt_paint::get_curves_selection ( const CurvesGeometry curves,
const eAttrDomain  domain 
)
static

◆ get_point_selection() [1/2]

VArray< float > blender::ed::sculpt_paint::get_point_selection ( const Curves curves_id)

◆ get_point_selection() [2/2]

static VArray<float> blender::ed::sculpt_paint::get_point_selection ( const CurvesGeometry curves,
const eAttrDomain  domain 
)
static

◆ get_symmetry_brush_transforms()

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().

◆ is_curve_mask_size_valid()

static bool blender::ed::sculpt_paint::is_curve_mask_size_valid ( const CurveMaskCache curve_mask_cache,
const int  diameter 
)
static

◆ is_sampled_curve_valid()

static bool blender::ed::sculpt_paint::is_sampled_curve_valid ( const CurveMaskCache curve_mask_cache,
const Brush brush 
)
static

◆ move_last_point_and_resample()

void blender::ed::sculpt_paint::move_last_point_and_resample ( MutableSpan< float3 positions,
const float3 new_last_position 
)

◆ new_add_operation()

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().

◆ new_comb_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().

◆ new_delete_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().

◆ new_density_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().

◆ new_grow_shrink_operation()

std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_grow_shrink_operation ( const BrushStrokeMode  brush_mode,
const bContext C 
)

◆ new_pinch_operation()

std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_pinch_operation ( const BrushStrokeMode  brush_mode,
const bContext C 
)

◆ new_puff_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().

◆ new_selection_paint_operation()

std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_selection_paint_operation ( const BrushStrokeMode  brush_mode,
const bContext C 
)

◆ new_slide_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().

◆ new_smooth_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().

◆ new_snake_hook_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().

◆ report_empty_evaluated_surface()

void blender::ed::sculpt_paint::report_empty_evaluated_surface ( ReportList reports)

◆ report_empty_original_surface()

void blender::ed::sculpt_paint::report_empty_original_surface ( ReportList reports)

◆ report_invalid_uv_map()

void blender::ed::sculpt_paint::report_invalid_uv_map ( ReportList reports)

◆ report_missing_surface()

void blender::ed::sculpt_paint::report_missing_surface ( ReportList reports)

◆ report_missing_uv_map_on_evaluated_surface()

void blender::ed::sculpt_paint::report_missing_uv_map_on_evaluated_surface ( ReportList reports)

◆ report_missing_uv_map_on_original_surface()

void blender::ed::sculpt_paint::report_missing_uv_map_on_original_surface ( ReportList reports)

◆ retrieve_selected_curves() [1/2]

IndexMask blender::ed::sculpt_paint::retrieve_selected_curves ( const Curves curves_id,
Vector< int64_t > &  r_indices 
)

◆ retrieve_selected_curves() [2/2]

static IndexMask blender::ed::sculpt_paint::retrieve_selected_curves ( const CurvesGeometry curves,
const eAttrDomain  domain,
Vector< int64_t > &  r_indices 
)
static

◆ retrieve_selected_points() [1/2]

IndexMask blender::ed::sculpt_paint::retrieve_selected_points ( const Curves curves_id,
Vector< int64_t > &  r_indices 
)

◆ retrieve_selected_points() [2/2]

static IndexMask blender::ed::sculpt_paint::retrieve_selected_points ( const CurvesGeometry curves,
const eAttrDomain  domain,
Vector< int64_t > &  r_indices 
)
static

◆ sample_curves_3d_brush()

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().

◆ sample_curves_surface_3d_brush()

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 
)

◆ sampled_curve_free()

static void blender::ed::sculpt_paint::sampled_curve_free ( CurveMaskCache curve_mask_cache)
static

◆ SCULPT_CURVES_OT_brush_stroke()

static void blender::ed::sculpt_paint::SCULPT_CURVES_OT_brush_stroke ( struct wmOperatorType ot)
static

◆ SCULPT_CURVES_OT_min_distance_edit()

static void blender::ed::sculpt_paint::SCULPT_CURVES_OT_min_distance_edit ( wmOperatorType ot)
static

◆ SCULPT_CURVES_OT_select_end()

static void blender::ed::sculpt_paint::SCULPT_CURVES_OT_select_end ( wmOperatorType ot)
static

◆ SCULPT_CURVES_OT_select_grow()

static void blender::ed::sculpt_paint::SCULPT_CURVES_OT_select_grow ( wmOperatorType ot)
static

◆ SCULPT_CURVES_OT_select_random()

static void blender::ed::sculpt_paint::SCULPT_CURVES_OT_select_random ( wmOperatorType ot)
static

◆ sculpt_curves_stroke_cancel()

static void blender::ed::sculpt_paint::sculpt_curves_stroke_cancel ( bContext C,
wmOperator op 
)
static

◆ sculpt_curves_stroke_invoke()

static int blender::ed::sculpt_paint::sculpt_curves_stroke_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ sculpt_curves_stroke_modal()

static int blender::ed::sculpt_paint::sculpt_curves_stroke_modal ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ start_brush_operation()

static std::unique_ptr<CurvesSculptStrokeOperation> blender::ed::sculpt_paint::start_brush_operation ( bContext C,
wmOperator op,
const StrokeExtension stroke_start 
)
static

◆ stroke_done()

static void blender::ed::sculpt_paint::stroke_done ( const bContext C,
PaintStroke stroke 
)
static

Definition at line 197 of file curves_sculpt_ops.cc.

References C, and UNUSED_VARS.

Referenced by sculpt_curves_stroke_invoke().

◆ stroke_get_location()

static bool blender::ed::sculpt_paint::stroke_get_location ( bContext C,
float  out[3],
const float  mouse[2],
bool   UNUSEDforce_original 
)
static

Definition at line 153 of file curves_sculpt_ops.cc.

References C, usdtokens::out(), and UNUSED_VARS.

Referenced by sculpt_curves_stroke_invoke().

◆ stroke_test_start()

static bool blender::ed::sculpt_paint::stroke_test_start ( bContext C,
struct wmOperator op,
const float  mouse[2] 
)
static

Definition at line 165 of file curves_sculpt_ops.cc.

References C, and UNUSED_VARS.

Referenced by sculpt_curves_stroke_invoke().

◆ stroke_update_step()

static void blender::ed::sculpt_paint::stroke_update_step ( bContext C,
wmOperator op,
PaintStroke UNUSEDstroke,
PointerRNA stroke_element 
)
static

◆ transform_brush_radius()

float blender::ed::sculpt_paint::transform_brush_radius ( const float4x4 transform,
const float3 brush_position,
const float  old_radius 
)

◆ update_curve_mask()

static void blender::ed::sculpt_paint::update_curve_mask ( CurveMaskCache curve_mask_cache,
const Brush brush,
const int  diameter,
const float  radius,
const float  cursor_position[2] 
)
static

◆ update_sampled_curve()

static void blender::ed::sculpt_paint::update_sampled_curve ( CurveMaskCache curve_mask_cache,
const Brush brush 
)
static

◆ use_add_density_mode()

static bool blender::ed::sculpt_paint::use_add_density_mode ( const BrushStrokeMode  brush_mode,
const bContext C,
const StrokeExtension stroke_start 
)
static

Variable Documentation

◆ AntiAliasingSamplesPerTexelAxisMax

constexpr int blender::ed::sculpt_paint::AntiAliasingSamplesPerTexelAxisMax = 16
constexpr

Definition at line 21 of file paint_image_2d_curve_mask.cc.

Referenced by aa_samples_per_texel_axis().

◆ AntiAliasingSamplesPerTexelAxisMin

constexpr int blender::ed::sculpt_paint::AntiAliasingSamplesPerTexelAxisMin = 3
constexpr

Definition at line 20 of file paint_image_2d_curve_mask.cc.

Referenced by aa_samples_per_texel_axis().

◆ CurveSamplesBaseLen

constexpr int blender::ed::sculpt_paint::CurveSamplesBaseLen = 1024
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().

◆ CurveSamplesLen

constexpr int blender::ed::sculpt_paint::CurveSamplesLen = M_SQRT2 * CurveSamplesBaseLen + 1
constexpr

Number of samples to store in the cache.

M_SQRT2 is used as brushes are circles and the curve_mask is square.

  • 1 to fix floating rounding issues.

Definition at line 32 of file paint_image_2d_curve_mask.cc.

Referenced by update_curve_mask(), and update_sampled_curve().