Blender V5.0
blender::ed::sculpt_paint Namespace Reference

Namespaces

namespace  expand
namespace  filter
namespace  undo
namespace  face_set
namespace  brushes
namespace  select_random
namespace  select_grow
namespace  min_distance_edit
namespace  greasepencil
namespace  auto_mask
namespace  tests
namespace  canvas
namespace  hide
namespace  image
namespace  vwpaint
namespace  mask
namespace  boundary
namespace  dyntopo
namespace  islands
namespace  cloth
namespace  color
namespace  flood_fill
namespace  geodesic
namespace  gesture
namespace  pose
namespace  project
namespace  trim
namespace  paint
namespace  smooth

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
struct  MoveAndResampleBuffers
class  CurvesSculptCommonContext
struct  CurvesConstraintSolver
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
struct  GreasePencilFillOpData
struct  FillToolTargetInfo
struct  InputSample
class  GreasePencilStrokeOperation
struct  MeshAttributeData
struct  LoadTexData
struct  PaintCursorContext
class  PaintModeData
struct  PaintSample
struct  PaintStroke
struct  AreaNormalCenterData
struct  SampleLocalData
struct  RaycastData
struct  FindNearestToRayData
struct  NearestVertData
struct  ShapeKeyData
class  PositionDeformData
struct  StrokeCache
struct  CursorGeometryInfo
struct  OrigPositionData
struct  TransformLocalData
struct  AveragePositionAccumulation
class  CurvesGeometry
struct  CurvesSurfaceTransforms
class  ReverseUVSampler

Typedefs

using DeltaProjectionFunc
using StrokeGetLocation
using StrokeTestStart = bool (*)(bContext *C, wmOperator *op, const float mouse[2])
using StrokeUpdateStep
using StrokeRedraw = void (*)(const bContext *C, PaintStroke *stroke, bool final)
using StrokeDone = void (*)(const bContext *C, PaintStroke *stroke)
using BrushActionFunc
using BMeshNeighborVerts = Vector<BMVert *, 64>

Enumerations

enum class  PaintCursorDrawingType { Curve , Cursor2D , Cursor3D }
enum class  AverageDataFlags : uint8_t { Position = 1 << 0 , Normal = 1 << 1 , All = Position | Normal }
enum class  UpdateType {
  Position , Mask , Visibility , Color ,
  Image , FaceSet
}
enum class  TransformDisplacementMode { Original = 0 , Incremental = 1 }
enum class  PivotPositionMode {
  Origin = 0 , Unmasked = 1 , MaskBorder = 2 , ActiveVert = 3 ,
  CursorSurface = 4
}

Functions

bool report_if_shape_key_is_locked (const Object &ob, ReportList *reports)
void operatortypes_sculpt ()
void keymap_sculpt (wmKeyConfig *keyconf)
void update_modal_transform (bContext *C, Object &ob)
void cancel_modal_transform (bContext *C, Object &ob)
void init_transform (bContext *C, Object &ob, const float mval_fl[2], const char *undo_name)
void end_transform (bContext *C, Object &ob)
bool object_active_color_fill (Object &ob, const float fill_color[4], bool only_selected)
void store_mesh_from_eval (const wmOperator &op, const Scene &scene, const Depsgraph &depsgraph, const RegionView3D *rv3d, Object &object, Mesh *new_mesh)
static wmOperatorStatus brush_asset_activate_exec (bContext *C, wmOperator *op)
void BRUSH_OT_asset_activate (wmOperatorType *ot)
static bool brush_asset_save_as_poll (bContext *C)
static wmOperatorStatus brush_asset_save_as_exec (bContext *C, wmOperator *op)
static bool library_is_editable (const AssetLibraryReference &library)
static wmOperatorStatus brush_asset_save_as_invoke (bContext *C, wmOperator *op, const wmEvent *)
static const EnumPropertyItemrna_asset_library_reference_itemf (bContext *, PointerRNA *, PropertyRNA *, bool *r_free)
static void visit_library_prop_catalogs_catalog_for_search_fn (const bContext *C, PointerRNA *ptr, PropertyRNA *, const char *edit_text, FunctionRef< void(StringPropertySearchVisitParams)> visit_fn)
void BRUSH_OT_asset_save_as (wmOperatorType *ot)
static wmOperatorStatus brush_asset_edit_metadata_exec (bContext *C, wmOperator *op)
static wmOperatorStatus brush_asset_edit_metadata_invoke (bContext *C, wmOperator *op, const wmEvent *)
static void visit_active_library_catalogs_catalog_for_search_fn (const bContext *C, PointerRNA *, PropertyRNA *, const char *edit_text, FunctionRef< void(StringPropertySearchVisitParams)> visit_fn)
static bool brush_asset_edit_metadata_poll (bContext *C)
void BRUSH_OT_asset_edit_metadata (wmOperatorType *ot)
static wmOperatorStatus brush_asset_load_preview_exec (bContext *C, wmOperator *op)
static wmOperatorStatus brush_asset_load_preview_invoke (bContext *C, wmOperator *op, const wmEvent *event)
void BRUSH_OT_asset_load_preview (wmOperatorType *ot)
static bool brush_asset_delete_poll (bContext *C)
static wmOperatorStatus brush_asset_delete_exec (bContext *C, wmOperator *op)
static wmOperatorStatus brush_asset_delete_invoke (bContext *C, wmOperator *op, const wmEvent *)
void BRUSH_OT_asset_delete (wmOperatorType *ot)
static std::optional< AssetLibraryReferenceget_asset_library_reference (const bContext &C, const Paint &paint, const Brush &brush)
static bool brush_asset_save_poll (bContext *C)
static wmOperatorStatus brush_asset_save_exec (bContext *C, wmOperator *op)
void BRUSH_OT_asset_save (wmOperatorType *ot)
static bool brush_asset_revert_poll (bContext *C)
static wmOperatorStatus brush_asset_revert_exec (bContext *C, wmOperator *op)
void BRUSH_OT_asset_revert (wmOperatorType *ot)
void calc_smooth_translations (const Depsgraph &depsgraph, const Object &object, const IndexMask &node_mask, const MutableSpan< float3 > translations)
void geometry_preview_lines_update (Depsgraph &depsgraph, Object &object, SculptSession &ss, float radius)
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 bke::BVHTreeFromMesh &surface_bvh, const float2 &brush_pos_re, const float brush_radius_re)
Vector< float4x4get_symmetry_brush_transforms (const eCurvesSymmetryType symmetry)
void remember_stroke_position (CurvesSculpt &curves_sculpt, const float3 &brush_position_wo)
float transform_brush_radius (const float4x4 &transform, const float3 &brush_position, const float old_radius)
void move_last_point_and_resample (MoveAndResampleBuffers &buffer, 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 ()
bke::SpanAttributeWriter< floatfloat_selection_ensure (Curves &curves_id)
static void SCULPT_CURVES_OT_select_random (wmOperatorType *ot)
static void SCULPT_CURVES_OT_select_grow (wmOperatorType *ot)
static void SCULPT_CURVES_OT_min_distance_edit (wmOperatorType *ot)
void scale_translations (MutableSpan< float3 > translations, Span< float > factors)
void scale_translations (MutableSpan< float3 > translations, float factor)
void scale_factors (MutableSpan< float > factors, float strength)
void scale_factors (MutableSpan< float > factors, Span< float > strengths)
void translations_from_offset_and_factors (const float3 &offset, Span< float > factors, MutableSpan< float3 > r_translations)
void translations_from_new_positions (Span< float3 > new_positions, Span< int > verts, Span< float3 > old_positions, MutableSpan< float3 > translations)
void translations_from_new_positions (Span< float3 > new_positions, Span< float3 > old_positions, MutableSpan< float3 > translations)
template<typename T>
void gather_data_mesh (Span< T > src, Span< int > indices, MutableSpan< T > dst)
template<typename T>
MutableSpan< Tgather_data_mesh (const Span< T > src, const Span< int > indices, Vector< T > &dst)
template<typename T>
void gather_data_grids (const SubdivCCG &subdiv_ccg, Span< T > src, Span< int > grids, MutableSpan< T > node_data)
template<typename T>
MutableSpan< Tgather_data_grids (const SubdivCCG &subdiv_ccg, const Span< T > src, const Span< int > grids, Vector< T > &dst)
template<typename T>
void gather_data_bmesh (Span< T > src, const Set< BMVert *, 0 > &verts, MutableSpan< T > node_data)
template<typename T>
MutableSpan< Tgather_data_bmesh (const Span< T > src, const Set< BMVert *, 0 > &verts, Vector< T > &dst)
template<typename T>
void scatter_data_mesh (Span< T > src, Span< int > indices, MutableSpan< T > dst)
template<typename T>
void scatter_data_grids (const SubdivCCG &subdiv_ccg, Span< T > node_data, Span< int > grids, MutableSpan< T > dst)
template<typename T>
void scatter_data_bmesh (Span< T > node_data, const Set< BMVert *, 0 > &verts, MutableSpan< T > dst)
MutableSpan< float3gather_grids_positions (const SubdivCCG &subdiv_ccg, const Span< int > grids, Vector< float3 > &positions)
void gather_bmesh_positions (const Set< BMVert *, 0 > &verts, MutableSpan< float3 > positions)
MutableSpan< float3gather_bmesh_positions (const Set< BMVert *, 0 > &verts, Vector< float3 > &positions)
void gather_grids_normals (const SubdivCCG &subdiv_ccg, Span< int > grids, MutableSpan< float3 > normals)
void gather_bmesh_normals (const Set< BMVert *, 0 > &verts, MutableSpan< float3 > normals)
void calc_factors_common_mesh (const Depsgraph &depsgraph, const Brush &brush, const Object &object, const MeshAttributeData &attribute_data, Span< float3 > positions, Span< float3 > vert_normals, const bke::pbvh::MeshNode &node, Vector< float > &r_factors, Vector< float > &r_distances)
void calc_factors_common_mesh_indexed (const Depsgraph &depsgraph, const Brush &brush, const Object &object, const MeshAttributeData &attribute_data, Span< float3 > vert_positions, Span< float3 > vert_normals, const bke::pbvh::MeshNode &node, Vector< float > &r_factors, Vector< float > &r_distances)
void calc_factors_common_mesh_indexed (const Depsgraph &depsgraph, const Brush &brush, const Object &object, const MeshAttributeData &attribute_data, Span< float3 > vert_positions, Span< float3 > vert_normals, const bke::pbvh::MeshNode &node, MutableSpan< float > factors, MutableSpan< float > distances)
void calc_factors_common_grids (const Depsgraph &depsgraph, const Brush &brush, const Object &object, Span< float3 > positions, const bke::pbvh::GridsNode &node, Vector< float > &r_factors, Vector< float > &r_distances)
void calc_factors_common_bmesh (const Depsgraph &depsgraph, const Brush &brush, const Object &object, Span< float3 > positions, bke::pbvh::BMeshNode &node, Vector< float > &r_factors, Vector< float > &r_distances)
void calc_factors_common_from_orig_data_mesh (const Depsgraph &depsgraph, const Brush &brush, const Object &object, const MeshAttributeData &attribute_data, Span< float3 > positions, Span< float3 > normals, const bke::pbvh::MeshNode &node, Vector< float > &r_factors, Vector< float > &r_distances)
void calc_factors_common_from_orig_data_grids (const Depsgraph &depsgraph, const Brush &brush, const Object &object, Span< float3 > positions, Span< float3 > normals, const bke::pbvh::GridsNode &node, Vector< float > &r_factors, Vector< float > &r_distances)
void calc_factors_common_from_orig_data_bmesh (const Depsgraph &depsgraph, const Brush &brush, const Object &object, Span< float3 > positions, Span< float3 > normals, bke::pbvh::BMeshNode &node, Vector< float > &r_factors, Vector< float > &r_distances)
void fill_factor_from_hide (Span< bool > hide_vert, Span< int > verts, MutableSpan< float > r_factors)
void fill_factor_from_hide (const SubdivCCG &subdiv_ccg, Span< int > grids, MutableSpan< float > r_factors)
void fill_factor_from_hide (const Set< BMVert *, 0 > &verts, MutableSpan< float > r_factors)
void fill_factor_from_hide_and_mask (Span< bool > hide_vert, Span< float > mask, Span< int > verts, MutableSpan< float > r_factors)
void fill_factor_from_hide_and_mask (const SubdivCCG &subdiv_ccg, Span< int > grids, MutableSpan< float > r_factors)
void fill_factor_from_hide_and_mask (const BMesh &bm, const Set< BMVert *, 0 > &verts, MutableSpan< float > r_factors)
void calc_front_face (const float3 &view_normal, Span< float3 > normals, MutableSpan< float > factors)
void calc_front_face (const float3 &view_normal, Span< float3 > vert_normals, Span< int > verts, MutableSpan< float > factors)
void calc_front_face (const float3 &view_normal, const SubdivCCG &subdiv_ccg, Span< int > grids, MutableSpan< float > factors)
void calc_front_face (const float3 &view_normal, const Set< BMVert *, 0 > &verts, MutableSpan< float > factors)
void calc_front_face (const float3 &view_normal, const Set< BMFace *, 0 > &faces, MutableSpan< float > factors)
void filter_region_clip_factors (const SculptSession &ss, Span< float3 > vert_positions, Span< int > verts, MutableSpan< float > factors)
void filter_region_clip_factors (const SculptSession &ss, Span< float3 > positions, MutableSpan< float > factors)
void calc_brush_distances (const SculptSession &ss, Span< float3 > vert_positions, Span< int > vert, eBrushFalloffShape falloff_shape, MutableSpan< float > r_distances)
void calc_brush_distances (const SculptSession &ss, Span< float3 > positions, eBrushFalloffShape falloff_shape, MutableSpan< float > r_distances)
void calc_brush_distances_squared (const SculptSession &ss, Span< float3 > positions, Span< int > verts, eBrushFalloffShape falloff_shape, MutableSpan< float > r_distances)
void calc_brush_distances_squared (const SculptSession &ss, Span< float3 > positions, eBrushFalloffShape falloff_shape, MutableSpan< float > r_distances)
void filter_distances_with_radius (float radius, Span< float > distances, MutableSpan< float > factors)
template<typename T>
void calc_brush_cube_distances (const Brush &brush, const Span< T > positions, const MutableSpan< float > r_distances)
void apply_hardness_to_distances (float radius, float hardness, MutableSpan< float > distances)
void apply_hardness_to_distances (const StrokeCache &cache, const MutableSpan< float > distances)
void calc_brush_strength_factors (const StrokeCache &cache, const Brush &brush, Span< float > distances, MutableSpan< float > factors)
void calc_brush_texture_factors (const SculptSession &ss, const Brush &brush, Span< float3 > vert_positions, Span< int > vert, MutableSpan< float > factors)
void calc_brush_texture_factors (const SculptSession &ss, const Brush &brush, Span< float3 > positions, MutableSpan< float > factors)
void apply_translations (Span< float3 > translations, Span< int > verts, MutableSpan< float3 > positions)
void apply_translations (Span< float3 > translations, Span< int > grids, SubdivCCG &subdiv_ccg)
void apply_translations (Span< float3 > translations, const Set< BMVert *, 0 > &verts)
void project_translations (MutableSpan< float3 > translations, const float3 &plane)
void reset_translations_to_original (MutableSpan< float3 > translations, Span< float3 > positions, Span< float3 > orig_positions)
void apply_crazyspace_to_translations (Span< float3x3 > deform_imats, Span< int > verts, MutableSpan< float3 > translations)
void clip_and_lock_translations (const Sculpt &sd, const SculptSession &ss, Span< float3 > positions, Span< int > verts, MutableSpan< float3 > translations)
void clip_and_lock_translations (const Sculpt &sd, const SculptSession &ss, Span< float3 > positions, MutableSpan< float3 > translations)
OffsetIndices< int > create_node_vert_offsets (Span< bke::pbvh::MeshNode > nodes, const IndexMask &node_mask, Array< int > &node_data)
OffsetIndices< int > create_node_vert_offsets (const CCGKey &key, Span< bke::pbvh::GridsNode > nodes, const IndexMask &node_mask, Array< int > &node_data)
OffsetIndices< int > create_node_vert_offsets_bmesh (Span< bke::pbvh::BMeshNode > nodes, const IndexMask &node_mask, Array< int > &node_data)
GroupedSpan< int > calc_vert_neighbors (OffsetIndices< int > faces, Span< int > corner_verts, GroupedSpan< int > vert_to_face, Span< bool > hide_poly, Span< int > verts, Vector< int > &r_offset_data, Vector< int > &r_data)
GroupedSpan< int > calc_vert_neighbors (const SubdivCCG &subdiv_ccg, Span< int > grids, Vector< int > &r_offset_data, Vector< int > &r_data)
GroupedSpan< BMVert * > calc_vert_neighbors (Set< BMVert *, 0 > verts, Vector< int > &r_offset_data, Vector< BMVert * > &r_data)
GroupedSpan< int > calc_vert_neighbors_interior (OffsetIndices< int > faces, Span< int > corner_verts, GroupedSpan< int > vert_to_face, BitSpan boundary_verts, Span< bool > hide_poly, Span< int > verts, Vector< int > &r_offset_data, Vector< int > &r_data)
GroupedSpan< int > calc_vert_neighbors_interior (OffsetIndices< int > faces, Span< int > corner_verts, GroupedSpan< int > vert_to_face, BitSpan boundary_verts, Span< bool > hide_poly, Span< int > verts, Span< float > factors, Vector< int > &r_offset_data, Vector< int > &r_data)
void calc_vert_neighbors_interior (OffsetIndices< int > faces, Span< int > corner_verts, BitSpan boundary_verts, const SubdivCCG &subdiv_ccg, Span< int > grids, MutableSpan< Vector< SubdivCCGCoord > > result)
void calc_vert_neighbors_interior (const Set< BMVert *, 0 > &verts, MutableSpan< Vector< BMVert * > > result)
void calc_translations_to_plane (Span< float3 > vert_positions, Span< int > verts, const float4 &plane, MutableSpan< float3 > translations)
void calc_translations_to_plane (Span< float3 > positions, const float4 &plane, MutableSpan< float3 > translations)
void filter_verts_outside_symmetry_area (Span< float3 > positions, const float3 &pivot, ePaintSymmetryFlags symm, MutableSpan< float > factors)
void filter_plane_trim_limit_factors (const Brush &brush, const StrokeCache &cache, Span< float3 > translations, MutableSpan< float > factors)
void filter_below_plane_factors (Span< float3 > vert_positions, Span< int > verts, const float4 &plane, MutableSpan< float > factors)
void filter_below_plane_factors (Span< float3 > positions, const float4 &plane, MutableSpan< float > factors)
void filter_above_plane_factors (Span< float3 > vert_positions, Span< int > verts, const float4 &plane, MutableSpan< float > factors)
void filter_above_plane_factors (Span< float3 > positions, const float4 &plane, MutableSpan< float > factors)
static int same_tex_snap (TexSnapshot *snap, MTex *mtex, ViewContext *vc, bool col, float zoom)
static void make_tex_snap (TexSnapshot *snap, ViewContext *vc, float zoom)
static void load_tex_task_cb_ex (void *__restrict userdata, const int j, const TaskParallelTLS *__restrict tls)
static int load_tex (Brush *br, ViewContext *vc, float zoom, bool col, bool primary)
static void load_tex_cursor_task_cb (void *__restrict userdata, const int j, const TaskParallelTLS *__restrict)
static int load_tex_cursor (Brush *br, ViewContext *vc, float zoom)
static int project_brush_radius (ViewContext *vc, float radius, const float location[3])
static int project_brush_radius_grease_pencil (ViewContext *vc, const float radius, const float3 world_location, const float4x4 &to_world)
static bool paint_draw_tex_overlay (Paint *paint, Brush *brush, ViewContext *vc, int x, int y, float zoom, const PaintMode mode, bool col, bool primary)
static bool paint_draw_cursor_overlay (Paint *paint, Brush *brush, ViewContext *vc, int x, int y, float zoom)
static bool paint_draw_alpha_overlay (Paint *paint, Brush *brush, ViewContext *vc, int x, int y, float zoom, PaintMode mode)
BLI_INLINE void draw_tri_point (uint pos, const float sel_col[4], const float pivot_col[4], float *co, float width, bool selected)
BLI_INLINE void draw_rect_point (uint pos, const float sel_col[4], const float handle_col[4], const float *co, float width, bool selected)
BLI_INLINE void draw_bezier_handle_lines (uint pos, const float sel_col[4], BezTriple *bez)
static void paint_draw_curve_cursor (Brush *brush, ViewContext *vc)
static void paint_cursor_update_unprojected_size (Paint &paint, Brush &brush, const ViewContext &vc, const float location[3])
static void cursor_draw_point_screen_space (const uint gpuattr, const ARegion *region, const float true_location[3], const float obmat[4][4], const int size)
static void cursor_draw_tiling_preview (const uint gpuattr, const ARegion *region, const float true_location[3], const Sculpt &sd, const Object &ob, const float radius)
static void cursor_draw_point_with_symmetry (const uint gpuattr, const ARegion *region, const float true_location[3], const Sculpt &sd, const Object &ob, const float radius)
static void sculpt_geometry_preview_lines_draw (const Depsgraph &depsgraph, const uint gpuattr, const Brush &brush, const Object &object)
static void SCULPT_layer_brush_height_preview_draw (const uint gpuattr, const Brush &brush, const float rds, const float line_width, const float3 &outline_col, const float alpha)
static bool paint_use_2d_cursor (PaintMode mode)
static bool paint_cursor_context_init (bContext *C, const blender::int2 &xy, const blender::float2 &tilt, PaintCursorContext &pcontext)
static void paint_cursor_update_pixel_radius (PaintCursorContext &pcontext)
static void paint_cursor_sculpt_session_update_and_init (PaintCursorContext &pcontext)
static void paint_update_mouse_cursor (PaintCursorContext &pcontext)
static void paint_draw_2D_view_brush_cursor_default (PaintCursorContext &pcontext)
static void grease_pencil_eraser_draw (PaintCursorContext &pcontext)
static void grease_pencil_brush_cursor_draw (PaintCursorContext &pcontext)
static void paint_draw_2D_view_brush_cursor (PaintCursorContext &pcontext)
static void paint_draw_legacy_3D_view_brush_cursor (PaintCursorContext &pcontext)
static void paint_draw_3D_view_inactive_brush_cursor (PaintCursorContext &pcontext)
static void paint_cursor_update_object_space_radius (PaintCursorContext &pcontext)
static void paint_cursor_drawing_setup_cursor_space (const PaintCursorContext &pcontext)
static void paint_cursor_draw_main_inactive_cursor (PaintCursorContext &pcontext)
static void paint_cursor_pose_brush_segments_draw (const PaintCursorContext &pcontext)
static void paint_cursor_pose_brush_origins_draw (const PaintCursorContext &pcontext)
static void paint_cursor_preview_boundary_data_pivot_draw (const PaintCursorContext &pcontext)
static void paint_cursor_preview_boundary_data_update (const PaintCursorContext &pcontext)
static void paint_cursor_draw_3d_view_brush_cursor_inactive (PaintCursorContext &pcontext)
static void paint_cursor_cursor_draw_3d_view_brush_cursor_active (PaintCursorContext &pcontext)
static void paint_cursor_draw_3D_view_brush_cursor (PaintCursorContext &pcontext)
static bool paint_cursor_is_3d_view_navigating (const PaintCursorContext &pcontext)
static bool paint_cursor_is_brush_cursor_enabled (const PaintCursorContext &pcontext)
static void paint_cursor_update_rake_rotation (PaintCursorContext &pcontext)
static void paint_cursor_check_and_draw_alpha_overlays (PaintCursorContext &pcontext)
static void paint_cursor_update_anchored_location (PaintCursorContext &pcontext)
static void paint_cursor_setup_2D_drawing (PaintCursorContext &pcontext)
static void paint_cursor_setup_3D_drawing (PaintCursorContext &pcontext)
static void paint_cursor_restore_drawing_state ()
static void paint_draw_cursor (bContext *C, const blender::int2 &xy, const blender::float2 &tilt, void *)
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)
PaintStrokepaint_stroke_new (bContext *C, wmOperator *op, StrokeGetLocation get_location, StrokeTestStart test_start, StrokeUpdateStep update_step, StrokeRedraw redraw, StrokeDone done, int event_type)
void paint_stroke_free (bContext *C, wmOperator *op, PaintStroke *stroke)
bool paint_space_stroke_enabled (const Brush &br, PaintMode mode)
bool paint_supports_dynamic_size (const Brush &br, PaintMode mode)
bool paint_supports_dynamic_tex_coords (const Brush &br, PaintMode mode)
bool paint_supports_smooth_stroke (PaintStroke *stroke, const Brush &br, PaintMode mode)
bool paint_supports_texture (PaintMode mode)
wmKeyMappaint_stroke_modal_keymap (wmKeyConfig *keyconf)
wmOperatorStatus paint_stroke_modal (bContext *C, wmOperator *op, const wmEvent *event, PaintStroke **stroke_p)
wmOperatorStatus paint_stroke_exec (bContext *C, wmOperator *op, PaintStroke *stroke)
void paint_stroke_cancel (bContext *C, wmOperator *op, PaintStroke *stroke)
bool paint_stroke_flipped (PaintStroke *stroke)
bool paint_stroke_inverted (PaintStroke *stroke)
ViewContextpaint_stroke_view_context (PaintStroke *stroke)
void * paint_stroke_mode_data (PaintStroke *stroke)
float paint_stroke_distance_get (PaintStroke *stroke)
void paint_stroke_set_mode_data (PaintStroke *stroke, std::unique_ptr< PaintModeData > mode_data)
bool paint_stroke_started (PaintStroke *stroke)
void paint_stroke_jitter_pos (const PaintStroke &stroke, PaintMode mode, const Brush &brush, float pressure, const float mval[2], float r_mouse_out[2])
bool paint_brush_tool_poll (bContext *C)
bool paint_brush_cursor_poll (bContext *C)
bool paint_brush_update (bContext *C, const Brush &brush, PaintMode mode, PaintStroke *stroke, const float mouse_init[2], float mouse[2], float pressure, float r_location[3], bool *r_location_is_set)
bool is_symmetry_iteration_valid (const char i, const char symm)
float3 symmetry_flip (const float3 &src, const ePaintSymmetryFlags symm)
static void paint_draw_smooth_cursor (bContext *C, const blender::int2 &xy, const blender::float2 &, void *customdata)
static void paint_draw_line_cursor (bContext *, const blender::int2 &xy, const blender::float2 &, void *customdata)
static bool image_paint_brush_type_require_location (const Brush &brush, const PaintMode mode)
static bool paint_stroke_use_scene_spacing (const Brush &brush, const PaintMode mode)
static bool image_paint_brush_type_raycast_original (const Brush &brush, PaintMode)
static bool image_paint_brush_type_require_inbetween_mouse_events (const Brush &brush, const PaintMode mode)
static bool paint_stroke_use_dash (const Brush &brush)
static bool paint_stroke_use_jitter (const PaintMode mode, const Brush &brush, const bool invert)
static void paint_brush_stroke_add_step (bContext *C, wmOperator *op, PaintStroke *stroke, const float2 mval, float pressure)
static bool paint_smooth_stroke (PaintStroke *stroke, const PaintSample *sample, const PaintMode mode, float2 &r_mouse, float &r_pressure)
static float paint_space_stroke_spacing (const bContext *C, PaintStroke *stroke, const float size_factor, const float pressure)
static float paint_space_stroke_spacing_no_pressure (const bContext *C, PaintStroke *stroke)
static float paint_stroke_overlapped_curve (const Brush &br, const float x, const float spacing)
static float paint_stroke_integrate_overlap (const Brush &br, const float factor)
static float paint_space_stroke_spacing_variable (bContext *C, PaintStroke *stroke, const float pressure, const float pressure_delta, const float length)
static int paint_space_stroke (bContext *C, wmOperator *op, PaintStroke *stroke, const float2 final_mouse, const float final_pressure)
static bool print_pressure_status_enabled ()
static void stroke_done (bContext *C, wmOperator *op, PaintStroke *stroke)
static bool curves_sculpt_brush_uses_spacing (const eBrushCurvesSculptType tool)
static bool sculpt_is_grab_tool (const Brush &br)
static void paint_stroke_add_sample (PaintStroke *stroke, const int input_samples, const float x, const float y, const float pressure)
static void paint_stroke_sample_average (const PaintStroke *stroke, PaintSample *average)
static void paint_line_strokes_spacing (bContext *C, wmOperator *op, PaintStroke *stroke, const float spacing, float *length_residue, const float2 old_pos, const float2 new_pos)
static void paint_stroke_line_end (bContext *C, wmOperator *op, PaintStroke *stroke, const float2 mouse)
static bool paint_stroke_curve_end (bContext *C, wmOperator *op, PaintStroke *stroke)
static void paint_stroke_line_constrain (PaintStroke *stroke, float2 &mouse)
static const bToolRefbrush_tool_get (const bContext *C)
template<typename T>
static void fill_bm_face_or_corner_attribute (BMesh &bm, const T &value, const AttrDomain domain, const int cd_offset, const bool use_vert_sel)
template<typename T>
static void fill_mesh_face_or_corner_attribute (Mesh &mesh, const T &value, const AttrDomain domain, const MutableSpan< T > data, const bool use_vert_sel, const bool use_face_sel, const bool affect_alpha)
static void fill_mesh_color (Mesh &mesh, const ColorPaint4f &color, const StringRef attribute_name, const bool use_vert_sel, const bool use_face_sel, const bool affect_alpha)
static bool fill_active_color (Object &ob, ColorPaint4f fill_color, bool only_selected=true, bool affect_alpha=true)
float object_space_radius_get (const ViewContext &vc, const Paint &paint, const Brush &brush, const float3 &location, const float scale_factor)
void vert_random_access_ensure (Object &object)
Span< float3vert_positions_for_grab_active_get (const Depsgraph &depsgraph, const Object &object)
Span< BMVert * > vert_neighbors_get_bmesh (BMVert &vert, BMeshNeighborVerts &r_neighbors)
Span< BMVert * > vert_neighbors_get_interior_bmesh (BMVert &vert, BMeshNeighborVerts &r_neighbors)
Span< int > vert_neighbors_get_mesh (const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face, const Span< bool > hide_poly, const int vert, Vector< int > &r_neighbors)
void append_neighbors_to_vector (const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face, const Span< bool > hide_poly, const int vert, Vector< int > &r_data)
std::optional< int > nearest_vert_calc_mesh (const bke::pbvh::Tree &pbvh, const Span< float3 > vert_positions, const Span< bool > hide_vert, const float3 &location, const float max_distance, const bool use_original)
std::optional< SubdivCCGCoordnearest_vert_calc_grids (const bke::pbvh::Tree &pbvh, const SubdivCCG &subdiv_ccg, const float3 &location, const float max_distance, const bool use_original)
std::optional< BMVert * > nearest_vert_calc_bmesh (const bke::pbvh::Tree &pbvh, const float3 &location, const float max_distance, const bool use_original)
static void rake_data_update (SculptRakeData *srd, const float co[3])
static float area_normal_and_center_get_normal_radius (const SculptSession &ss, const Brush &brush)
static float area_normal_and_center_get_position_radius (const SculptSession &ss, const Brush &brush)
static float area_normal_calc_weight (const float distance, const float radius_inv)
static float3 area_center_calc_weighted (const float3 &test_location, const float distance, const float radius_inv, const float3 &co)
static void accumulate_area_center (const float3 &test_location, const float3 &position, const float distance, const float radius_inv, const int flip_index, AreaNormalCenterData &anctd)
static void accumulate_area_normal (const float3 &normal, const float distance, const float radius_inv, const int flip_index, AreaNormalCenterData &anctd)
 ENUM_OPERATORS (AverageDataFlags, AverageDataFlags::Normal)
static void calc_area_normal_and_center_node_mesh (const Object &object, const Span< float3 > vert_positions, const Span< float3 > vert_normals, const Span< bool > hide_vert, const Brush &brush, const AverageDataFlags flag, const bke::pbvh::MeshNode &node, SampleLocalData &tls, AreaNormalCenterData &anctd)
static void calc_area_normal_and_center_node_grids (const Object &object, const Brush &brush, const AverageDataFlags flag, const bke::pbvh::GridsNode &node, SampleLocalData &tls, AreaNormalCenterData &anctd)
static void calc_area_normal_and_center_node_bmesh (const Object &object, const Brush &brush, const AverageDataFlags flag, const bool has_bm_orco, const bke::pbvh::BMeshNode &node, SampleLocalData &tls, AreaNormalCenterData &anctd)
static AreaNormalCenterData calc_area_normal_and_center_reduce (const AreaNormalCenterData &a, const AreaNormalCenterData &b)
void calc_area_center (const Depsgraph &depsgraph, const Brush &brush, const Object &ob, const IndexMask &node_mask, float r_area_co[3])
std::optional< float3calc_area_normal (const Depsgraph &depsgraph, const Brush &brush, const Object &ob, const IndexMask &node_mask)
static void calc_stabilized_plane (const Brush &brush, StrokeCache &cache, const float3 &plane_normal, const float3 &plane_center, float3 &r_stabilized_normal, float3 &r_stabilized_center)
void calc_area_normal_and_center (const Depsgraph &depsgraph, const Brush &brush, const Object &ob, const IndexMask &node_mask, float r_area_no[3], float r_area_co[3])
bool node_fully_masked_or_hidden (const bke::pbvh::Node &node)
bool node_in_sphere (const bke::pbvh::Node &node, const float3 &location, const float radius_sq, const bool original)
bool node_in_cylinder (const DistRayAABB_Precalc &ray_dist_precalc, const bke::pbvh::Node &node, const float radius_sq, const bool original)
static IndexMask pbvh_gather_cursor_update (Object &ob, bool use_original, IndexMaskMemory &memory)
static IndexMask pbvh_gather_generic (Object &ob, const Brush &brush, const bool use_original, const float radius_scale, IndexMaskMemory &memory)
IndexMask gather_nodes (const bke::pbvh::Tree &pbvh, const eBrushFalloffShape falloff_shape, const bool use_original, const float3 &location, const float radius_sq, const std::optional< float3 > &ray_direction, IndexMaskMemory &memory)
static IndexMask pbvh_gather_texpaint (Object &ob, const Brush &brush, const bool use_original, const float radius_scale, IndexMaskMemory &memory)
static float3 calc_sculpt_normal (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob, const IndexMask &node_mask)
static void update_sculpt_normal (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob, const brushes::CursorSampleResult &cursor_sample_result)
static void calc_local_from_screen (const ViewContext &vc, const float center[3], const float screen_dir[2], float r_local_dir[3])
static void calc_brush_local_mat (const float rotation, const Object &ob, float local_mat[4][4], float local_mat_inv[4][4])
float3 tilt_apply_to_normal (const Object &object, const float4x4 &view_inverse, const float3 &normal, const float2 &tilt, const float tilt_strength)
float3 tilt_apply_to_normal (const float3 &normal, const StrokeCache &cache, const float tilt_strength)
float3 tilt_effective_normal_get (const SculptSession &ss, const Brush &brush)
void calc_brush_plane (const Depsgraph &depsgraph, const Brush &brush, Object &ob, const IndexMask &node_mask, float3 &r_area_no, float3 &r_area_co)
float brush_plane_offset_get (const Brush &brush, const SculptSession &ss)
static void dynamic_topology_update (const Depsgraph &depsgraph, const Scene &, Sculpt &sd, Object &ob, const Brush &brush, PaintModeSettings &)
static bool brush_type_needs_all_pbvh_nodes (const Brush &brush)
static brushes::CursorSampleResult calc_brush_node_mask (const Depsgraph &depsgraph, Object &ob, const Brush &brush, IndexMaskMemory &memory)
static void push_undo_nodes (const Depsgraph &depsgraph, Object &ob, const Brush &brush, const IndexMask &node_mask)
static void do_brush_action (const Depsgraph &depsgraph, const Scene &, Sculpt &sd, Object &ob, const Brush &brush, PaintModeSettings &paint_mode_settings)
static void do_tiled (const Depsgraph &depsgraph, const Scene &scene, Sculpt &sd, Object &ob, const Brush &brush, PaintModeSettings &paint_mode_settings, const BrushActionFunc action)
static void do_radial_symmetry (const Depsgraph &depsgraph, const Scene &scene, Sculpt &sd, Object &ob, const Brush &brush, PaintModeSettings &paint_mode_settings, const BrushActionFunc action, const ePaintSymmetryFlags symm, const int axis, const float)
static void sculpt_fix_noise_tear (const Sculpt &sd, Object &ob)
static void do_symmetrical_brush_actions (const Depsgraph &depsgraph, const Scene &scene, Sculpt &sd, Object &ob, const BrushActionFunc action, PaintModeSettings &paint_mode_settings)
static void sculpt_init_mirror_clipping (const Object &ob, const SculptSession &ss)
static void smooth_brush_toggle_on (const bContext *C, Paint *paint, StrokeCache *cache)
static void smooth_brush_toggle_off (Paint *paint, StrokeCache *cache)
static void sculpt_update_cache_invariants (bContext *C, Sculpt &sd, SculptSession &ss, const wmOperator &op, const float mval[2])
static float brush_dynamic_size_get (const Brush &brush, const StrokeCache &cache, float initial_size)
static bool need_delta_from_anchored_origin (const Brush &brush)
static bool need_delta_for_tip_orientation (const Brush &brush)
static void brush_delta_update (const Depsgraph &depsgraph, Paint &paint, const Object &ob, const Brush &brush)
static void cache_paint_invariants_update (StrokeCache &cache, const Brush &brush)
static void sculpt_update_cache_variants (bContext *C, Sculpt &sd, Object &ob, PointerRNA *ptr)
static bool sculpt_needs_connectivity_info (const Sculpt &sd, const Brush &brush, const Object &object, int stroke_mode)
static void sculpt_raycast_cb (bke::pbvh::Node &node, RaycastData &rd, float *tmin)
static void sculpt_find_nearest_to_ray_cb (bke::pbvh::Node &node, FindNearestToRayData &fntrd, float *tmin)
float raycast_init (ViewContext *vc, const float2 &mval, float3 &r_ray_start, float3 &r_ray_end, float3 &r_ray_normal, bool original)
bool cursor_geometry_info_update (bContext *C, CursorGeometryInfo *out, const float2 &mval, const bool use_sampled_normal)
static bool stroke_get_location_bvh_ex (bContext *C, float3 &out, const float2 &mval, const bool force_original, const bool check_closest, const bool limit_closest_radius)
bool stroke_get_location_bvh (bContext *C, float out[3], const float mval[2], const bool force_original)
static void tag_mesh_positions_changed (Object &object, const bool use_pbvh_draw)
void flush_update_step (const bContext *C, const UpdateType update_type)
void flush_update_done (const bContext *C, Object &ob, const UpdateType update_type)
static void replace_attribute (const bke::AttributeAccessor src_attributes, const StringRef name, const bke::AttrDomain domain, const bke::AttrType data_type, bke::MutableAttributeAccessor dst_attributes)
static bool attribute_matches (const bke::AttributeAccessor a, const bke::AttributeAccessor b, const StringRef name)
static bool topology_matches (const Mesh &a, const Mesh &b)
static void store_sculpt_entire_mesh (const wmOperator &op, const Scene &scene, Object &object, Mesh *new_mesh)
static const ImplicitSharingInfoget_vertex_group_sharing_info (const Mesh &mesh)
bool color_supported_check (const Scene &scene, Object &object, ReportList *reports)
static bool stroke_test_start (bContext *C, wmOperator *op, const float mval[2])
static void stroke_update_step (bContext *C, wmOperator *, PaintStroke *stroke, PointerRNA *itemptr)
static void brush_exit_tex (Sculpt &sd)
static void stroke_done (const bContext *C, PaintStroke *)
static wmOperatorStatus sculpt_brush_stroke_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus sculpt_brush_stroke_exec (bContext *C, wmOperator *op)
static void sculpt_brush_stroke_cancel (bContext *C, wmOperator *op)
static wmOperatorStatus brush_stroke_modal (bContext *C, wmOperator *op, const wmEvent *event)
static void redo_empty_ui (bContext *, wmOperator *)
void SCULPT_OT_brush_stroke (wmOperatorType *ot)
static void fake_neighbor_init (Object &object, const float max_dist)
static void pose_fake_neighbors_free (SculptSession &ss)
static void fake_neighbor_search_mesh (const SculptSession &ss, const Span< float3 > vert_positions, const Span< bool > hide_vert, const float3 &location, const float max_distance_sq, const int island_id, const bke::pbvh::MeshNode &node, NearestVertData &nvtd)
static void fake_neighbor_search_grids (const SculptSession &ss, const CCGKey &key, const Span< float3 > positions, const BitGroupVector<> &grid_hidden, const float3 &location, const float max_distance_sq, const int island_id, const bke::pbvh::GridsNode &node, NearestVertData &nvtd)
static void fake_neighbor_search_bmesh (const SculptSession &ss, const float3 &location, const float max_distance_sq, const int island_id, const bke::pbvh::BMeshNode &node, NearestVertData &nvtd)
static void fake_neighbor_search (const Depsgraph &depsgraph, const Object &ob, const float max_distance_sq, MutableSpan< int > fake_neighbors)
bool vertex_is_occluded (const Depsgraph &depsgraph, const Object &object, const float3 &position, bool original)
template void gather_data_mesh< bool > (Span< bool >, Span< int >, MutableSpan< bool >)
template void gather_data_mesh< int > (Span< int >, Span< int >, MutableSpan< int >)
template void gather_data_mesh< float > (Span< float >, Span< int >, MutableSpan< float >)
template void gather_data_mesh< float3 > (Span< float3 >, Span< int >, MutableSpan< float3 >)
template void gather_data_mesh< float4 > (Span< float4 >, Span< int >, MutableSpan< float4 >)
template void gather_data_grids< int > (const SubdivCCG &, Span< int >, Span< int >, MutableSpan< int >)
template void gather_data_grids< float > (const SubdivCCG &, Span< float >, Span< int >, MutableSpan< float >)
template void gather_data_grids< float3 > (const SubdivCCG &, Span< float3 >, Span< int >, MutableSpan< float3 >)
template void gather_data_bmesh< int > (Span< int >, const Set< BMVert *, 0 > &, MutableSpan< int >)
template void gather_data_bmesh< float > (Span< float >, const Set< BMVert *, 0 > &, MutableSpan< float >)
template void gather_data_bmesh< float3 > (Span< float3 >, const Set< BMVert *, 0 > &, MutableSpan< float3 >)
template void scatter_data_mesh< bool > (Span< bool >, Span< int >, MutableSpan< bool >)
template void scatter_data_mesh< int > (Span< int >, Span< int >, MutableSpan< int >)
template void scatter_data_mesh< float > (Span< float >, Span< int >, MutableSpan< float >)
template void scatter_data_mesh< float3 > (Span< float3 >, Span< int >, MutableSpan< float3 >)
template void scatter_data_mesh< float4 > (Span< float4 >, Span< int >, MutableSpan< float4 >)
template void scatter_data_grids< float > (const SubdivCCG &, Span< float >, Span< int >, MutableSpan< float >)
template void scatter_data_grids< float3 > (const SubdivCCG &, Span< float3 >, Span< int >, MutableSpan< float3 >)
template void scatter_data_bmesh< float > (Span< float >, const Set< BMVert *, 0 > &, MutableSpan< float >)
template void scatter_data_bmesh< float3 > (Span< float3 >, const Set< BMVert *, 0 > &, MutableSpan< float3 >)
template void calc_brush_cube_distances< float2 > (const Brush &brush, const Span< float2 > positions, MutableSpan< float > r_distances)
template void calc_brush_cube_distances< float3 > (const Brush &brush, const Span< float3 > positions, MutableSpan< float > r_distances)
static bool contains_nan (const Span< float > values)
template<bool use_factors>
static GroupedSpan< int > calc_vert_neighbors_interior_impl (const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face, const BitSpan boundary_verts, const Span< bool > hide_poly, const Span< int > verts, const Span< float > factors, Vector< int > &r_offset_data, Vector< int > &r_data)
Vector< int > find_symm_verts_mesh (const Depsgraph &depsgraph, const Object &object, const int original_vert, const float max_distance)
Vector< int > find_symm_verts_grids (const Object &object, const int original_vert, const float max_distance)
Vector< int > find_symm_verts_bmesh (const Object &object, const int original_vert, const float max_distance)
Vector< int > find_symm_verts (const Depsgraph &depsgraph, const Object &object, const int original_vert, const float max_distance)
std::optional< OrigPositionDataorig_position_data_lookup_mesh_all_verts (const Object &object, const bke::pbvh::MeshNode &node)
std::optional< OrigPositionDataorig_position_data_lookup_mesh (const Object &object, const bke::pbvh::MeshNode &node)
OrigPositionData orig_position_data_get_mesh (const Object &object, const bke::pbvh::MeshNode &node)
std::optional< OrigPositionDataorig_position_data_lookup_grids (const Object &object, const bke::pbvh::GridsNode &node)
OrigPositionData orig_position_data_get_grids (const Object &object, const bke::pbvh::GridsNode &node)
void orig_position_data_gather_bmesh (const BMLog &bm_log, const Set< BMVert *, 0 > &verts, MutableSpan< float3 > positions, MutableSpan< float3 > normals)
std::optional< Span< float4 > > orig_color_data_lookup_mesh (const Object &object, const bke::pbvh::MeshNode &node)
Span< float4orig_color_data_get_mesh (const Object &object, const bke::pbvh::MeshNode &node)
std::optional< Span< int > > orig_face_set_data_lookup_mesh (const Object &object, const bke::pbvh::MeshNode &node)
std::optional< Span< int > > orig_face_set_data_lookup_grids (const Object &object, const bke::pbvh::GridsNode &node)
std::optional< Span< float > > orig_mask_data_lookup_mesh (const Object &object, const bke::pbvh::MeshNode &node)
std::optional< Span< float > > orig_mask_data_lookup_grids (const Object &object, const bke::pbvh::GridsNode &node)
bool brush_type_is_paint (const int tool)
bool brush_type_is_mask (const int tool)
BLI_INLINE bool brush_type_is_attribute_only (const int tool)
bool brush_uses_vector_displacement (const Brush &brush)
void SCULPT_OT_set_pivot_position (wmOperatorType *ot)
static std::array< float4x4, 8 > transform_matrices_init (const SculptSession &ss, const ePaintSymmetryFlags symm, const TransformDisplacementMode t_mode)
static BLI_NOINLINE void calc_symm_area_transform_translations (const Span< float3 > positions, const std::array< float4x4, 8 > &transform_mats, const MutableSpan< float3 > translations)
static BLI_NOINLINE void filter_translations_with_symmetry (const Span< float3 > positions, const ePaintSymmetryFlags symm, const MutableSpan< float3 > translations)
static void transform_node_mesh (const Sculpt &sd, const std::array< float4x4, 8 > &transform_mats, const MeshAttributeData &attribute_data, const bke::pbvh::MeshNode &node, Object &object, TransformLocalData &tls, const PositionDeformData &position_data)
static void transform_node_grids (const Sculpt &sd, const std::array< float4x4, 8 > &transform_mats, const bke::pbvh::GridsNode &node, Object &object, TransformLocalData &tls)
static void transform_node_bmesh (const Sculpt &sd, const std::array< float4x4, 8 > &transform_mats, bke::pbvh::BMeshNode &node, Object &object, TransformLocalData &tls)
static void sculpt_transform_all_vertices (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob)
static BLI_NOINLINE void calc_transform_translations (const float4x4 &elastic_transform_mat, const Span< float3 > positions, const MutableSpan< float3 > r_translations)
static BLI_NOINLINE void apply_kelvinet_to_translations (const KelvinletParams &params, const float3 &elastic_transform_pivot, const Span< float3 > positions, const MutableSpan< float3 > translations)
static void elastic_transform_node_mesh (const Sculpt &sd, const KelvinletParams &params, const float4x4 &elastic_transform_mat, const float3 &elastic_transform_pivot, const MeshAttributeData &attribute_data, const bke::pbvh::MeshNode &node, Object &object, TransformLocalData &tls, const PositionDeformData &position_data)
static void elastic_transform_node_grids (const Sculpt &sd, const KelvinletParams &params, const float4x4 &elastic_transform_mat, const float3 &elastic_transform_pivot, const bke::pbvh::GridsNode &node, Object &object, TransformLocalData &tls)
static void elastic_transform_node_bmesh (const Sculpt &sd, const KelvinletParams &params, const float4x4 &elastic_transform_mat, const float3 &elastic_transform_pivot, bke::pbvh::BMeshNode &node, Object &object, TransformLocalData &tls)
static void transform_radius_elastic (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob, const float transform_radius)
static bool set_pivot_depends_on_cursor (bContext &, wmOperatorType &, PointerRNA *ptr)
static AveragePositionAccumulation combine_average_position_accumulation (const AveragePositionAccumulation &a, const AveragePositionAccumulation &b)
static BLI_NOINLINE void accumulate_weighted_average_position (const Span< float3 > positions, const Span< float > factors, AveragePositionAccumulation &total)
static float3 average_unmasked_position (const Depsgraph &depsgraph, const Object &object, const float3 &pivot, const ePaintSymmetryFlags symm)
static BLI_NOINLINE void mask_border_weight_calc (const Span< float > masks, const MutableSpan< float > factors)
static float3 average_mask_border_position (const Depsgraph &depsgraph, const Object &object, const float3 &pivot, const ePaintSymmetryFlags symm)
static wmOperatorStatus set_pivot_position_exec (bContext *C, wmOperator *op)
static wmOperatorStatus set_pivot_position_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static bool set_pivot_position_poll_property (const bContext *, wmOperator *op, const PropertyRNA *prop)
Sculpt Mode Toggle Operator
void object_sculpt_mode_enter (Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob, bool force_dyntopo, ReportList *reports)
void object_sculpt_mode_enter (bContext *C, Depsgraph &depsgraph, ReportList *reports)
void object_sculpt_mode_exit (Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob)
void object_sculpt_mode_exit (bContext *C, Depsgraph &depsgraph)
void ensure_valid_pivot (const Object &ob, Paint &paint)
static void init_sculpt_mode_session (Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob)
static wmOperatorStatus sculpt_mode_toggle_exec (bContext *C, wmOperator *op)
static void SCULPT_OT_sculptmode_toggle (wmOperatorType *ot)
Brush Stroke Operator
float brush_radius_factor (const Brush &brush, const StrokeExtension &stroke_extension)
float brush_radius_get (const Paint &paint, const Brush &brush, const StrokeExtension &stroke_extension)
float brush_strength_factor (const Brush &brush, const StrokeExtension &stroke_extension)
float brush_strength_get (const Paint &paint, 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)
static bool stroke_test_start (bContext *C, wmOperator *op, const float mouse[2])
static void stroke_update_step (bContext *C, wmOperator *op, PaintStroke *, PointerRNA *stroke_element)
static void stroke_done (const bContext *C, PaintStroke *stroke)
static wmOperatorStatus sculpt_curves_stroke_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus 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 (wmOperatorType *ot)
static bool grease_pencil_brush_stroke_poll (bContext *C)
static wmOperatorStatus grease_pencil_brush_stroke_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus grease_pencil_brush_stroke_modal (bContext *C, wmOperator *op, const wmEvent *event)
static void grease_pencil_brush_stroke_cancel (bContext *C, wmOperator *op)
static void GREASE_PENCIL_OT_brush_stroke (wmOperatorType *ot)
Poll Functions
bool curves_sculpt_poll (bContext *C)
bool curves_sculpt_poll_view3d (bContext *C)
Toggle Sculpt Mode
static void curves_sculptmode_enter (bContext *C)
static void curves_sculptmode_exit (bContext *C)
static wmOperatorStatus curves_sculptmode_toggle_exec (bContext *C, wmOperator *op)
static void CURVES_OT_sculptmode_toggle (wmOperatorType *ot)
Common Paint Operator Functions
static bool stroke_get_location (bContext *, float out[3], const float mouse[2], bool)
static std::unique_ptr< GreasePencilStrokeOperationget_stroke_operation (bContext &C, wmOperator *op)
static bool stroke_test_start (bContext *C, wmOperator *op, const float mouse[2])
static void stroke_update_step (bContext *C, wmOperator *op, PaintStroke *stroke, PointerRNA *stroke_element)
static void stroke_redraw (const bContext *C, PaintStroke *, bool)
static void stroke_done (const bContext *C, PaintStroke *stroke)
Sculpt Operator
static bool grease_pencil_sculpt_paint_poll (bContext *C)
static wmOperatorStatus grease_pencil_sculpt_paint_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus grease_pencil_sculpt_paint_modal (bContext *C, wmOperator *op, const wmEvent *event)
static void grease_pencil_sculpt_paint_cancel (bContext *C, wmOperator *op)
static void GREASE_PENCIL_OT_sculpt_paint (wmOperatorType *ot)
Weight Brush Stroke Operator
static bool grease_pencil_weight_brush_stroke_poll (bContext *C)
static wmOperatorStatus grease_pencil_weight_brush_stroke_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus grease_pencil_weight_brush_stroke_modal (bContext *C, wmOperator *op, const wmEvent *event)
static void grease_pencil_weight_brush_stroke_cancel (bContext *C, wmOperator *op)
static void GREASE_PENCIL_OT_weight_brush_stroke (wmOperatorType *ot)
Vertex Brush Stroke Operator
static bool grease_pencil_vertex_brush_stroke_poll (bContext *C)
static wmOperatorStatus grease_pencil_vertex_brush_stroke_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus grease_pencil_vertex_brush_stroke_modal (bContext *C, wmOperator *op, const wmEvent *event)
static void grease_pencil_vertex_brush_stroke_cancel (bContext *C, wmOperator *op)
static void GREASE_PENCIL_OT_vertex_brush_stroke (wmOperatorType *ot)
Brush Capabilities

Avoid duplicate checks, internal logic only, share logic with rna_def_sculpt_capabilities where possible.

static bool brush_type_needs_original (const char sculpt_brush_type)
static bool brush_uses_topology_rake (const SculptSession &ss, const Brush &brush)
static int sculpt_brush_needs_normal (const SculptSession &ss, const Brush &brush)
static bool brush_needs_rake_rotation (const Brush &brush)
Set Persistent Base Operator
static wmOperatorStatus set_persistent_base_exec (bContext *C, wmOperator *)
static void SCULPT_OT_set_persistent_base (wmOperatorType *ot)
Optimize Operator
static wmOperatorStatus optimize_exec (bContext *C, wmOperator *)
static void SCULPT_OT_optimize (wmOperatorType *ot)
Symmetrize Operator
static bool no_multires_poll (bContext *C)
static wmOperatorStatus symmetrize_exec (bContext *C, wmOperator *op)
static void SCULPT_OT_symmetrize (wmOperatorType *ot)
Sample Color Operator
static wmOperatorStatus sample_color_invoke (bContext *C, wmOperator *op, const wmEvent *)
static void SCULPT_OT_sample_color (wmOperatorType *ot)

Variables

constexpr int AntiAliasingSamplesPerTexelAxisMin = 3
constexpr int AntiAliasingSamplesPerTexelAxisMax = 16
constexpr int CurveSamplesBaseLen = 1024
 Number of samples to use between 0..1.
constexpr int CurveSamplesLen = M_SQRT2 * CurveSamplesBaseLen + 1
 Number of samples to store in the cache.
static constexpr int plane_brush_max_rolling_average_num = 20
static constexpr float transform_mirror_max_distance_eps = 0.00002f
static EnumPropertyItem prop_sculpt_pivot_position_types []

Bucket Fill Operator

enum class  FillToolModalKey : int8_t {
  Cancel = 1 , Confirm , ExtensionModeToggle , ExtensionLengthen ,
  ExtensionShorten , ExtensionDrag , ExtensionCollide , Invert ,
  Precision
}
static void grease_pencil_fill_extension_cut (const bContext &C, ed::greasepencil::ExtensionData &extension_data, Span< int > origin_drawings, Span< int > origin_points)
static void grease_pencil_fill_extension_lines_from_circles (const bContext &C, ed::greasepencil::ExtensionData &extension_data, Span< int >, Span< int >)
static ed::greasepencil::ExtensionData grease_pencil_fill_get_extension_data (const bContext &C, const GreasePencilFillOpData &op_data)
static void grease_pencil_fill_status_indicators (bContext &C, const GreasePencilFillOpData &op_data)
static void grease_pencil_fill_overlay_cb (const bContext *C, ARegion *, void *arg)
static void grease_pencil_fill_update_overlay (const ARegion &region, GreasePencilFillOpData &op_data)
static void grease_pencil_update_extend (bContext &C, GreasePencilFillOpData &op_data)
static VArray< bool > get_fill_boundary_layers (const GreasePencil &grease_pencil, eGP_FillLayerModes fill_layer_mode)
static Vector< FillToolTargetInfoensure_editable_drawings (const Scene &scene, GreasePencil &grease_pencil, bke::greasepencil::Layer &target_layer)
static void smooth_fill_strokes (bke::CurvesGeometry &curves, const IndexMask &stroke_mask)
static bke::CurvesGeometry simplify_fixed (bke::CurvesGeometry &curves, const int step)
static bool grease_pencil_apply_fill (bContext &C, wmOperator &op, const wmEvent &event)
static bool grease_pencil_fill_init (bContext &C, wmOperator &op)
static void grease_pencil_fill_exit (bContext &C, wmOperator &op)
static wmOperatorStatus grease_pencil_fill_invoke (bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus grease_pencil_fill_event_modal_map (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus grease_pencil_fill_modal (bContext *C, wmOperator *op, const wmEvent *event)
static void grease_pencil_fill_cancel (bContext *C, wmOperator *op)
static void GREASE_PENCIL_OT_fill (wmOperatorType *ot)
static bke::greasepencil::Drawingget_current_drawing_or_duplicate_for_autokey (const Scene &scene, GreasePencil &grease_pencil, const int layer_index)
static bool remove_points_and_split_from_drawings (const Scene &scene, GreasePencil &grease_pencil, const Span< ed::greasepencil::MutableDrawingInfo > drawings, const Span< IndexMask > points_to_remove_per_drawing)
static bool is_point_inside_bounds (const Bounds< int2 > bounds, const int2 point)
static bool is_point_inside_lasso (const Array< int2 > lasso, const int2 point)
static wmOperatorStatus grease_pencil_erase_lasso_exec (bContext *C, wmOperator *op)
static void GREASE_PENCIL_OT_erase_lasso (wmOperatorType *ot)
static wmOperatorStatus grease_pencil_erase_box_exec (bContext *C, wmOperator *op)
static void GREASE_PENCIL_OT_erase_box (wmOperatorType *ot)

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

Typedef Documentation

◆ BMeshNeighborVerts

◆ BrushActionFunc

Initial value:
void (*)(const Depsgraph &depsgraph,
const Scene &scene,
Sculpt &sd,
Object &ob,
const Brush &brush,
PaintModeSettings &paint_mode_settings)
BPy_StructRNA * depsgraph

Definition at line 3525 of file sculpt.cc.

◆ DeltaProjectionFunc

Initial value:
std::function<float3(const float3 position, const float2 &screen_delta)>
VecBase< float, 2 > float2
VecBase< float, 3 > float3

Projects a screen-space displacement vector into layer space. Current position (in layer space) is used to compute the perspective distance (zfac). Returns the new layer space position with the projected delta applied.

Definition at line 33 of file grease_pencil_intern.hh.

◆ StrokeDone

using blender::ed::sculpt_paint::StrokeDone = void (*)(const bContext *C, PaintStroke *stroke)

Callback function for cleaning up and finalizing data after a stroke has finished.

Definition at line 104 of file paint_intern.hh.

◆ StrokeGetLocation

Initial value:
bool (*)(bContext *C,
float location[3],
const float mouse[2],
bool force_original)
#define C
Definition RandGen.cpp:29

Callback function to retrieve the object space coordinates based on screen space coordinates.

Parameters
locationresulting object space coordinates
Returns
whether or not a value was actually found & the value in location is usable

Definition at line 77 of file paint_intern.hh.

◆ StrokeRedraw

using blender::ed::sculpt_paint::StrokeRedraw = void (*)(const bContext *C, PaintStroke *stroke, bool final)

Callback function for performing necessary redraw functions based on the stroke.

Definition at line 99 of file paint_intern.hh.

◆ StrokeTestStart

using blender::ed::sculpt_paint::StrokeTestStart = bool (*)(bContext *C, wmOperator *op, const float mouse[2])

Callback function to determine whether a stroke has started, and performing initialization.

In many cases, this is a check to whether the stroke is over the active mesh.

Definition at line 86 of file paint_intern.hh.

◆ StrokeUpdateStep

Initial value:

Callback function for performing a paint stroke for a new step.

Definition at line 91 of file paint_intern.hh.

Enumeration Type Documentation

◆ AverageDataFlags

enum class blender::ed::sculpt_paint::AverageDataFlags : uint8_t
strong
Enumerator
Position 
Normal 
All 

Definition at line 1357 of file sculpt.cc.

◆ FillToolModalKey

enum class blender::ed::sculpt_paint::FillToolModalKey : int8_t
strong
Enumerator
Cancel 
Confirm 
ExtensionModeToggle 
ExtensionLengthen 
ExtensionShorten 
ExtensionDrag 
ExtensionCollide 
Invert 
Precision 

Definition at line 1602 of file grease_pencil_draw_ops.cc.

◆ PaintCursorDrawingType

Enumerator
Curve 
Cursor2D 
Cursor3D 

Definition at line 1272 of file paint_cursor.cc.

◆ PivotPositionMode

Enumerator
Origin 
Unmasked 
MaskBorder 
ActiveVert 
CursorSurface 

Definition at line 600 of file sculpt_transform.cc.

◆ TransformDisplacementMode

Enumerator
Original 
Incremental 

Definition at line 139 of file sculpt_intern.hh.

◆ UpdateType

Enumerator
Position 
Mask 
Visibility 
Color 
Image 
FaceSet 

Definition at line 117 of file sculpt_intern.hh.

Function Documentation

◆ aa_samples_per_texel_axis()

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

◆ accumulate_area_center()

void blender::ed::sculpt_paint::accumulate_area_center ( const float3 & test_location,
const float3 & position,
const float distance,
const float radius_inv,
const int flip_index,
AreaNormalCenterData & anctd )
static

◆ accumulate_area_normal()

void blender::ed::sculpt_paint::accumulate_area_normal ( const float3 & normal,
const float distance,
const float radius_inv,
const int flip_index,
AreaNormalCenterData & anctd )
static

◆ accumulate_weighted_average_position()

◆ append_neighbors_to_vector()

void blender::ed::sculpt_paint::append_neighbors_to_vector ( const OffsetIndices< int > faces,
const Span< int > corner_verts,
const GroupedSpan< int > vert_to_face,
const Span< bool > hide_poly,
const int vert,
Vector< int > & r_data )
inline

◆ apply_crazyspace_to_translations()

void blender::ed::sculpt_paint::apply_crazyspace_to_translations ( Span< float3x3 > deform_imats,
Span< int > verts,
MutableSpan< float3 > translations )

Rotate translations to account for rotations from procedural deformation.

Todo
Don't invert deform_imats on object evaluation. Instead just invert them on-demand in brush implementations. This would be better because only the inversions required for affected vertices would be necessary.

Definition at line 7324 of file sculpt.cc.

References apply_crazyspace_to_translations(), BLI_assert, i, blender::MutableSpan< T >::size(), blender::math::transform_point(), and verts.

Referenced by apply_crazyspace_to_translations(), blender::ed::sculpt_paint::PositionDeformData::deform(), and blender::ed::sculpt_paint::undo::restore_position_from_undo_step().

◆ apply_hardness_to_distances() [1/2]

void blender::ed::sculpt_paint::apply_hardness_to_distances ( const StrokeCache & cache,
const MutableSpan< float > distances )
inline

◆ apply_hardness_to_distances() [2/2]

void blender::ed::sculpt_paint::apply_hardness_to_distances ( float radius,
float hardness,
MutableSpan< float > distances )

◆ apply_kelvinet_to_translations()

BLI_NOINLINE void blender::ed::sculpt_paint::apply_kelvinet_to_translations ( const KelvinletParams & params,
const float3 & elastic_transform_pivot,
const Span< float3 > positions,
const MutableSpan< float3 > translations )
static

◆ apply_translations() [1/3]

void blender::ed::sculpt_paint::apply_translations ( Span< float3 > translations,
const Set< BMVert *, 0 > & verts )

◆ apply_translations() [2/3]

◆ apply_translations() [3/3]

void blender::ed::sculpt_paint::apply_translations ( Span< float3 > translations,
Span< int > verts,
MutableSpan< float3 > positions )

Many brushes end up calculating translations from the original positions. Instead of applying these directly to the modified values, it's helpful to process them separately to easily calculate various effects like clipping. After they are processed, this function can be used to simply add them to the final vertex positions.

Definition at line 7268 of file sculpt.cc.

References apply_translations(), BLI_assert, blender::Span< T >::cast(), contains_nan(), i, blender::Span< T >::size(), and verts.

Referenced by blender::ed::sculpt_paint::project::apply_projection_bmesh(), blender::ed::sculpt_paint::project::apply_projection_grids(), apply_translations(), apply_translations(), apply_translations(), blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::PositionDeformData::deform(), elastic_transform_node_bmesh(), elastic_transform_node_grids(), blender::ed::sculpt_paint::undo::restore_position_from_undo_step(), blender::ed::sculpt_paint::undo::restore_position_mesh(), transform_node_bmesh(), and transform_node_grids().

◆ area_center_calc_weighted()

float3 blender::ed::sculpt_paint::area_center_calc_weighted ( const float3 & test_location,
const float distance,
const float radius_inv,
const float3 & co )
static

Definition at line 1317 of file sculpt.cc.

References distance().

Referenced by accumulate_area_center().

◆ area_normal_and_center_get_normal_radius()

◆ area_normal_and_center_get_position_radius()

◆ area_normal_calc_weight()

float blender::ed::sculpt_paint::area_normal_calc_weight ( const float distance,
const float radius_inv )
static

Definition at line 1310 of file sculpt.cc.

References distance().

Referenced by accumulate_area_normal().

◆ attribute_matches()

bool blender::ed::sculpt_paint::attribute_matches ( const bke::AttributeAccessor a,
const bke::AttributeAccessor b,
const StringRef name )
static

◆ average_mask_border_position()

◆ average_unmasked_position()

◆ brush_asset_activate_exec()

◆ brush_asset_delete_exec()

◆ brush_asset_delete_invoke()

wmOperatorStatus blender::ed::sculpt_paint::brush_asset_delete_invoke ( bContext * C,
wmOperator * op,
const wmEvent *  )
static

◆ brush_asset_delete_poll()

bool blender::ed::sculpt_paint::brush_asset_delete_poll ( bContext * C)
static

◆ brush_asset_edit_metadata_exec()

◆ brush_asset_edit_metadata_invoke()

◆ brush_asset_edit_metadata_poll()

◆ brush_asset_load_preview_exec()

◆ brush_asset_load_preview_invoke()

wmOperatorStatus blender::ed::sculpt_paint::brush_asset_load_preview_invoke ( bContext * C,
wmOperator * op,
const wmEvent * event )
static

◆ brush_asset_revert_exec()

◆ brush_asset_revert_poll()

◆ brush_asset_save_as_exec()

wmOperatorStatus blender::ed::sculpt_paint::brush_asset_save_as_exec ( bContext * C,
wmOperator * op )
static

Definition at line 149 of file brush_asset_ops.cc.

References AS_asset_library_load(), ID::asset_data, blender::bke::asset_edit_id_from_weak_reference(), blender::bke::asset_edit_id_save_as(), ASSET_LIBRARY_LOCAL, BKE_asset_metadata_catalog_id_set(), BKE_asset_metadata_copy(), BKE_asset_metadata_free(), BKE_brush_duplicate(), BKE_libblock_rename(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_report(), BLI_assert, C, blender::asset_system::AssetCatalog::catalog_id, blender::asset_system::AssetLibrary::catalog_service(), CTX_data_main(), blender::asset_system::current_file_library_reference(), blender::ed::asset::generate_preview(), blender::ed::asset::get_asset_library_from_opptr(), Brush::has_unsaved_changes, Brush::id, ID_BR, ID_IS_ASSET, LIB_ID_DUPLICATE_IS_ROOT_ID, blender::ed::asset::library_ensure_catalogs_in_path(), blender::ed::asset::mark_id(), MAX_NAME, NA_ADDED, NA_EDITED, ID::name, name, NC_ASSET, NC_BRUSH, ND_ASSET_LIST, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, blender::ed::asset::refresh_asset_library(), wmOperator::reports, RNA_enum_get(), RNA_property_is_set(), RNA_property_string_get(), RNA_string_get(), RNA_struct_find_property(), RPT_ERROR, RPT_WARNING, blender::ed::asset::shelf::show_catalog_in_visible_shelves(), blender::asset_system::AssetCatalog::simple_name, STRNCPY_UTF8, ID::us, USER_DUP_LINKED_ID, USER_DUP_OBDATA, blender::ed::asset::user_library_to_library_ref(), WM_file_tag_modified(), WM_main_add_notifier(), WM_toolsystem_activate_brush_and_tool(), and blender::asset_system::AssetCatalogService::write_to_disk().

Referenced by BRUSH_OT_asset_save_as().

◆ brush_asset_save_as_invoke()

◆ brush_asset_save_as_poll()

bool blender::ed::sculpt_paint::brush_asset_save_as_poll ( bContext * C)
static

Definition at line 133 of file brush_asset_ops.cc.

References BKE_paint_brush(), BKE_paint_get_active_from_context(), and C.

Referenced by BRUSH_OT_asset_save_as().

◆ brush_asset_save_exec()

◆ brush_asset_save_poll()

◆ brush_delta_update()

void blender::ed::sculpt_paint::brush_delta_update ( const Depsgraph & depsgraph,
Paint & paint,
const Object & ob,
const Brush & brush )
static

Definition at line 4144 of file sculpt.cc.

References SculptSession::active_vert(), SculptSession::active_vert_position(), add_v3_v3(), blender::bke::PaintRuntime::anchored_initial_mouse, blender::bke::PaintRuntime::anchored_size, blender::math::AxisAngleBase< T, AngleT >::angle(), blender::math::AxisAngleBase< T, AngleT >::axis(), BRUSH_ANCHORED, BRUSH_CLOTH_DEFORM_SNAKE_HOOK, brush_delta_update(), BRUSH_GRAB_ACTIVE_VERTEX, brush_needs_rake_rotation(), brush_uses_topology_rake(), SculptSession::cache, Brush::cloth_deform_type, copy_v2_v2(), copy_v3_v3(), depsgraph, blender::bke::PaintRuntime::draw_anchored, ED_view3d_win_to_3d(), ELEM, eps, Brush::falloff_shape, Brush::flag, SculptRakeData::follow_co, SculptRakeData::follow_dist, blender::ed::sculpt_paint::StrokeCache::grab_delta, blender::ed::sculpt_paint::StrokeCache::initial_mouse, invert_m4_m4(), is_zero_v3(), len_squared_v3v3(), blender::ed::sculpt_paint::StrokeCache::location, blender::bke::pbvh::Mesh, blender::ed::sculpt_paint::StrokeCache::mouse_event, mul_mat3_m4_v3(), mul_v3_m4v3(), need_delta_for_tip_orientation(), need_delta_from_anchored_origin(), normalize_v3(), blender::ed::sculpt_paint::StrokeCache::old_grab_location, blender::ed::sculpt_paint::StrokeCache::orig_grab_location, PAINT_FALLOFF_SHAPE_TUBE, blender::bke::object::pbvh_get(), blender::bke::PaintRuntime::pixel_radius, project_plane_v3_v3v3(), blender::ed::sculpt_paint::StrokeCache::radius, blender::ed::sculpt_paint::StrokeCache::rake_data, rake_data_update(), Brush::rake_factor, blender::ed::sculpt_paint::StrokeCache::rake_rotation, blender::ed::sculpt_paint::StrokeCache::rake_rotation_symm, ViewContext::region, Object::sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_BOUNDARY, SCULPT_BRUSH_TYPE_CLAY_STRIPS, SCULPT_BRUSH_TYPE_CLAY_THUMB, SCULPT_BRUSH_TYPE_CLOTH, SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, SCULPT_BRUSH_TYPE_GRAB, SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE, SCULPT_BRUSH_TYPE_NUDGE, SCULPT_BRUSH_TYPE_PAINT, SCULPT_BRUSH_TYPE_PINCH, SCULPT_BRUSH_TYPE_PLANE, SCULPT_BRUSH_TYPE_POSE, SCULPT_BRUSH_TYPE_SMEAR, SCULPT_BRUSH_TYPE_SNAKE_HOOK, SCULPT_BRUSH_TYPE_THUMB, SCULPT_RAKE_BRUSH_FACTOR, SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), sqrtf, square_f(), sub_v3_v3(), sub_v3_v3v3(), blender::math::to_quaternion(), blender::bke::pbvh::Tree::type(), v2, ViewContext::v3d, blender::ed::sculpt_paint::StrokeCache::vc, vert_positions_for_grab_active_get(), blender::ed::sculpt_paint::StrokeCache::view_normal, and zero_v3().

Referenced by brush_delta_update(), and sculpt_update_cache_variants().

◆ brush_dynamic_size_get()

◆ brush_exit_tex()

void blender::ed::sculpt_paint::brush_exit_tex ( Sculpt & sd)
static

◆ brush_needs_rake_rotation()

bool blender::ed::sculpt_paint::brush_needs_rake_rotation ( const Brush & brush)
static

Definition at line 829 of file sculpt.cc.

References Brush::rake_factor, and blender::bke::brush::supports_rake_factor().

Referenced by brush_delta_update().

◆ BRUSH_OT_asset_activate()

◆ BRUSH_OT_asset_delete()

void blender::ed::sculpt_paint::BRUSH_OT_asset_delete ( wmOperatorType * ot)

◆ BRUSH_OT_asset_edit_metadata()

◆ BRUSH_OT_asset_load_preview()

◆ BRUSH_OT_asset_revert()

void blender::ed::sculpt_paint::BRUSH_OT_asset_revert ( wmOperatorType * ot)

Definition at line 790 of file brush_asset_ops.cc.

References brush_asset_revert_exec(), brush_asset_revert_poll(), and ot.

Referenced by ED_operatortypes_paint().

◆ BRUSH_OT_asset_save()

void blender::ed::sculpt_paint::BRUSH_OT_asset_save ( wmOperatorType * ot)

Definition at line 736 of file brush_asset_ops.cc.

References brush_asset_save_exec(), brush_asset_save_poll(), and ot.

Referenced by ED_operatortypes_paint().

◆ BRUSH_OT_asset_save_as()

◆ brush_plane_offset_get()

◆ brush_radius_factor()

◆ brush_radius_get()

float blender::ed::sculpt_paint::brush_radius_get ( const Paint & paint,
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()

◆ brush_stroke_modal()

wmOperatorStatus blender::ed::sculpt_paint::brush_stroke_modal ( bContext * C,
wmOperator * op,
const wmEvent * event )
static

◆ brush_tool_get()

◆ brush_type_is_attribute_only()

BLI_INLINE bool blender::ed::sculpt_paint::brush_type_is_attribute_only ( const int tool)

◆ brush_type_is_mask()

bool blender::ed::sculpt_paint::brush_type_is_mask ( const int tool)
inline

Definition at line 837 of file sculpt_intern.hh.

References ELEM, and SCULPT_BRUSH_TYPE_MASK.

Referenced by brush_type_is_attribute_only(), and sculpt_brush_stroke_invoke().

◆ brush_type_is_paint()

◆ brush_type_needs_all_pbvh_nodes()

bool blender::ed::sculpt_paint::brush_type_needs_all_pbvh_nodes ( const Brush & brush)
static

◆ brush_type_needs_original()

◆ brush_uses_topology_rake()

bool blender::ed::sculpt_paint::brush_uses_topology_rake ( const SculptSession & ss,
const Brush & brush )
static

◆ brush_uses_vector_displacement()

bool blender::ed::sculpt_paint::brush_uses_vector_displacement ( const Brush & brush)
inline

◆ cache_paint_invariants_update()

◆ calc_area_center()

◆ calc_area_normal()

◆ calc_area_normal_and_center()

◆ calc_area_normal_and_center_node_bmesh()

◆ calc_area_normal_and_center_node_grids()

◆ calc_area_normal_and_center_node_mesh()

◆ calc_area_normal_and_center_reduce()

◆ calc_brush_cube_distances()

template<typename T>
void blender::ed::sculpt_paint::calc_brush_cube_distances ( const Brush & brush,
const Span< T > positions,
const MutableSpan< float > r_distances )

◆ calc_brush_cube_distances< float2 >()

template void blender::ed::sculpt_paint::calc_brush_cube_distances< float2 > ( const Brush & brush,
const Span< float2 > positions,
MutableSpan< float > r_distances )

◆ calc_brush_cube_distances< float3 >()

template void blender::ed::sculpt_paint::calc_brush_cube_distances< float3 > ( const Brush & brush,
const Span< float3 > positions,
MutableSpan< float > r_distances )

◆ calc_brush_distances() [1/2]

void blender::ed::sculpt_paint::calc_brush_distances ( const SculptSession & ss,
Span< float3 > positions,
eBrushFalloffShape falloff_shape,
MutableSpan< float > r_distances )

Definition at line 7094 of file sculpt.cc.

References calc_brush_distances(), and calc_brush_distances_squared().

◆ calc_brush_distances() [2/2]

void blender::ed::sculpt_paint::calc_brush_distances ( const SculptSession & ss,
Span< float3 > vert_positions,
Span< int > vert,
eBrushFalloffShape falloff_shape,
MutableSpan< float > r_distances )

Calculate distances based on the distance from the brush cursor and various other settings. Also ignore vertices that are too far from the cursor.

Definition at line 7055 of file sculpt.cc.

References calc_brush_distances(), calc_brush_distances_squared(), and verts.

Referenced by blender::ed::sculpt_paint::brushes::calc_bmesh(), calc_brush_distances(), calc_brush_distances(), blender::ed::sculpt_paint::brushes::calc_faces(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), calculate_average_color(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::paint::image::do_paint_pixels(), blender::ed::sculpt_paint::color::do_sample_wet_paint_task(), blender::ed::sculpt_paint::color::do_smear_brush_task(), do_vpaint_brush_blur_loops(), do_vpaint_brush_blur_verts(), do_vpaint_brush_smear(), do_wpaint_brush_blur(), do_wpaint_brush_draw(), do_wpaint_brush_smear(), blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_grids(), blender::ed::sculpt_paint::brushes::sample_node_surface_mesh(), and vpaint_do_draw().

◆ calc_brush_distances_squared() [1/2]

◆ calc_brush_distances_squared() [2/2]

◆ calc_brush_local_mat()

◆ calc_brush_node_mask()

◆ calc_brush_plane()

void blender::ed::sculpt_paint::calc_brush_plane ( const Depsgraph & depsgraph,
const Brush & brush,
Object & ob,
const IndexMask & node_mask,
float3 & r_area_no,
float3 & r_area_co )
Warning
This call is not idempotent and changes values inside the StrokeCache.

Brushes may behave incorrectly if preserving original plane / normal when this method is not called.

Definition at line 2910 of file sculpt.cc.

References BLI_assert, BRUSH_ORIGINAL_NORMAL, BRUSH_ORIGINAL_PLANE, SculptSession::cache, calc_area_center(), calc_area_normal_and_center(), depsgraph, Brush::falloff_shape, Brush::flag, blender::math::is_zero(), blender::ed::sculpt_paint::StrokeCache::last_center, blender::MatBase< T, NumCol, NumRow, Alignment >::location(), blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, blender::math::normalize(), PAINT_FALLOFF_SHAPE_TUBE, blender::ed::sculpt_paint::StrokeCache::plane_offset, project_plane_v3_v3v3(), Object::sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_PLANE, SCULPT_DISP_DIR_AREA, SCULPT_DISP_DIR_VIEW, SCULPT_DISP_DIR_X, SCULPT_DISP_DIR_Y, SCULPT_DISP_DIR_Z, blender::ed::sculpt_paint::StrokeCache::sculpt_normal, Brush::sculpt_plane, SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), SCULPT_stroke_is_main_symmetry_pass(), blender::ed::sculpt_paint::StrokeCache::symm_rot_mat, symmetry_flip(), blender::math::transform_direction(), blender::math::transform_point(), blender::ed::sculpt_paint::StrokeCache::view_normal, blender::ed::sculpt_paint::StrokeCache::view_normal_symm, and blender::VecBase< T, Size >::xyz().

Referenced by blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask(), blender::ed::sculpt_paint::brushes::plane::calc_node_mask(), blender::ed::sculpt_paint::cloth::cloth_brush_apply_brush_forces(), blender::ed::sculpt_paint::brushes::do_clay_brush(), blender::ed::sculpt_paint::brushes::do_clay_thumb_brush(), blender::ed::sculpt_paint::brushes::do_multiplane_scrape_brush(), and blender::ed::sculpt_paint::brushes::do_pinch_brush().

◆ calc_brush_strength_factors()

◆ calc_brush_texture_factors() [1/2]

◆ calc_brush_texture_factors() [2/2]

◆ calc_factors_common_bmesh()

◆ calc_factors_common_from_orig_data_bmesh()

◆ calc_factors_common_from_orig_data_grids()

◆ calc_factors_common_from_orig_data_mesh()

◆ calc_factors_common_grids()

◆ calc_factors_common_mesh()

◆ calc_factors_common_mesh_indexed() [1/2]

◆ calc_factors_common_mesh_indexed() [2/2]

void blender::ed::sculpt_paint::calc_factors_common_mesh_indexed ( const Depsgraph & depsgraph,
const Brush & brush,
const Object & object,
const MeshAttributeData & attribute_data,
Span< float3 > vert_positions,
Span< float3 > vert_normals,
const bke::pbvh::MeshNode & node,
Vector< float > & r_factors,
Vector< float > & r_distances )

◆ calc_front_face() [1/5]

void blender::ed::sculpt_paint::calc_front_face ( const float3 & view_normal,
const Set< BMFace *, 0 > & faces,
MutableSpan< float > factors )

◆ calc_front_face() [2/5]

void blender::ed::sculpt_paint::calc_front_face ( const float3 & view_normal,
const Set< BMVert *, 0 > & verts,
MutableSpan< float > factors )

◆ calc_front_face() [3/5]

◆ calc_front_face() [4/5]

◆ calc_front_face() [5/5]

void blender::ed::sculpt_paint::calc_front_face ( const float3 & view_normal,
Span< float3 > vert_normals,
Span< int > verts,
MutableSpan< float > factors )

◆ calc_local_from_screen()

void blender::ed::sculpt_paint::calc_local_from_screen ( const ViewContext & vc,
const float center[3],
const float screen_dir[2],
float r_local_dir[3] )
static

◆ calc_sculpt_normal()

◆ calc_smooth_translations()

void blender::ed::sculpt_paint::calc_smooth_translations ( const Depsgraph & depsgraph,
const Object & object,
const IndexMask & node_mask,
MutableSpan< float3 > translations )

◆ calc_stabilized_plane()

void blender::ed::sculpt_paint::calc_stabilized_plane ( const Brush & brush,
StrokeCache & cache,
const float3 & plane_normal,
const float3 & plane_center,
float3 & r_stabilized_normal,
float3 & r_stabilized_center )
static

◆ calc_symm_area_transform_translations()

BLI_NOINLINE void blender::ed::sculpt_paint::calc_symm_area_transform_translations ( const Span< float3 > positions,
const std::array< float4x4, 8 > & transform_mats,
const MutableSpan< float3 > translations )
static

◆ calc_transform_translations()

BLI_NOINLINE void blender::ed::sculpt_paint::calc_transform_translations ( const float4x4 & elastic_transform_mat,
const Span< float3 > positions,
const MutableSpan< float3 > r_translations )
static

◆ calc_translations_to_plane() [1/2]

void blender::ed::sculpt_paint::calc_translations_to_plane ( Span< float3 > positions,
const float4 & plane,
MutableSpan< float3 > translations )

◆ calc_translations_to_plane() [2/2]

void blender::ed::sculpt_paint::calc_translations_to_plane ( Span< float3 > vert_positions,
Span< int > verts,
const float4 & plane,
MutableSpan< float3 > translations )

◆ calc_vert_neighbors() [1/3]

◆ calc_vert_neighbors() [2/3]

GroupedSpan< int > blender::ed::sculpt_paint::calc_vert_neighbors ( OffsetIndices< int > faces,
Span< int > corner_verts,
GroupedSpan< int > vert_to_face,
Span< bool > hide_poly,
Span< int > verts,
Vector< int > & r_offset_data,
Vector< int > & r_data )

Find vertices connected to the indexed vertices across faces. Neighbors connected across hidden faces are skipped.

See calc_vert_neighbors_interior for a version that does extra filtering for boundary vertices.

Definition at line 7597 of file sculpt.cc.

References append_neighbors_to_vector(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), BLI_assert, calc_vert_neighbors(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), faces, i, blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and verts.

Referenced by blender::ed::sculpt_paint::smooth::blur_geometry_data_array(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), calc_vert_neighbors(), calc_vert_neighbors(), calc_vert_neighbors(), blender::ed::sculpt_paint::color::color_filter_task(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::cloth::ensure_nodes_constraints(), blender::ed::sculpt_paint::pose::grow_factors_mesh(), blender::ed::sculpt_paint::mask::grow_mask_mesh(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), blender::ed::sculpt_paint::color::sculpt_color_presmooth_init(), blender::ed::sculpt_paint::mask::sharpen_mask_mesh(), blender::ed::sculpt_paint::mask::shrink_mask_mesh(), and blender::ed::sculpt_paint::mask::smooth_mask_mesh().

◆ calc_vert_neighbors() [3/3]

◆ calc_vert_neighbors_interior() [1/4]

void blender::ed::sculpt_paint::calc_vert_neighbors_interior ( const Set< BMVert *, 0 > & verts,
MutableSpan< Vector< BMVert * > > result )

◆ calc_vert_neighbors_interior() [2/4]

◆ calc_vert_neighbors_interior() [3/4]

GroupedSpan< int > blender::ed::sculpt_paint::calc_vert_neighbors_interior ( OffsetIndices< int > faces,
Span< int > corner_verts,
GroupedSpan< int > vert_to_face,
BitSpan boundary_verts,
Span< bool > hide_poly,
Span< int > verts,
Span< float > factors,
Vector< int > & r_offset_data,
Vector< int > & r_data )

◆ calc_vert_neighbors_interior() [4/4]

GroupedSpan< int > blender::ed::sculpt_paint::calc_vert_neighbors_interior ( OffsetIndices< int > faces,
Span< int > corner_verts,
GroupedSpan< int > vert_to_face,
BitSpan boundary_verts,
Span< bool > hide_poly,
Span< int > verts,
Vector< int > & r_offset_data,
Vector< int > & r_data )

Find vertices connected to the indexed vertices across faces. Neighbors connected across hidden faces are skipped. For boundary vertices (stored in the boundary_verts argument), only include other boundary vertices. Corner vertices are skipped entirely and will not have neighbor information populated.

Definition at line 7739 of file sculpt.cc.

References calc_vert_neighbors_interior(), calc_vert_neighbors_interior_impl(), faces, and verts.

Referenced by blender::ed::sculpt_paint::filter::calc_smooth_filter(), calc_vert_neighbors_interior(), calc_vert_neighbors_interior(), calc_vert_neighbors_interior(), calc_vert_neighbors_interior(), and blender::ed::sculpt_paint::tests::TEST_F().

◆ calc_vert_neighbors_interior_impl()

◆ cancel_modal_transform()

◆ clip_and_lock_translations() [1/2]

◆ clip_and_lock_translations() [2/2]

void blender::ed::sculpt_paint::clip_and_lock_translations ( const Sculpt & sd,
const SculptSession & ss,
Span< float3 > positions,
Span< int > verts,
MutableSpan< float3 > translations )

Modify translations based on sculpt mode axis locking and mirroring clipping.

Definition at line 7335 of file sculpt.cc.

References blender::math::abs(), BLI_assert, SculptSession::cache, clip_and_lock_translations(), ClipX, blender::ed::sculpt_paint::StrokeCache::flag, Sculpt::flags, i, blender::ed::sculpt_paint::StrokeCache::mat, blender::ed::sculpt_paint::StrokeCache::mat_inv, blender::ed::sculpt_paint::StrokeCache::mirror_modifier_clip, SCULPT_LOCK_X, blender::MutableSpan< T >::size(), blender::ed::sculpt_paint::StrokeCache::tolerance, blender::math::transform_point(), and verts.

Referenced by blender::ed::sculpt_paint::project::apply_projection_bmesh(), blender::ed::sculpt_paint::project::apply_projection_grids(), blender::ed::sculpt_paint::project::apply_projection_mesh(), blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::brushes::calc_faces(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), clip_and_lock_translations(), clip_and_lock_translations(), blender::ed::sculpt_paint::cloth::do_simulation_step(), blender::ed::sculpt_paint::face_set::edit_fairing(), elastic_transform_node_bmesh(), elastic_transform_node_grids(), elastic_transform_node_mesh(), transform_node_bmesh(), transform_node_grids(), and transform_node_mesh().

◆ color_supported_check()

bool blender::ed::sculpt_paint::color_supported_check ( const Scene & scene,
Object & object,
ReportList * reports )

Returns true if the current Mesh type can handle color attributes. If false an error message will be shown to the user. Operators should return OPERATOR_CANCELLED in this case.

NOTE: Does not check if a color attribute actually exists. Calling code must handle this itself; in most cases a call to BKE_sculpt_color_layer_create_if_needed() is sufficient.

Definition at line 5474 of file sculpt.cc.

References BKE_report(), BKE_sculpt_multires_active(), SculptSession::bm, color_supported_check(), and RPT_ERROR.

Referenced by color_supported_check(), blender::ed::sculpt_paint::mask::mask_by_color(), sample_color_invoke(), sculpt_brush_stroke_invoke(), and blender::ed::sculpt_paint::color::sculpt_color_filter_init().

◆ combine_average_position_accumulation()

◆ contains_nan()

bool blender::ed::sculpt_paint::contains_nan ( const Span< float > values)
static

◆ create_node_vert_offsets() [1/2]

◆ create_node_vert_offsets() [2/2]

OffsetIndices< int > blender::ed::sculpt_paint::create_node_vert_offsets ( Span< bke::pbvh::MeshNode > nodes,
const IndexMask & node_mask,
Array< int > & node_data )

◆ create_node_vert_offsets_bmesh()

◆ cursor_draw_point_screen_space()

void blender::ed::sculpt_paint::cursor_draw_point_screen_space ( const uint gpuattr,
const ARegion * region,
const float true_location[3],
const float obmat[4][4],
const int size )
static

◆ cursor_draw_point_with_symmetry()

void blender::ed::sculpt_paint::cursor_draw_point_with_symmetry ( const uint gpuattr,
const ARegion * region,
const float true_location[3],
const Sculpt & sd,
const Object & ob,
const float radius )
static

◆ cursor_draw_tiling_preview()

void blender::ed::sculpt_paint::cursor_draw_tiling_preview ( const uint gpuattr,
const ARegion * region,
const float true_location[3],
const Sculpt & sd,
const Object & ob,
const float radius )
static

◆ cursor_geometry_info_update()

bool blender::ed::sculpt_paint::cursor_geometry_info_update ( bContext * C,
CursorGeometryInfo * out,
const float2 & mval,
bool use_sampled_normal )

Gets the normal, location and active vertex location of the geometry under the cursor. This also updates the active vertex and cursor related data of the SculptSession using the mouse position

TODO: This should be updated to return std::optional<CursorGeometryInfo>

Definition at line 4685 of file sculpt.cc.

References blender::ed::sculpt_paint::RaycastData::active_face_grid_index, SculptSession::active_face_index, SculptSession::active_grid_index, blender::ed::sculpt_paint::RaycastData::active_vertex, BKE_base_is_visible(), BKE_paint_brush_for_read(), BKE_paint_get_active_from_context(), blender::bke::pbvh::BMesh, C, SculptSession::cache, calc_area_normal(), SculptSession::clear_active_elements(), blender::ed::sculpt_paint::RaycastData::corner_tris, blender::ed::sculpt_paint::RaycastData::corner_verts, CTX_data_active_base(), CTX_data_depsgraph_pointer(), CTX_wm_view3d(), cursor_geometry_info_update(), SculptSession::cursor_location, SculptSession::cursor_normal, SculptSession::cursor_radius, SculptSession::cursor_sampled_normal, SculptSession::cursor_view_normal, Object::data, depsgraph, blender::ed::sculpt_paint::RaycastData::depth, ED_view3d_viewcontext_init(), blender::bke::Face, blender::ed::sculpt_paint::RaycastData::face_normal, blender::ed::sculpt_paint::RaycastData::faces, blender::bke::pbvh::Grids, blender::ed::sculpt_paint::RaycastData::hide_poly, blender::ed::sculpt_paint::RaycastData::hit, blender::math::invert(), blender::index_mask::IndexMask::is_empty(), blender::ed::sculpt_paint::RaycastData::is_mid_stroke, blender::ed::sculpt_paint::RaycastData::isect_precalc, isect_ray_tri_watertight_v3_precalc(), blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, blender::math::normalize(), ViewContext::obact, blender::ed::sculpt_paint::RaycastData::object, object_space_radius_get(), out, pbvh_gather_cursor_update(), blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::RaycastData::ray_normal, blender::ed::sculpt_paint::RaycastData::ray_start, blender::bke::pbvh::raycast(), raycast_init(), Object::runtime, SculptSession::rv3d, ViewContext::rv3d, Object::sculpt, sculpt_raycast_cb(), SCULPT_stroke_modifiers_check(), SculptSession::set_active_vert(), blender::ed::sculpt_paint::RaycastData::subdiv_ccg, SculptSession::subdiv_ccg, blender::math::transform_direction(), blender::bke::pbvh::Tree::type(), blender::bke::pbvh::update_normals(), blender::ed::sculpt_paint::RaycastData::use_original, SculptSession::v3d, ViewContext::v3d, blender::ed::sculpt_paint::RaycastData::vert_positions, blender::bke::pbvh::vert_positions_eval(), vert_random_access_ensure(), and RegionView3D::viewinv.

Referenced by blender::ed::sculpt_paint::face_set::active_update_and_get(), blender::ed::sculpt_paint::face_set::change_visibility_invoke(), cursor_geometry_info_update(), blender::ed::sculpt_paint::face_set::edit_op_invoke(), blender::ed::sculpt_paint::trim::initialize_cursor_info(), blender::ed::sculpt_paint::mask::mask_by_color(), paint_cursor_sculpt_session_update_and_init(), blender::ed::sculpt_paint::dyntopo::sample_detail_voxel(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_invoke(), blender::ed::sculpt_paint::color::sculpt_color_filter_init(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_start(), set_pivot_position_exec(), stroke_test_start(), and blender::ed::sculpt_paint::expand::target_vert_update_and_get().

◆ curve_mask_allocate()

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

◆ curve_mask_free()

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

◆ CURVES_OT_sculptmode_toggle()

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

◆ curves_sculpt_brush_uses_spacing()

bool blender::ed::sculpt_paint::curves_sculpt_brush_uses_spacing ( const eBrushCurvesSculptType tool)
static

◆ curves_sculpt_poll()

bool blender::ed::sculpt_paint::curves_sculpt_poll ( bContext * C)

◆ curves_sculpt_poll_view3d()

bool blender::ed::sculpt_paint::curves_sculpt_poll_view3d ( bContext * C)

Definition at line 75 of file curves_sculpt_ops.cc.

References C, CTX_wm_region_view3d(), and curves_sculpt_poll().

Referenced by curves_sculptmode_enter().

◆ curves_sculptmode_enter()

◆ curves_sculptmode_exit()

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

Definition at line 318 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()

◆ diameter_to_curve_mask_size()

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

Definition at line 139 of file paint_image_2d_curve_mask.cc.

Referenced by curve_mask_allocate(), and is_curve_mask_size_valid().

◆ do_brush_action()

void blender::ed::sculpt_paint::do_brush_action ( const Depsgraph & depsgraph,
const Scene & ,
Sculpt & sd,
Object & ob,
const Brush & brush,
PaintModeSettings & paint_mode_settings )
static

Definition at line 3197 of file sculpt.cc.

References blender::ed::sculpt_paint::StrokeCache::accum, add_v3_v3(), blender::ed::sculpt_paint::StrokeCache::alt_smooth, Brush::autosmooth_factor, blender::bke::PaintRuntime::average_stroke_accum, blender::bke::PaintRuntime::average_stroke_counter, BLI_assert, BRUSH_AUTOMASKING_CAVITY_ALL, BRUSH_DEFORM_TARGET_CLOTH_SIM, BRUSH_DIR_IN, BRUSH_INVERSE_SMOOTH_PRESSURE, BRUSH_MASK_DRAW, BRUSH_MASK_SMOOTH, blender::ed::sculpt_paint::cloth::brush_simulation_create(), BRUSH_SMOOTH_DEFORM_LAPLACIAN, BRUSH_SMOOTH_DEFORM_SURFACE, blender::ed::sculpt_paint::cloth::brush_store_simulation_state(), brush_type_needs_original(), brush_uses_topology_rake(), brush_uses_vector_displacement(), blender::ed::sculpt_paint::StrokeCache::bstrength, SculptSession::cache, calc_brush_node_mask(), blender::ed::sculpt_paint::auto_mask::Cache::calc_cavity_factor(), blender::ed::sculpt_paint::StrokeCache::cloth_sim, Brush::deform_target, depsgraph, blender::ed::sculpt_paint::brushes::do_blob_brush(), blender::ed::sculpt_paint::brushes::do_bmesh_topology_rake_brush(), blender::ed::sculpt_paint::boundary::do_boundary_brush(), blender::ed::sculpt_paint::brushes::do_clay_brush(), blender::ed::sculpt_paint::brushes::do_clay_strips_brush(), blender::ed::sculpt_paint::brushes::do_clay_thumb_brush(), blender::ed::sculpt_paint::cloth::do_cloth_brush(), blender::ed::sculpt_paint::brushes::do_crease_brush(), blender::ed::sculpt_paint::brushes::do_displacement_eraser_brush(), blender::ed::sculpt_paint::brushes::do_displacement_smear_brush(), blender::ed::sculpt_paint::brushes::do_draw_brush(), blender::ed::sculpt_paint::brushes::do_draw_face_sets_brush(), blender::ed::sculpt_paint::brushes::do_draw_sharp_brush(), blender::ed::sculpt_paint::brushes::do_draw_vector_displacement_brush(), blender::ed::sculpt_paint::brushes::do_elastic_deform_brush(), blender::ed::sculpt_paint::brushes::do_enhance_details_brush(), blender::ed::sculpt_paint::brushes::do_grab_brush(), blender::ed::sculpt_paint::brushes::do_gravity_brush(), blender::ed::sculpt_paint::brushes::do_inflate_brush(), blender::ed::sculpt_paint::brushes::do_layer_brush(), blender::ed::sculpt_paint::brushes::do_mask_brush(), blender::ed::sculpt_paint::brushes::do_multiplane_scrape_brush(), blender::ed::sculpt_paint::brushes::do_nudge_brush(), blender::ed::sculpt_paint::color::do_paint_brush(), blender::ed::sculpt_paint::brushes::do_pinch_brush(), blender::ed::sculpt_paint::brushes::do_plane_brush(), blender::ed::sculpt_paint::pose::do_pose_brush(), blender::ed::sculpt_paint::brushes::do_relax_face_sets_brush(), blender::ed::sculpt_paint::brushes::do_rotate_brush(), blender::ed::sculpt_paint::cloth::do_simulation_step(), blender::ed::sculpt_paint::color::do_smear_brush(), blender::ed::sculpt_paint::brushes::do_smooth_brush(), blender::ed::sculpt_paint::brushes::do_smooth_mask_brush(), blender::ed::sculpt_paint::brushes::do_snake_hook_brush(), blender::ed::sculpt_paint::brushes::do_surface_smooth_brush(), blender::ed::sculpt_paint::brushes::do_thumb_brush(), blender::ed::sculpt_paint::brushes::do_topology_relax_brush(), blender::ed::sculpt_paint::brushes::do_topology_slide_brush(), ELEM, blender::ed::sculpt_paint::cloth::ensure_nodes_constraints(), Brush::flag, blender::ed::sculpt_paint::auto_mask::Settings::flags, blender::ed::sculpt_paint::StrokeCache::initial_direction_flipped, blender::ed::sculpt_paint::StrokeCache::invert, invert(), blender::index_mask::IndexMask::is_empty(), blender::ed::sculpt_paint::auto_mask::is_enabled(), blender::bke::PaintRuntime::last_stroke_valid, blender::ed::sculpt_paint::StrokeCache::location, blender::ed::sculpt_paint::StrokeCache::location_symm, Brush::mask_tool, blender::ed::sculpt_paint::brushes::CursorSampleResult::node_mask, Sculpt::paint, pbvh_gather_texpaint(), blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::StrokeCache::pen_flip, blender::ed::sculpt_paint::brushes::CursorSampleResult::plane_center, blender::ed::sculpt_paint::brushes::CursorSampleResult::plane_normal, blender::ed::sculpt_paint::StrokeCache::pressure, blender::math::project_point(), push_undo_nodes(), Paint::runtime, SculptSession::rv3d, Object::sculpt, sculpt_brush_needs_normal(), Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_BLOB, SCULPT_BRUSH_TYPE_BOUNDARY, SCULPT_BRUSH_TYPE_CLAY, SCULPT_BRUSH_TYPE_CLAY_STRIPS, SCULPT_BRUSH_TYPE_CLAY_THUMB, SCULPT_BRUSH_TYPE_CLOTH, SCULPT_BRUSH_TYPE_CREASE, SCULPT_BRUSH_TYPE_DISPLACEMENT_ERASER, SCULPT_BRUSH_TYPE_DISPLACEMENT_SMEAR, SCULPT_BRUSH_TYPE_DRAW, SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, SCULPT_BRUSH_TYPE_DRAW_SHARP, SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, SCULPT_BRUSH_TYPE_GRAB, SCULPT_BRUSH_TYPE_INFLATE, SCULPT_BRUSH_TYPE_LAYER, SCULPT_BRUSH_TYPE_MASK, SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE, SCULPT_BRUSH_TYPE_NUDGE, SCULPT_BRUSH_TYPE_PAINT, SCULPT_BRUSH_TYPE_PINCH, SCULPT_BRUSH_TYPE_PLANE, SCULPT_BRUSH_TYPE_POSE, SCULPT_BRUSH_TYPE_ROTATE, SCULPT_BRUSH_TYPE_SLIDE_RELAX, SCULPT_BRUSH_TYPE_SMEAR, SCULPT_BRUSH_TYPE_SMOOTH, SCULPT_BRUSH_TYPE_SNAKE_HOOK, SCULPT_BRUSH_TYPE_THUMB, sculpt_needs_pbvh_pixels(), sculpt_pbvh_update_pixels(), SCULPT_stroke_is_main_symmetry_pass(), blender::ed::sculpt_paint::auto_mask::Cache::settings, blender::ed::sculpt_paint::cloth::sim_activate_nodes(), Brush::smooth_deform_type, blender::ed::sculpt_paint::auto_mask::stroke_cache_ensure(), blender::bke::brush::supports_auto_smooth_pressure(), blender::ed::sculpt_paint::StrokeCache::supports_gravity, Brush::topology_rake_factor, true, update_brush_local_mat(), blender::bke::pbvh::update_normals(), update_sculpt_normal(), and RegionView3D::view_render.

Referenced by stroke_update_step().

◆ do_radial_symmetry()

void blender::ed::sculpt_paint::do_radial_symmetry ( const Depsgraph & depsgraph,
const Scene & scene,
Sculpt & sd,
Object & ob,
const Brush & brush,
PaintModeSettings & paint_mode_settings,
const BrushActionFunc action,
const ePaintSymmetryFlags symm,
const int axis,
const float  )
static

◆ do_symmetrical_brush_actions()

◆ do_tiled()

◆ draw_bezier_handle_lines()

BLI_INLINE void blender::ed::sculpt_paint::draw_bezier_handle_lines ( uint pos,
const float sel_col[4],
BezTriple * bez )

◆ draw_rect_point()

BLI_INLINE void blender::ed::sculpt_paint::draw_rect_point ( uint pos,
const float sel_col[4],
const float handle_col[4],
const float * co,
float width,
bool selected )

◆ draw_tri_point()

BLI_INLINE void blender::ed::sculpt_paint::draw_tri_point ( uint pos,
const float sel_col[4],
const float pivot_col[4],
float * co,
float width,
bool selected )

◆ dynamic_topology_update()

void blender::ed::sculpt_paint::dynamic_topology_update ( const Depsgraph & depsgraph,
const Scene & ,
Sculpt & sd,
Object & ob,
const Brush & brush,
PaintModeSettings &  )
static

Definition at line 3009 of file sculpt.cc.

References blender::ed::sculpt_paint::StrokeCache::accum, BKE_pbvh_bmesh_node_save_orig(), BKE_pbvh_node_mark_topology_update(), SculptSession::bm, SculptSession::bm_log, blender::bke::pbvh::bmesh_update_topology(), SculptVertexInfo::boundary, BRUSH_FRONTFACE, blender::ed::sculpt_paint::dyntopo::detail_size::brush_to_detail_size(), brush_type_needs_original(), SculptSession::cache, blender::bits::BitVector< InlineBufferCapacity, Allocator >::clear(), Sculpt::constant_detail, blender::ed::sculpt_paint::dyntopo::detail_size::constant_to_detail_size(), depsgraph, Sculpt::detail_percent, Sculpt::detail_size, blender::ed::sculpt_paint::StrokeCache::dyntopo_pixel_radius, blender::ed::sculpt_paint::dyntopo::detail_size::EDGE_LENGTH_MIN_FACTOR, Brush::falloff_shape, Brush::flag, Sculpt::flags, blender::index_mask::IndexMask::foreach_index(), i, blender::index_mask::IndexMask::is_empty(), blender::ed::sculpt_paint::StrokeCache::location_symm, blender::ed::sculpt_paint::undo::Mask, blender::bke::pbvh::Tree::nodes(), PAINT_FALLOFF_SHAPE_SPHERE, PBVH_Collapse, pbvh_gather_generic(), blender::bke::object::pbvh_get(), PBVH_Subdivide, blender::ed::sculpt_paint::undo::Position, blender::ed::sculpt_paint::undo::push_nodes(), blender::ed::sculpt_paint::StrokeCache::radius, blender::ed::sculpt_paint::dyntopo::detail_size::relative_to_detail_size(), Object::sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_MASK, SCULPT_BRUSH_TYPE_SIMPLIFY, SCULPT_DYNTOPO_COLLAPSE, SCULPT_DYNTOPO_DETAIL_BRUSH, SCULPT_DYNTOPO_DETAIL_CONSTANT, SCULPT_DYNTOPO_DETAIL_MANUAL, SCULPT_DYNTOPO_SUBDIVIDE, blender::bke::pbvh::Tree::tag_positions_changed(), blender::bke::pbvh::Tree::tag_topology_changed(), true, U, SculptSession::vertex_info, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.

Referenced by stroke_update_step().

◆ elastic_transform_node_bmesh()

◆ elastic_transform_node_grids()

◆ elastic_transform_node_mesh()

◆ end_transform()

◆ ensure_editable_drawings()

◆ ensure_valid_pivot()

◆ ENUM_OPERATORS()

blender::ed::sculpt_paint::ENUM_OPERATORS ( AverageDataFlags ,
AverageDataFlags::Normal  )

References Normal.

◆ fake_neighbor_init()

void blender::ed::sculpt_paint::fake_neighbor_init ( Object & object,
const float max_dist )
static

◆ fake_neighbor_search()

◆ fake_neighbor_search_bmesh()

◆ fake_neighbor_search_grids()

◆ fake_neighbor_search_mesh()

◆ fill_active_color()

bool blender::ed::sculpt_paint::fill_active_color ( Object & ob,
ColorPaint4f fill_color,
bool only_selected = true,
bool affect_alpha = true )
static

◆ fill_bm_face_or_corner_attribute()

template<typename T>
void blender::ed::sculpt_paint::fill_bm_face_or_corner_attribute ( BMesh & bm,
const T & value,
const AttrDomain domain,
const int cd_offset,
const bool use_vert_sel )
static

◆ fill_factor_from_hide() [1/3]

void blender::ed::sculpt_paint::fill_factor_from_hide ( const Set< BMVert *, 0 > & verts,
MutableSpan< float > r_factors )

◆ fill_factor_from_hide() [2/3]

◆ fill_factor_from_hide() [3/3]

◆ fill_factor_from_hide_and_mask() [1/3]

void blender::ed::sculpt_paint::fill_factor_from_hide_and_mask ( const BMesh & bm,
const Set< BMVert *, 0 > & verts,
MutableSpan< float > r_factors )

◆ fill_factor_from_hide_and_mask() [2/3]

◆ fill_factor_from_hide_and_mask() [3/3]

void blender::ed::sculpt_paint::fill_factor_from_hide_and_mask ( Span< bool > hide_vert,
Span< float > mask,
Span< int > verts,
MutableSpan< float > r_factors )

Calculate initial influence factors based on vertex visibility and masking.

Definition at line 6823 of file sculpt.cc.

References BLI_assert, blender::MutableSpan< T >::fill(), fill_factor_from_hide_and_mask(), i, blender::Span< T >::is_empty(), blender::MutableSpan< T >::size(), and verts.

Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_bmesh(), blender::ed::sculpt_paint::cloth::apply_filter_forces_grids(), blender::ed::sculpt_paint::cloth::apply_filter_forces_mesh(), blender::ed::sculpt_paint::project::apply_projection_bmesh(), blender::ed::sculpt_paint::project::apply_projection_grids(), blender::ed::sculpt_paint::project::apply_projection_mesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::color::color_filter_task(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::cloth::do_simulation_step(), blender::ed::sculpt_paint::color::do_smear_brush_task(), elastic_transform_node_bmesh(), elastic_transform_node_grids(), elastic_transform_node_mesh(), fill_factor_from_hide_and_mask(), fill_factor_from_hide_and_mask(), fill_factor_from_hide_and_mask(), transform_node_bmesh(), transform_node_grids(), and transform_node_mesh().

◆ fill_mesh_color()

◆ fill_mesh_face_or_corner_attribute()

template<typename T>
void blender::ed::sculpt_paint::fill_mesh_face_or_corner_attribute ( Mesh & mesh,
const T & value,
const AttrDomain domain,
const MutableSpan< T > data,
const bool use_vert_sel,
const bool use_face_sel,
const bool affect_alpha )
static

◆ filter_above_plane_factors() [1/2]

void blender::ed::sculpt_paint::filter_above_plane_factors ( Span< float3 > positions,
const float4 & plane,
MutableSpan< float > factors )

◆ filter_above_plane_factors() [2/2]

void blender::ed::sculpt_paint::filter_above_plane_factors ( Span< float3 > vert_positions,
Span< int > verts,
const float4 & plane,
MutableSpan< float > factors )

◆ filter_below_plane_factors() [1/2]

void blender::ed::sculpt_paint::filter_below_plane_factors ( Span< float3 > positions,
const float4 & plane,
MutableSpan< float > factors )

◆ filter_below_plane_factors() [2/2]

void blender::ed::sculpt_paint::filter_below_plane_factors ( Span< float3 > vert_positions,
Span< int > verts,
const float4 & plane,
MutableSpan< float > factors )

Ignore points below the plane.

Definition at line 7879 of file sculpt.cc.

References filter_below_plane_factors(), i, plane_point_side_v3(), and verts.

Referenced by filter_below_plane_factors(), and filter_below_plane_factors().

◆ filter_distances_with_radius()

void blender::ed::sculpt_paint::filter_distances_with_radius ( float radius,
Span< float > distances,
MutableSpan< float > factors )

Set the factor to zero for all distances greater than the radius.

Definition at line 7105 of file sculpt.cc.

References filter_distances_with_radius(), i, and blender::Span< T >::index_range().

Referenced by blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::brushes::calc_faces(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), calculate_average_color(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::paint::image::do_paint_pixels(), blender::ed::sculpt_paint::color::do_sample_wet_paint_task(), blender::ed::sculpt_paint::color::do_smear_brush_task(), do_vpaint_brush_blur_loops(), do_vpaint_brush_blur_verts(), do_vpaint_brush_smear(), do_wpaint_brush_blur(), do_wpaint_brush_draw(), do_wpaint_brush_smear(), filter_distances_with_radius(), blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_grids(), blender::ed::sculpt_paint::brushes::sample_node_surface_mesh(), and vpaint_do_draw().

◆ filter_plane_trim_limit_factors()

◆ filter_region_clip_factors() [1/2]

◆ filter_region_clip_factors() [2/2]

void blender::ed::sculpt_paint::filter_region_clip_factors ( const SculptSession & ss,
Span< float3 > vert_positions,
Span< int > verts,
MutableSpan< float > factors )

When the 3D view's clipping planes are enabled, brushes shouldn't have any effect on vertices outside of the planes, because they're not visible. This function disables the factors for those vertices.

Definition at line 6972 of file sculpt.cc.

References BLI_assert, SculptSession::cache, ED_view3d_clipping_test(), filter_region_clip_factors(), i, blender::MatBase< float, 4, 4 >::identity(), blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, SculptSession::rv3d, ViewContext::rv3d, RV3D_CLIPPING_ENABLED, blender::MutableSpan< T >::size(), blender::ed::sculpt_paint::StrokeCache::symm_rot_mat_inv, symmetry_flip(), blender::math::transform_point(), SculptSession::v3d, ViewContext::v3d, blender::ed::sculpt_paint::StrokeCache::vc, and verts.

Referenced by blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::brushes::calc_faces(), calc_factors_common_bmesh(), calc_factors_common_from_orig_data_bmesh(), calc_factors_common_from_orig_data_grids(), calc_factors_common_from_orig_data_mesh(), calc_factors_common_grids(), calc_factors_common_mesh(), calc_factors_common_mesh_indexed(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), calculate_average_color(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::color::do_smear_brush_task(), do_vpaint_brush_blur_loops(), do_vpaint_brush_blur_verts(), do_vpaint_brush_smear(), do_wpaint_brush_blur(), do_wpaint_brush_draw(), do_wpaint_brush_smear(), filter_region_clip_factors(), filter_region_clip_factors(), blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_grids(), blender::ed::sculpt_paint::brushes::sample_node_surface_mesh(), and vpaint_do_draw().

◆ filter_translations_with_symmetry()

BLI_NOINLINE void blender::ed::sculpt_paint::filter_translations_with_symmetry ( const Span< float3 > positions,
const ePaintSymmetryFlags symm,
const MutableSpan< float3 > translations )
static

◆ filter_verts_outside_symmetry_area()

void blender::ed::sculpt_paint::filter_verts_outside_symmetry_area ( Span< float3 > positions,
const float3 & pivot,
ePaintSymmetryFlags symm,
MutableSpan< float > factors )

◆ find_curves_brush_position()

◆ find_symm_verts()

◆ find_symm_verts_bmesh()

◆ find_symm_verts_grids()

◆ find_symm_verts_mesh()

◆ float_selection_ensure()

◆ flush_update_done()

void blender::ed::sculpt_paint::flush_update_done ( const bContext * C,
Object & ob,
UpdateType update_type )

Triggers redraws, updates, and dependency graph tags as necessary when a brush stroke finishes.

Definition at line 5146 of file sculpt.cc.

References bScreen::areabase, BKE_pbvh_bmesh_after_stroke(), BKE_sculptsession_use_pbvh_draw(), SculptSession::bm, blender::bke::pbvh::BMesh, C, CTX_wm_manager(), CTX_wm_region_view3d(), Object::data, DEG_id_tag_update(), ED_area_tag_redraw_regiontype(), ED_region_tag_redraw(), flush_update_done(), Object::id, ID_REAL_USERS, ID_RECALC_GEOMETRY, Image, LISTBASE_FOREACH, blender::bke::object::pbvh_get(), Position, RegionView3D::rflag, RGN_TYPE_WINDOW, RV3D_PAINTING, Object::sculpt, SCULPT_fake_neighbors_free(), SPACE_IMAGE, SPACE_VIEW3D, SpaceLink::spacetype, blender::bke::pbvh::store_bounds_orig(), blender::bke::pbvh::Tree::type(), and WM_window_get_active_screen().

Referenced by blender::ed::sculpt_paint::face_set::edit_modify_coordinates(), end_transform(), blender::ed::sculpt_paint::expand::finish(), flush_update_done(), blender::ed::sculpt_paint::project::gesture_end(), blender::ed::sculpt_paint::mask::mask_by_color(), blender::ed::sculpt_paint::mask::mask_from_boundary_exec(), blender::ed::sculpt_paint::mask::mask_from_cavity_exec(), blender::ed::sculpt_paint::expand::restore_original_state(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_modal(), blender::ed::sculpt_paint::color::sculpt_color_filter_end(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_end(), and stroke_done().

◆ flush_update_step()

◆ gather_bmesh_normals()

◆ gather_bmesh_positions() [1/2]

void blender::ed::sculpt_paint::gather_bmesh_positions ( const Set< BMVert *, 0 > & verts,
MutableSpan< float3 > positions )

Definition at line 6367 of file sculpt.cc.

References BLI_assert, gather_bmesh_positions(), i, blender::MutableSpan< T >::size(), and verts.

Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_bmesh(), blender::ed::sculpt_paint::project::apply_projection_bmesh(), calc_area_normal_and_center_node_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), elastic_transform_node_bmesh(), gather_bmesh_positions(), gather_bmesh_positions(), and blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh().

◆ gather_bmesh_positions() [2/2]

MutableSpan< float3 > blender::ed::sculpt_paint::gather_bmesh_positions ( const Set< BMVert *, 0 > & verts,
Vector< float3 > & positions )
inline

◆ gather_data_bmesh() [1/2]

template<typename T>
MutableSpan< T > blender::ed::sculpt_paint::gather_data_bmesh ( const Span< T > src,
const Set< BMVert *, 0 > & verts,
Vector< T > & dst )

◆ gather_data_bmesh() [2/2]

◆ gather_data_bmesh< float >()

template void blender::ed::sculpt_paint::gather_data_bmesh< float > ( Span< float > ,
const Set< BMVert *, 0 > & ,
MutableSpan< float >  )

References gather_data_bmesh().

◆ gather_data_bmesh< float3 >()

template void blender::ed::sculpt_paint::gather_data_bmesh< float3 > ( Span< float3 > ,
const Set< BMVert *, 0 > & ,
MutableSpan< float3 >  )

References gather_data_bmesh().

◆ gather_data_bmesh< int >()

template void blender::ed::sculpt_paint::gather_data_bmesh< int > ( Span< int > ,
const Set< BMVert *, 0 > & ,
MutableSpan< int >  )

References gather_data_bmesh().

◆ gather_data_grids() [1/2]

template<typename T>
MutableSpan< T > blender::ed::sculpt_paint::gather_data_grids ( const SubdivCCG & subdiv_ccg,
const Span< T > src,
const Span< int > grids,
Vector< T > & dst )

◆ gather_data_grids() [2/2]

template<typename T>
void blender::ed::sculpt_paint::gather_data_grids ( const SubdivCCG & subdiv_ccg,
Span< T > src,
Span< int > grids,
MutableSpan< T > node_data )

Definition at line 6405 of file sculpt.cc.

References BKE_subdiv_ccg_key_top_level(), BLI_assert, blender::MutableSpan< T >::copy_from(), gather_data_grids(), CCGKey::grid_area, blender::bke::ccg::grid_range(), i, blender::Span< T >::index_range(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().

Referenced by blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::mask::decrease_contrast_mask_grids(), gather_data_grids(), gather_data_grids(), gather_data_grids< float >(), gather_data_grids< float3 >(), gather_data_grids< int >(), gather_grids_normals(), gather_grids_positions(), blender::ed::sculpt_paint::mask::gather_mask_grids(), blender::ed::sculpt_paint::mask::increase_contrast_mask_grids(), blender::ed::sculpt_paint::mask::sharpen_mask_grids(), blender::ed::sculpt_paint::mask::smooth_mask_grids(), blender::ed::sculpt_paint::undo::store_mask_grids(), and blender::ed::sculpt_paint::undo::store_positions_grids().

◆ gather_data_grids< float >()

template void blender::ed::sculpt_paint::gather_data_grids< float > ( const SubdivCCG & ,
Span< float > ,
Span< int > ,
MutableSpan< float >  )

References gather_data_grids().

◆ gather_data_grids< float3 >()

◆ gather_data_grids< int >()

template void blender::ed::sculpt_paint::gather_data_grids< int > ( const SubdivCCG & ,
Span< int > ,
Span< int > ,
MutableSpan< int >  )

References gather_data_grids().

◆ gather_data_mesh() [1/2]

template<typename T>
MutableSpan< T > blender::ed::sculpt_paint::gather_data_mesh ( const Span< T > src,
const Span< int > indices,
Vector< T > & dst )

◆ gather_data_mesh() [2/2]

template<typename T>
void blender::ed::sculpt_paint::gather_data_mesh ( Span< T > src,
Span< int > indices,
MutableSpan< T > dst )

Gather data from an array aligned with all geometry vertices.

Definition at line 6395 of file sculpt.cc.

References BLI_assert, gather_data_mesh(), i, indices, and blender::MutableSpan< T >::size().

Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_mesh(), blender::ed::sculpt_paint::mask::apply_mask_mesh(), blender::ed::sculpt_paint::project::apply_projection_mesh(), blender::ed::sculpt_paint::cloth::apply_scale_filter(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::brushes::calc_faces(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), blender::ed::sculpt_paint::mask::decrease_contrast_mask_mesh(), blender::ed::sculpt_paint::color::do_paint_brush_task(), elastic_transform_node_mesh(), blender::ed::sculpt_paint::face_set::face_hide_update(), blender::ed::sculpt_paint::face_set::face_sets_update(), blender::ed::sculpt_paint::hide::flush_face_changes_node(), gather_data_mesh(), gather_data_mesh(), gather_data_mesh< bool >(), gather_data_mesh< float >(), gather_data_mesh< float3 >(), gather_data_mesh< float4 >(), gather_data_mesh< int >(), blender::ed::sculpt_paint::mask::increase_contrast_mask_mesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_mesh(), blender::ed::sculpt_paint::mask::sharpen_mask_mesh(), blender::ed::sculpt_paint::mask::smooth_mask_mesh(), blender::ed::sculpt_paint::cloth::solve_verts_simulation(), blender::ed::sculpt_paint::undo::store_face_sets(), blender::ed::sculpt_paint::undo::store_mask_mesh(), blender::ed::sculpt_paint::undo::store_positions_mesh(), blender::ed::sculpt_paint::mask::update_mask_mesh(), and blender::ed::sculpt_paint::hide::vert_hide_update().

◆ gather_data_mesh< bool >()

template void blender::ed::sculpt_paint::gather_data_mesh< bool > ( Span< bool > ,
Span< int > ,
MutableSpan< bool >  )

References gather_data_mesh().

◆ gather_data_mesh< float >()

◆ gather_data_mesh< float3 >()

◆ gather_data_mesh< float4 >()

◆ gather_data_mesh< int >()

template void blender::ed::sculpt_paint::gather_data_mesh< int > ( Span< int > ,
Span< int > ,
MutableSpan< int >  )

References gather_data_mesh().

◆ gather_grids_normals()

void blender::ed::sculpt_paint::gather_grids_normals ( const SubdivCCG & subdiv_ccg,
Span< int > grids,
MutableSpan< float3 > normals )

◆ gather_grids_positions()

MutableSpan< float3 > blender::ed::sculpt_paint::gather_grids_positions ( const SubdivCCG & subdiv_ccg,
const Span< int > grids,
Vector< float3 > & positions )
inline

Fill the output array with all positions in the geometry referenced by the indices.

Definition at line 132 of file mesh_brush_common.hh.

References BKE_subdiv_ccg_key_top_level(), gather_data_grids(), CCGKey::grid_area, SubdivCCG::positions, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and blender::Span< T >::size().

Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_grids(), blender::ed::sculpt_paint::project::apply_projection_grids(), calc_area_normal_and_center_node_grids(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), elastic_transform_node_grids(), and blender::ed::sculpt_paint::brushes::sample_node_surface_grids().

◆ gather_nodes()

◆ geometry_preview_lines_update()

◆ get_asset_library_reference()

std::optional< AssetLibraryReference > blender::ed::sculpt_paint::get_asset_library_reference ( const bContext & C,
const Paint & paint,
const Brush & brush )
static

◆ get_current_drawing_or_duplicate_for_autokey()

bke::greasepencil::Drawing * blender::ed::sculpt_paint::get_current_drawing_or_duplicate_for_autokey ( const Scene & scene,
GreasePencil & grease_pencil,
const int layer_index )
static

◆ get_fill_boundary_layers()

◆ get_stroke_operation()

std::unique_ptr< GreasePencilStrokeOperation > blender::ed::sculpt_paint::get_stroke_operation ( bContext & C,
wmOperator * op )
static

Definition at line 92 of file grease_pencil_draw_ops.cc.

References BKE_paint_brush_for_read(), BKE_paint_get_active_from_context(), BKE_paintmode_get_active_from_context(), BLI_assert_unreachable, BRUSH_STROKE_ERASE, BRUSH_STROKE_SMOOTH, C, GPAINT_BRUSH_TYPE_DRAW, GPAINT_BRUSH_TYPE_ERASE, GPAINT_BRUSH_TYPE_FILL, GPAINT_BRUSH_TYPE_TINT, GPencil, Brush::gpencil_brush_type, Brush::gpencil_sculpt_brush_type, Brush::gpencil_vertex_brush_type, Brush::gpencil_weight_brush_type, GPSCULPT_BRUSH_TYPE_CLONE, GPSCULPT_BRUSH_TYPE_GRAB, GPSCULPT_BRUSH_TYPE_PINCH, GPSCULPT_BRUSH_TYPE_PUSH, GPSCULPT_BRUSH_TYPE_RANDOMIZE, GPSCULPT_BRUSH_TYPE_SMOOTH, GPSCULPT_BRUSH_TYPE_STRENGTH, GPSCULPT_BRUSH_TYPE_THICKNESS, GPSCULPT_BRUSH_TYPE_TWIST, GPVERTEX_BRUSH_TYPE_AVERAGE, GPVERTEX_BRUSH_TYPE_BLUR, GPVERTEX_BRUSH_TYPE_DRAW, GPVERTEX_BRUSH_TYPE_REPLACE, GPVERTEX_BRUSH_TYPE_SMEAR, GPVERTEX_BRUSH_TYPE_TINT, GPWEIGHT_BRUSH_TYPE_AVERAGE, GPWEIGHT_BRUSH_TYPE_BLUR, GPWEIGHT_BRUSH_TYPE_DRAW, GPWEIGHT_BRUSH_TYPE_SMEAR, blender::ed::sculpt_paint::greasepencil::new_clone_operation(), blender::ed::sculpt_paint::greasepencil::new_erase_operation(), blender::ed::sculpt_paint::greasepencil::new_grab_operation(), blender::ed::sculpt_paint::greasepencil::new_paint_operation(), blender::ed::sculpt_paint::greasepencil::new_pinch_operation(), blender::ed::sculpt_paint::greasepencil::new_push_operation(), blender::ed::sculpt_paint::greasepencil::new_randomize_operation(), blender::ed::sculpt_paint::greasepencil::new_smooth_operation(), blender::ed::sculpt_paint::greasepencil::new_strength_operation(), blender::ed::sculpt_paint::greasepencil::new_thickness_operation(), blender::ed::sculpt_paint::greasepencil::new_tint_operation(), blender::ed::sculpt_paint::greasepencil::new_twist_operation(), blender::ed::sculpt_paint::greasepencil::new_vertex_average_operation(), blender::ed::sculpt_paint::greasepencil::new_vertex_blur_operation(), blender::ed::sculpt_paint::greasepencil::new_vertex_paint_operation(), blender::ed::sculpt_paint::greasepencil::new_vertex_replace_operation(), blender::ed::sculpt_paint::greasepencil::new_vertex_smear_operation(), blender::ed::sculpt_paint::greasepencil::new_weight_paint_average_operation(), blender::ed::sculpt_paint::greasepencil::new_weight_paint_blur_operation(), blender::ed::sculpt_paint::greasepencil::new_weight_paint_draw_operation(), blender::ed::sculpt_paint::greasepencil::new_weight_paint_smear_operation(), wmOperator::ptr, RNA_enum_get(), SculptGPencil, VertexGPencil, and WeightGPencil.

Referenced by stroke_update_step().

◆ get_symmetry_brush_transforms()

Vector< float4x4 > blender::ed::sculpt_paint::get_symmetry_brush_transforms ( const eCurvesSymmetryType symmetry)

Definition at line 321 of file curves_sculpt_brush.cc.

References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), CURVES_SYMMETRY_X, CURVES_SYMMETRY_Y, CURVES_SYMMETRY_Z, blender::MatBase< float, 4, 4 >::identity(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), 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().

◆ get_vertex_group_sharing_info()

const ImplicitSharingInfo * blender::ed::sculpt_paint::get_vertex_group_sharing_info ( const Mesh & mesh)
static

◆ grease_pencil_apply_fill()

bool blender::ed::sculpt_paint::grease_pencil_apply_fill ( bContext & C,
wmOperator & op,
const wmEvent & event )
static

Definition at line 1352 of file grease_pencil_draw_ops.cc.

References blender::IndexRange::after(), blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), BKE_brush_tag_unsaved_changes(), BKE_paint_brush(), BKE_reportf(), BLI_rcti_isect_pt_v(), C, blender::ed::greasepencil::calculate_texture_space(), blender::bke::AttributeAccessor::contains(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_data_tool_settings(), CTX_wm_region(), CTX_wm_window(), blender::bke::Curve, blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), wmOperator::customdata, ED_view3d_viewcontext_init(), ensure_editable_drawings(), BrushGpencilSettings::fill_extend_fac, BrushGpencilSettings::fill_layer_mode, BrushGpencilSettings::fill_simplylvl, BrushGpencilSettings::fill_threshold, blender::bke::SpanAttributeWriter< T >::finish(), blender::ed::greasepencil::FitToView, BrushGpencilSettings::flag, blender::bke::GeometrySet::from_curves(), blender::VArray< T >::from_single(), Curves::geometry, blender::bke::GeometrySet::get_curves_for_write(), get_fill_boundary_layers(), GP_BRUSH_FILL_AUTO_REMOVE_FILL_GUIDES, GP_BRUSH_FILL_HIDE, ToolSettings::gp_paint, GP_TOOL_FLAG_PAINT_ONBACK, ToolSettings::gpencil_flags, Brush::gpencil_settings, grease_pencil_fill_get_extension_data(), blender::bke::GeometrySet::has_curves(), blender::bke::CurvesGeometry::is_empty(), blender::geometry::join_geometries(), blender::bke::greasepencil::LEGACY_RADIUS_CONVERSION_FACTOR, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), wmEvent::mval, GpPaint::paint, blender::ed::greasepencil::remove_fill_guides(), wmOperator::reports, RPT_ERROR, simplify_fixed(), smooth_fill_strokes(), blender::bke::CurvesGeometry::tag_topology_changed(), ViewContext::v3d, ARegion::winrct, WM_cursor_modal_restore(), and wmEvent::xy.

Referenced by grease_pencil_fill_event_modal_map(), and grease_pencil_fill_modal().

◆ grease_pencil_brush_cursor_draw()

void blender::ed::sculpt_paint::grease_pencil_brush_cursor_draw ( PaintCursorContext & pcontext)
static

Definition at line 1563 of file paint_cursor.cc.

References BKE_brush_color_get(), BKE_brush_radius_get(), BKE_grease_pencil_object_material_from_brush_get(), BLI_rcti_isect_pt(), blender::ed::sculpt_paint::PaintCursorContext::brush, BRUSH_LOCK_SIZE, BRUSH_SMOOTH_STROKE, blender::ed::sculpt_paint::greasepencil::brush_using_vertex_color(), blender::ed::sculpt_paint::PaintCursorContext::C, Brush::color, CTX_data_active_object(), ELEM, Brush::flag, ToolSettings::gp_paint, GPAINT_BRUSH_TYPE_DRAW, GPAINT_BRUSH_TYPE_ERASE, GPAINT_BRUSH_TYPE_FILL, GPAINT_BRUSH_TYPE_TINT, GPencil, Brush::gpencil_brush_type, Brush::gpencil_settings, GPPAINT_MODE_BOTH, GPPAINT_MODE_STROKE, GPU_line_width(), grease_pencil_eraser_draw(), IMB_colormanagement_scene_linear_to_srgb_v3(), imm_draw_circle_wire_2d(), immUniformColor4f(), blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::mval, OB_GREASE_PENCIL, blender::ed::sculpt_paint::PaintCursorContext::paint, blender::ed::sculpt_paint::PaintCursorContext::pixel_radius, blender::ed::sculpt_paint::PaintCursorContext::pos, pos, blender::ed::greasepencil::DrawingPlacement::project(), project_brush_radius_grease_pencil(), blender::ed::sculpt_paint::PaintCursorContext::region, GreasePencil::runtime, blender::ed::sculpt_paint::PaintCursorContext::scene, Brush::size, MaterialGPencilStyle::stroke_rgba, blender::ed::greasepencil::DrawingPlacement::to_world_space(), Scene::toolsettings, blender::math::transform_point(), Brush::unprojected_size, ViewContext::v3d, blender::ed::sculpt_paint::PaintCursorContext::vc, BrushGpencilSettings::vertex_mode, VertexGPencil, ARegion::winrct, rcti::xmin, blender::VecBase< T, Size >::xyz(), and rcti::ymin.

Referenced by paint_draw_2D_view_brush_cursor().

◆ grease_pencil_brush_stroke_cancel()

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

◆ grease_pencil_brush_stroke_invoke()

◆ grease_pencil_brush_stroke_modal()

wmOperatorStatus blender::ed::sculpt_paint::grease_pencil_brush_stroke_modal ( bContext * C,
wmOperator * op,
const wmEvent * event )
static

Definition at line 298 of file grease_pencil_draw_ops.cc.

References C, wmOperator::customdata, and paint_stroke_modal().

Referenced by GREASE_PENCIL_OT_brush_stroke().

◆ grease_pencil_brush_stroke_poll()

bool blender::ed::sculpt_paint::grease_pencil_brush_stroke_poll ( bContext * C)
static

◆ grease_pencil_erase_box_exec()

◆ grease_pencil_erase_lasso_exec()

◆ grease_pencil_eraser_draw()

◆ grease_pencil_fill_cancel()

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

Definition at line 1767 of file grease_pencil_draw_ops.cc.

References C, and grease_pencil_fill_exit().

Referenced by GREASE_PENCIL_OT_fill().

◆ grease_pencil_fill_event_modal_map()

◆ grease_pencil_fill_exit()

◆ grease_pencil_fill_extension_cut()

void blender::ed::sculpt_paint::grease_pencil_fill_extension_cut ( const bContext & C,
ed::greasepencil::ExtensionData & extension_data,
Span< int > origin_drawings,
Span< int > origin_points )
static

◆ grease_pencil_fill_extension_lines_from_circles()

◆ grease_pencil_fill_get_extension_data()

ed::greasepencil::ExtensionData blender::ed::sculpt_paint::grease_pencil_fill_get_extension_data ( const bContext & C,
const GreasePencilFillOpData & op_data )
static

◆ grease_pencil_fill_init()

◆ grease_pencil_fill_invoke()

◆ grease_pencil_fill_modal()

◆ grease_pencil_fill_overlay_cb()

◆ grease_pencil_fill_status_indicators()

◆ grease_pencil_fill_update_overlay()

◆ GREASE_PENCIL_OT_brush_stroke()

◆ GREASE_PENCIL_OT_erase_box()

◆ GREASE_PENCIL_OT_erase_lasso()

◆ GREASE_PENCIL_OT_fill()

◆ GREASE_PENCIL_OT_sculpt_paint()

◆ GREASE_PENCIL_OT_vertex_brush_stroke()

◆ GREASE_PENCIL_OT_weight_brush_stroke()

◆ grease_pencil_sculpt_paint_cancel()

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

◆ grease_pencil_sculpt_paint_invoke()

◆ grease_pencil_sculpt_paint_modal()

wmOperatorStatus blender::ed::sculpt_paint::grease_pencil_sculpt_paint_modal ( bContext * C,
wmOperator * op,
const wmEvent * event )
static

Definition at line 404 of file grease_pencil_draw_ops.cc.

References C, wmOperator::customdata, and paint_stroke_modal().

Referenced by GREASE_PENCIL_OT_sculpt_paint().

◆ grease_pencil_sculpt_paint_poll()

bool blender::ed::sculpt_paint::grease_pencil_sculpt_paint_poll ( bContext * C)
static

◆ grease_pencil_update_extend()

void blender::ed::sculpt_paint::grease_pencil_update_extend ( bContext & C,
GreasePencilFillOpData & op_data )
static

◆ grease_pencil_vertex_brush_stroke_cancel()

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

◆ grease_pencil_vertex_brush_stroke_invoke()

◆ grease_pencil_vertex_brush_stroke_modal()

wmOperatorStatus blender::ed::sculpt_paint::grease_pencil_vertex_brush_stroke_modal ( bContext * C,
wmOperator * op,
const wmEvent * event )
static

◆ grease_pencil_vertex_brush_stroke_poll()

bool blender::ed::sculpt_paint::grease_pencil_vertex_brush_stroke_poll ( bContext * C)
static

◆ grease_pencil_weight_brush_stroke_cancel()

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

◆ grease_pencil_weight_brush_stroke_invoke()

◆ grease_pencil_weight_brush_stroke_modal()

wmOperatorStatus blender::ed::sculpt_paint::grease_pencil_weight_brush_stroke_modal ( bContext * C,
wmOperator * op,
const wmEvent * event )
static

◆ grease_pencil_weight_brush_stroke_poll()

bool blender::ed::sculpt_paint::grease_pencil_weight_brush_stroke_poll ( bContext * C)
static

◆ image_paint_brush_type_raycast_original()

bool blender::ed::sculpt_paint::image_paint_brush_type_raycast_original ( const Brush & brush,
PaintMode  )
static

Definition at line 274 of file paint_stroke.cc.

References BRUSH_ANCHORED, BRUSH_DRAG_DOT, and Brush::flag.

Referenced by paint_stroke_new().

◆ image_paint_brush_type_require_inbetween_mouse_events()

bool blender::ed::sculpt_paint::image_paint_brush_type_require_inbetween_mouse_events ( const Brush & brush,
const PaintMode mode )
static

◆ image_paint_brush_type_require_location()

◆ init_sculpt_mode_session()

◆ init_transform()

◆ is_curve_mask_size_valid()

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

◆ is_point_inside_bounds()

bool blender::ed::sculpt_paint::is_point_inside_bounds ( const Bounds< int2 > bounds,
const int2 point )
inlinestatic

Definition at line 1843 of file grease_pencil_draw_ops.cc.

◆ is_point_inside_lasso()

bool blender::ed::sculpt_paint::is_point_inside_lasso ( const Array< int2 > lasso,
const int2 point )
inlinestatic

◆ is_sampled_curve_valid()

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

◆ is_symmetry_iteration_valid()

bool blender::ed::sculpt_paint::is_symmetry_iteration_valid ( const char i,
const char symm )
inline

◆ keymap_sculpt()

void blender::ed::sculpt_paint::keymap_sculpt ( wmKeyConfig * keyconf)

Definition at line 1584 of file sculpt_ops.cc.

References blender::ed::sculpt_paint::filter::modal_keymap().

Referenced by ED_spacetypes_keymap().

◆ library_is_editable()

bool blender::ed::sculpt_paint::library_is_editable ( const AssetLibraryReference & library)
static

◆ load_tex()

◆ load_tex_cursor()

◆ load_tex_cursor_task_cb()

void blender::ed::sculpt_paint::load_tex_cursor_task_cb ( void *__restrict userdata,
const int j,
const TaskParallelTLS * __restrict )
static

Definition at line 390 of file paint_cursor.cc.

References BKE_brush_curve_strength_clamped(), data, float, i, len, size(), sqrtf, x, and y.

Referenced by load_tex_cursor().

◆ load_tex_task_cb_ex()

◆ make_tex_snap()

void blender::ed::sculpt_paint::make_tex_snap ( TexSnapshot * snap,
ViewContext * vc,
float zoom )
static

Definition at line 143 of file paint_cursor.cc.

References ViewContext::region, snap(), ARegion::winx, and ARegion::winy.

Referenced by load_tex().

◆ mask_border_weight_calc()

BLI_NOINLINE void blender::ed::sculpt_paint::mask_border_weight_calc ( const Span< float > masks,
const MutableSpan< float > factors )
static

◆ move_last_point_and_resample()

void blender::ed::sculpt_paint::move_last_point_and_resample ( MoveAndResampleBuffers & buffer,
MutableSpan< float3 > positions,
const float3 & new_last_position )

◆ nearest_vert_calc_bmesh()

◆ nearest_vert_calc_grids()

◆ nearest_vert_calc_mesh()

◆ need_delta_for_tip_orientation()

◆ need_delta_from_anchored_origin()

◆ new_add_operation()

std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_add_operation ( )

Definition at line 518 of file curves_sculpt_add.cc.

References new_add_operation().

Referenced by new_add_operation(), and start_brush_operation().

◆ new_comb_operation()

std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_comb_operation ( )

Definition at line 403 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 271 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 )

◆ new_grow_shrink_operation()

◆ 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 347 of file curves_sculpt_puff.cc.

Referenced by start_brush_operation().

◆ new_selection_paint_operation()

◆ new_slide_operation()

std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_slide_operation ( )

Definition at line 481 of file curves_sculpt_slide.cc.

References new_slide_operation().

Referenced by new_slide_operation(), and start_brush_operation().

◆ new_smooth_operation()

std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_smooth_operation ( )

Definition at line 258 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 300 of file curves_sculpt_snake_hook.cc.

Referenced by start_brush_operation().

◆ no_multires_poll()

bool blender::ed::sculpt_paint::no_multires_poll ( bContext * C)
static

◆ node_fully_masked_or_hidden()

◆ node_in_cylinder()

bool blender::ed::sculpt_paint::node_in_cylinder ( const DistRayAABB_Precalc & ray_dist_precalc,
const bke::pbvh::Node & node,
const float radius_sq,
const bool original )

◆ node_in_sphere()

◆ object_active_color_fill()

bool blender::ed::sculpt_paint::object_active_color_fill ( Object & ob,
const float fill_color[4],
bool only_selected )

Fills the object's active color attribute layer with the fill color.

Parameters
only_selectedLimit the fill to selected faces or vertices.
Returns
true if successful.

Definition at line 2338 of file paint_vertex.cc.

References fill_active_color().

Referenced by blender::ed::geometry::geometry_color_attribute_add_exec(), and proj_paint_color_attribute_create().

◆ object_sculpt_mode_enter() [1/2]

void blender::ed::sculpt_paint::object_sculpt_mode_enter ( bContext * C,
Depsgraph & depsgraph,
ReportList * reports )

◆ object_sculpt_mode_enter() [2/2]

◆ object_sculpt_mode_exit() [1/2]

void blender::ed::sculpt_paint::object_sculpt_mode_exit ( bContext * C,
Depsgraph & depsgraph )

◆ object_sculpt_mode_exit() [2/2]

◆ object_space_radius_get()

◆ operatortypes_sculpt()

void blender::ed::sculpt_paint::operatortypes_sculpt ( )

Definition at line 1544 of file sculpt_ops.cc.

References SCULPT_OT_brush_stroke(), blender::ed::sculpt_paint::cloth::SCULPT_OT_cloth_filter(), blender::ed::sculpt_paint::color::SCULPT_OT_color_filter(), blender::ed::sculpt_paint::dyntopo::SCULPT_OT_detail_flood_fill(), blender::ed::sculpt_paint::dyntopo::SCULPT_OT_dynamic_topology_toggle(), blender::ed::sculpt_paint::dyntopo::SCULPT_OT_dyntopo_detail_size_edit(), blender::ed::sculpt_paint::expand::SCULPT_OT_expand(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_box_gesture(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_change_visibility(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_lasso_gesture(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_line_gesture(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_polyline_gesture(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_create(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_edit(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_init(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_randomize_colors(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_by_color(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_filter(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_from_boundary(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_from_cavity(), blender::ed::sculpt_paint::mask::SCULPT_OT_mask_init(), blender::ed::sculpt_paint::filter::SCULPT_OT_mesh_filter(), SCULPT_OT_optimize(), blender::ed::sculpt_paint::project::SCULPT_OT_project_line_gesture(), SCULPT_OT_sample_color(), blender::ed::sculpt_paint::dyntopo::SCULPT_OT_sample_detail_size(), SCULPT_OT_sculptmode_toggle(), SCULPT_OT_set_persistent_base(), SCULPT_OT_set_pivot_position(), SCULPT_OT_symmetrize(), blender::ed::sculpt_paint::trim::SCULPT_OT_trim_box_gesture(), blender::ed::sculpt_paint::trim::SCULPT_OT_trim_lasso_gesture(), blender::ed::sculpt_paint::trim::SCULPT_OT_trim_line_gesture(), blender::ed::sculpt_paint::trim::SCULPT_OT_trim_polyline_gesture(), and WM_operatortype_append().

Referenced by ED_spacetypes_init().

◆ optimize_exec()

◆ orig_color_data_get_mesh()

Span< float4 > blender::ed::sculpt_paint::orig_color_data_get_mesh ( const Object & object,
const bke::pbvh::MeshNode & node )
inline

◆ orig_color_data_lookup_mesh()

std::optional< Span< float4 > > blender::ed::sculpt_paint::orig_color_data_lookup_mesh ( const Object & object,
const bke::pbvh::MeshNode & node )

◆ orig_face_set_data_lookup_grids()

◆ orig_face_set_data_lookup_mesh()

◆ orig_mask_data_lookup_grids()

◆ orig_mask_data_lookup_mesh()

◆ orig_position_data_gather_bmesh()

◆ orig_position_data_get_grids()

◆ orig_position_data_get_mesh()

◆ orig_position_data_lookup_grids()

◆ orig_position_data_lookup_mesh()

◆ orig_position_data_lookup_mesh_all_verts()

std::optional< OrigPositionData > blender::ed::sculpt_paint::orig_position_data_lookup_mesh_all_verts ( const Object & object,
const bke::pbvh::MeshNode & node )

Retrieve positions from the latest undo state. This is often used for modal actions that depend on the initial state of the geometry from before the start of the action.

Definition at line 2457 of file sculpt_undo.cc.

References blender::ed::sculpt_paint::undo::get_node(), blender::ed::sculpt_paint::undo::Node::normal, blender::ed::sculpt_paint::undo::Position, and blender::ed::sculpt_paint::undo::Node::position.

Referenced by orig_position_data_lookup_mesh(), sculpt_find_nearest_to_ray_cb(), and sculpt_raycast_cb().

◆ paint_brush_cursor_poll()

bool blender::ed::sculpt_paint::paint_brush_cursor_poll ( bContext * C)

Returns true if the brush cursor should be activated.

Definition at line 1845 of file paint_stroke.cc.

References brush_tool_get(), C, bToolRef_Runtime::cursor, bToolRef::runtime, and WM_CURSOR_DEFAULT.

Referenced by paint_stroke_modal(), and SCULPT_brush_cursor_poll().

◆ paint_brush_stroke_add_step()

void blender::ed::sculpt_paint::paint_brush_stroke_add_step ( bContext * C,
wmOperator * op,
PaintStroke * stroke,
const float2 mval,
float pressure )
static

◆ paint_brush_tool_poll()

bool blender::ed::sculpt_paint::paint_brush_tool_poll ( bContext * C)

Returns true if the active tool uses brushes.

Definition at line 1839 of file paint_stroke.cc.

References brush_tool_get(), and C.

Referenced by paint_cursor_context_init(), paint_cursor_draw_3d_view_brush_cursor_inactive(), and SCULPT_poll().

◆ paint_brush_update()

bool blender::ed::sculpt_paint::paint_brush_update ( bContext * C,
const Brush & brush,
PaintMode mode,
PaintStroke * stroke,
const float mouse_init[2],
float mouse[2],
float pressure,
float r_location[3],
bool * r_location_is_set )

Initialize the stroke cache variants from operator properties.

Definition at line 310 of file paint_stroke.cc.

References blender::bke::PaintRuntime::anchored_initial_mouse, blender::bke::PaintRuntime::anchored_size, atan2f, BKE_brush_radius_get(), BKE_brush_randomize_texture_coords(), BKE_brush_use_size_pressure(), BKE_curvemapping_evaluateF(), BKE_paint_get_active_from_paintmode(), BRUSH_ANCHORED, MTex::brush_angle_mode, BRUSH_CURVE, BRUSH_EDGE_TO_EDGE, MTex::brush_map_mode, blender::bke::PaintRuntime::brush_rotation, blender::bke::PaintRuntime::brush_rotation_sec, C, blender::ed::sculpt_paint::PaintStroke::cached_size_pressure, copy_v2_v2(), CTX_data_scene(), Brush::curve_size, blender::bke::PaintRuntime::draw_anchored, ELEM, Brush::flag, float, blender::RandomNumberGenerator::from_random_seed(), blender::ed::sculpt_paint::PaintStroke::get_location, image_paint_brush_type_require_location(), blender::ed::sculpt_paint::PaintStroke::initial_mouse, blender::bke::PaintRuntime::initial_pixel_radius, blender::ed::sculpt_paint::PaintStroke::input_init, blender::bke::PaintRuntime::last_rake, M_PI, Brush::mask_mtex, blender::bke::PaintRuntime::mask_tex_mouse, Brush::mtex, MTEX_ANGLE_RANDOM, MTEX_MAP_MODE_AREA, MTEX_MAP_MODE_RANDOM, MTEX_MAP_MODE_VIEW, blender::ed::sculpt_paint::PaintStroke::original, paint_calculate_rake_rotation(), paint_supports_dynamic_size(), paint_supports_dynamic_tex_coords(), blender::bke::PaintRuntime::pixel_radius, blender::ed::sculpt_paint::PaintStroke::rake_started, MTex::random_angle, blender::ed::sculpt_paint::PaintStroke::rng, blender::bke::PaintRuntime::size_pressure_value, sqrtf, blender::bke::PaintRuntime::stroke_active, blender::ed::sculpt_paint::PaintStroke::stroke_distance, MTex::tex, blender::bke::PaintRuntime::tex_mouse, zero_v3(), and blender::ed::sculpt_paint::PaintStroke::zoom_2d.

Referenced by paint_brush_stroke_add_step(), blender::ed::sculpt_paint::image::ops::paint::paint_exec(), and paint_stroke_exec().

◆ paint_cursor_check_and_draw_alpha_overlays()

◆ paint_cursor_context_init()

bool blender::ed::sculpt_paint::paint_cursor_context_init ( bContext * C,
const blender::int2 & xy,
const blender::float2 & tilt,
PaintCursorContext & pcontext )
static

Definition at line 1336 of file paint_cursor.cc.

References Brush::add_col, BKE_brush_radius_get(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_paintmode_get_active_from_context(), blender::ed::sculpt_paint::PaintCursorContext::brush, BRUSH_CURVE, BRUSH_DIR_IN, blender::ed::sculpt_paint::PaintCursorContext::C, C, CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_wm_manager(), CTX_wm_region(), CTX_wm_screen(), CTX_wm_window(), Cursor2D, Cursor3D, blender::ed::sculpt_paint::PaintCursorContext::cursor_type, Curve, blender::ed::sculpt_paint::PaintCursorContext::depsgraph, SculptSession::draw_faded_cursor, blender::bke::PaintRuntime::draw_inverted, ED_view3d_viewcontext_init(), blender::ed::sculpt_paint::PaintCursorContext::final_radius, Brush::flag, float, get_imapaint_zoom(), blender::ed::sculpt_paint::PaintCursorContext::is_stroke_active, max_ff(), blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::mval, ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, blender::ed::sculpt_paint::PaintCursorContext::paint, paint_brush_tool_poll(), paint_use_2d_cursor(), blender::ed::sculpt_paint::PaintCursorContext::region, ARegion::regiontype, RGN_TYPE_WINDOW, Paint::runtime, blender::ed::sculpt_paint::PaintCursorContext::scene, blender::ed::sculpt_paint::PaintCursorContext::screen, Object::sculpt, blender::ed::sculpt_paint::PaintCursorContext::ss, blender::bke::PaintRuntime::stroke_active, Brush::sub_col, blender::bke::brush::supports_secondary_cursor_color(), blender::ed::sculpt_paint::PaintCursorContext::tilt, blender::ed::sculpt_paint::PaintCursorContext::translation, Paint::unified_paint_settings, blender::ed::sculpt_paint::PaintCursorContext::ups, blender::ed::sculpt_paint::PaintCursorContext::vc, blender::ed::sculpt_paint::PaintCursorContext::win, blender::ed::sculpt_paint::PaintCursorContext::wm, xy, and blender::ed::sculpt_paint::PaintCursorContext::zoomx.

Referenced by paint_draw_cursor().

◆ paint_cursor_cursor_draw_3d_view_brush_cursor_active()

void blender::ed::sculpt_paint::paint_cursor_cursor_draw_3d_view_brush_cursor_active ( PaintCursorContext & pcontext)
static

Definition at line 2021 of file paint_cursor.cc.

References BLI_assert, blender::ed::sculpt_paint::PaintCursorContext::brush, BRUSH_CLOTH_FORCE_FALLOFF_PLANE, BRUSH_CLOTH_FORCE_FALLOFF_RADIAL, BRUSH_CLOTH_SIMULATION_AREA_LOCAL, blender::ed::sculpt_paint::PaintCursorContext::C, SculptSession::cache, Brush::cloth_force_falloff_type, Brush::cloth_sim_limit, Brush::cloth_simulation_area_type, CTX_wm_view3d(), blender::ed::sculpt_paint::PaintCursorContext::depsgraph, blender::math::distance(), ED_view3d_draw_setup_view(), GPU_matrix_mul, GPU_matrix_pop(), GPU_matrix_pop_projection(), GPU_matrix_push(), GPU_matrix_push_projection(), blender::ed::sculpt_paint::StrokeCache::initial_location, blender::ed::sculpt_paint::StrokeCache::initial_normal, blender::ed::sculpt_paint::StrokeCache::location, blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::brushes::multiplane_scrape_preview_draw(), ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, blender::ed::sculpt_paint::cloth::plane_falloff_preview_draw(), blender::ed::sculpt_paint::PaintCursorContext::pos, blender::ed::sculpt_paint::StrokeCache::radius, blender::ed::sculpt_paint::PaintCursorContext::region, blender::ed::sculpt_paint::PaintCursorContext::scene, Sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_CLOTH, SCULPT_BRUSH_TYPE_GRAB, SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE, sculpt_geometry_preview_lines_draw(), SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), blender::ed::sculpt_paint::cloth::simulation_limits_draw(), blender::ed::sculpt_paint::PaintCursorContext::ss, blender::ed::sculpt_paint::PaintCursorContext::vc, blender::ed::sculpt_paint::PaintCursorContext::win, ARegion::winrct, blender::ed::sculpt_paint::PaintCursorContext::wm, wmViewport(), and wmWindowViewport().

Referenced by paint_cursor_draw_3D_view_brush_cursor().

◆ paint_cursor_draw_3D_view_brush_cursor()

◆ paint_cursor_draw_3d_view_brush_cursor_inactive()

void blender::ed::sculpt_paint::paint_cursor_draw_3d_view_brush_cursor_inactive ( PaintCursorContext & pcontext)
static

Definition at line 1833 of file paint_cursor.cc.

References SculptSession::active_vert(), SculptSession::active_vert_index(), SculptSession::active_vert_position(), blender::ed::sculpt_paint::PaintCursorContext::alpha_overlay_drawn, BKE_sculpt_update_object_for_edit(), BLI_assert, bm, SculptSession::bm, BM_vert_at_index(), blender::bke::pbvh::BMesh, blender::ed::sculpt_paint::PaintCursorContext::brush, BRUSH_CLOTH_SIMULATION_AREA_GLOBAL, BRUSH_GRAB_ACTIVE_VERTEX, blender::ed::sculpt_paint::PaintCursorContext::C, Brush::cloth_simulation_area_type, BMVert::co, CTX_wm_view3d(), cursor_draw_point_screen_space(), cursor_draw_point_with_symmetry(), blender::ed::sculpt_paint::PaintCursorContext::depsgraph, blender::math::distance(), ED_view3d_draw_setup_view(), blender::ed::sculpt_paint::boundary::edges_preview_draw(), SculptSession::expand_cache, Brush::falloff_shape, Brush::flag, geometry_preview_lines_update(), GPU_matrix_mul, GPU_matrix_pop(), GPU_matrix_pop_projection(), GPU_matrix_push(), GPU_matrix_push_projection(), blender::bke::pbvh::Grids, immUniformColor3fvAlpha(), blender::ed::sculpt_paint::expand::Cache::initial_active_vert, blender::ed::sculpt_paint::PaintCursorContext::is_cursor_over_mesh, blender::ed::sculpt_paint::PaintCursorContext::location, blender::bke::pbvh::Mesh, ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, paint_brush_tool_poll(), paint_cursor_draw_main_inactive_cursor(), paint_cursor_drawing_setup_cursor_space(), paint_cursor_pose_brush_origins_draw(), paint_cursor_pose_brush_segments_draw(), paint_cursor_preview_boundary_data_pivot_draw(), paint_cursor_preview_boundary_data_update(), paint_cursor_update_object_space_radius(), paint_draw_3D_view_inactive_brush_cursor(), paint_draw_legacy_3D_view_brush_cursor(), PAINT_FALLOFF_SHAPE_TUBE, blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::boundary::pivot_line_preview_draw(), blender::ed::sculpt_paint::PaintCursorContext::pos, SculptSession::pose_ik_chain_preview, SubdivCCG::positions, blender::ed::sculpt_paint::PaintCursorContext::prev_active_vert_index, blender::ed::sculpt_paint::pose::preview_ik_chain_init(), blender::ed::sculpt_paint::PaintCursorContext::radius, blender::ed::sculpt_paint::PaintCursorContext::region, blender::ed::sculpt_paint::PaintCursorContext::scene, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_BOUNDARY, SCULPT_BRUSH_TYPE_CLOTH, SCULPT_BRUSH_TYPE_GRAB, SCULPT_BRUSH_TYPE_LAYER, SCULPT_BRUSH_TYPE_POSE, sculpt_geometry_preview_lines_draw(), SCULPT_layer_brush_height_preview_draw(), blender::ed::sculpt_paint::PaintCursorContext::sd, blender::ed::sculpt_paint::cloth::simulation_limits_draw(), blender::ed::sculpt_paint::PaintCursorContext::ss, SculptSession::subdiv_ccg, blender::ed::sculpt_paint::PaintCursorContext::vc, blender::bke::pbvh::vert_positions_eval(), vert_positions_for_grab_active_get(), vert_random_access_ensure(), blender::ed::sculpt_paint::PaintCursorContext::win, ARegion::winrct, blender::ed::sculpt_paint::PaintCursorContext::wm, wmViewport(), and wmWindowViewport().

Referenced by paint_cursor_draw_3D_view_brush_cursor().

◆ paint_cursor_draw_main_inactive_cursor()

◆ paint_cursor_drawing_setup_cursor_space()

◆ paint_cursor_is_3d_view_navigating()

bool blender::ed::sculpt_paint::paint_cursor_is_3d_view_navigating ( const PaintCursorContext & pcontext)
static

◆ paint_cursor_is_brush_cursor_enabled()

◆ paint_cursor_pose_brush_origins_draw()

◆ paint_cursor_pose_brush_segments_draw()

◆ paint_cursor_preview_boundary_data_pivot_draw()

◆ paint_cursor_preview_boundary_data_update()

◆ paint_cursor_restore_drawing_state()

void blender::ed::sculpt_paint::paint_cursor_restore_drawing_state ( )
static

Definition at line 2194 of file paint_cursor.cc.

References GPU_blend(), GPU_BLEND_NONE, GPU_line_smooth(), and immUnbindProgram().

Referenced by paint_draw_cursor().

◆ paint_cursor_sculpt_session_update_and_init()

void blender::ed::sculpt_paint::paint_cursor_sculpt_session_update_and_init ( PaintCursorContext & pcontext)
static

Definition at line 1440 of file paint_cursor.cc.

References SculptSession::active_vert_index(), BKE_brush_size_set(), BKE_brush_use_locked_size(), BLI_assert, blender::ed::sculpt_paint::PaintCursorContext::brush, blender::ed::sculpt_paint::PaintCursorContext::C, C, CTX_data_tool_settings(), cursor_geometry_info_update(), blender::ed::sculpt_paint::PaintCursorContext::depsgraph, Brush::falloff_shape, float, blender::ed::sculpt_paint::PaintCursorContext::is_cursor_over_mesh, blender::bke::PaintRuntime::last_hit, blender::bke::PaintRuntime::last_location, blender::ed::sculpt_paint::CursorGeometryInfo::location, blender::ed::sculpt_paint::PaintCursorContext::location, blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::mval, blender::ed::sculpt_paint::CursorGeometryInfo::normal, blender::ed::sculpt_paint::PaintCursorContext::normal, ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::paint, paint_cursor_update_pixel_radius(), paint_cursor_update_unprojected_size(), PAINT_FALLOFF_SHAPE_SPHERE, blender::bke::object::pbvh_ensure(), blender::ed::sculpt_paint::PaintCursorContext::pixel_radius, blender::ed::sculpt_paint::PaintCursorContext::prev_active_vert_index, blender::ed::sculpt_paint::PaintCursorContext::region, Paint::runtime, blender::ed::sculpt_paint::PaintCursorContext::scene_space_location, Sculpt, ToolSettings::sculpt, blender::ed::sculpt_paint::PaintCursorContext::sd, blender::ed::sculpt_paint::PaintCursorContext::ss, blender::bke::PaintRuntime::stroke_active, blender::ed::sculpt_paint::PaintCursorContext::vc, vert_random_access_ensure(), ARegion::winrct, rcti::xmin, and rcti::ymin.

Referenced by paint_cursor_draw_3D_view_brush_cursor().

◆ paint_cursor_setup_2D_drawing()

◆ paint_cursor_setup_3D_drawing()

◆ paint_cursor_update_anchored_location()

◆ paint_cursor_update_object_space_radius()

◆ paint_cursor_update_pixel_radius()

◆ paint_cursor_update_rake_rotation()

◆ paint_cursor_update_unprojected_size()

◆ paint_draw_2D_view_brush_cursor()

void blender::ed::sculpt_paint::paint_draw_2D_view_brush_cursor ( PaintCursorContext & pcontext)
static

◆ paint_draw_2D_view_brush_cursor_default()

◆ paint_draw_3D_view_inactive_brush_cursor()

◆ paint_draw_alpha_overlay()

◆ paint_draw_cursor()

◆ paint_draw_cursor_overlay()

◆ paint_draw_curve_cursor()

◆ paint_draw_legacy_3D_view_brush_cursor()

◆ paint_draw_line_cursor()

◆ paint_draw_smooth_cursor()

◆ paint_draw_tex_overlay()

bool blender::ed::sculpt_paint::paint_draw_tex_overlay ( Paint * paint,
Brush * brush,
ViewContext * vc,
int x,
int y,
float zoom,
const PaintMode mode,
bool col,
bool primary )
static

Definition at line 578 of file paint_cursor.cc.

References blender::bke::PaintRuntime::anchored_initial_mouse, blender::bke::PaintRuntime::anchored_size, BKE_brush_radius_get(), BKE_brush_use_size_pressure(), BLI_rcti_size_x(), BLI_rcti_size_y(), MTex::brush_map_mode, BRUSH_OVERLAY_PRIMARY, BRUSH_OVERLAY_SECONDARY, blender::bke::PaintRuntime::brush_rotation, blender::bke::PaintRuntime::brush_rotation_sec, ViewContext::C, col, copy_v3_v3(), blender::bke::PaintRuntime::draw_anchored, ELEM, GPU_blend(), GPU_BLEND_ALPHA_PREMULT, GPU_color_mask(), GPU_DEPTH_NONE, GPU_depth_test(), GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_rotate_2d(), GPU_matrix_scale_2f(), GPU_matrix_translate_2f(), GPU_matrix_translate_2fv(), GPU_PRIM_TRI_FAN, GPU_SAMPLER_EXTEND_MODE_CLAMP_TO_BORDER, GPU_SAMPLER_EXTEND_MODE_REPEAT, GPU_SAMPLER_FILTERING_LINEAR, GPU_SHADER_3D_IMAGE_COLOR, GPU_texture_unbind(), GPU_vertformat_attr_add(), Brush::image_brush_type, IMAGE_PAINT_BRUSH_TYPE_DRAW, immAttr2f(), immBegin(), immBindBuiltinProgram(), immBindTextureSampler(), immEnd(), immUnbindProgram(), immUniformColor4fv(), immVertex2f(), immVertexFormat(), load_tex(), Brush::mask_mtex, Brush::mask_overlay_alpha, Brush::mask_stencil_dimension, Brush::mask_stencil_pos, Brush::mtex, MTEX_MAP_MODE_STENCIL, MTEX_MAP_MODE_TILED, MTEX_MAP_MODE_VIEW, mul_v4_fl(), Brush::overlay_flags, pos, primary_snap, quad, RAD2DEGF, ViewContext::region, MTex::rot, secondary_snap, blender::bke::PaintRuntime::size_pressure_value, Brush::stencil_dimension, Brush::stencil_pos, blender::bke::PaintRuntime::stroke_active, MTex::tex, texture(), Texture3D, Brush::texture_overlay_alpha, U, ARegion::winrct, WM_toolsystem_active_tool_is_brush(), x, and y.

Referenced by paint_draw_alpha_overlay().

◆ paint_line_strokes_spacing()

◆ paint_smooth_stroke()

◆ paint_space_stroke()

◆ paint_space_stroke_enabled()

bool blender::ed::sculpt_paint::paint_space_stroke_enabled ( const Brush & br,
PaintMode mode )

◆ paint_space_stroke_spacing()

◆ paint_space_stroke_spacing_no_pressure()

float blender::ed::sculpt_paint::paint_space_stroke_spacing_no_pressure ( const bContext * C,
PaintStroke * stroke )
static

Definition at line 737 of file paint_stroke.cc.

References C, and paint_space_stroke_spacing().

Referenced by paint_space_stroke(), and paint_stroke_curve_end().

◆ paint_space_stroke_spacing_variable()

float blender::ed::sculpt_paint::paint_space_stroke_spacing_variable ( bContext * C,
PaintStroke * stroke,
const float pressure,
const float pressure_delta,
const float length )
static

◆ paint_stroke_add_sample()

void blender::ed::sculpt_paint::paint_stroke_add_sample ( PaintStroke * stroke,
const int input_samples,
const float x,
const float y,
const float pressure )
static

◆ paint_stroke_cancel()

◆ paint_stroke_curve_end()

bool blender::ed::sculpt_paint::paint_stroke_curve_end ( bContext * C,
wmOperator * op,
PaintStroke * stroke )
static

◆ paint_stroke_distance_get()

◆ paint_stroke_exec()

◆ paint_stroke_flipped()

bool blender::ed::sculpt_paint::paint_stroke_flipped ( PaintStroke * stroke)

◆ paint_stroke_free()

◆ paint_stroke_integrate_overlap()

float blender::ed::sculpt_paint::paint_stroke_integrate_overlap ( const Brush & br,
const float factor )
static

◆ paint_stroke_inverted()

bool blender::ed::sculpt_paint::paint_stroke_inverted ( PaintStroke * stroke)

◆ paint_stroke_jitter_pos()

◆ paint_stroke_line_constrain()

◆ paint_stroke_line_end()

◆ paint_stroke_modal()

wmOperatorStatus blender::ed::sculpt_paint::paint_stroke_modal ( bContext * C,
wmOperator * op,
const wmEvent * event,
PaintStroke ** stroke_p )

The main modal callback shared by any custom operator that implements a form of painting.

At a high level, this function performs the following steps for interactive stroke types:

  1. Initialization of necessary common PaintStroke values.
  2. Custom paint initialization via StrokeTestStart>
  3. Create an OperatorStrokeElement for a given mouse position by calling StrokeGetLocation to potentially turn screen space coordinates into object space coordinates.
  4. Call StrokeUpdateStep to perform custom paint operation on the most recent OperatorStrokeElement data.
  5. Tag extra redraws if necessary via StrokeRedraw.
  6. Return to step 3 while stroke is ongoing.
  7. Call StrokeDone when finished to perform any cleanup or finalization.

Definition at line 1481 of file paint_stroke.cc.

References BKE_brush_input_samples_get(), BKE_curvemapping_init(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_paintmode_get_active_from_context(), blender::ed::sculpt_paint::PaintStroke::brush, BRUSH_AIRBRUSH, BRUSH_ANCHORED, MTex::brush_angle_mode, BRUSH_DRAG_DOT, BRUSH_LINE, BRUSH_SMOOTH_STROKE, BRUSH_STROKE_NORMAL, BRUSH_STROKE_SMOOTH, C, wmOperatorType::cancel, blender::ed::sculpt_paint::PaintStroke::constrain_line, copy_v2_v2(), CTX_wm_manager(), CTX_wm_region(), CTX_wm_window(), Brush::curve_jitter, Brush::curve_size, Brush::curve_strength, wmEvent::customdata, ED_workspace_status_text(), ELEM, blender::ed::sculpt_paint::PaintStroke::event_type, EVT_MODAL_MAP, EVT_RETKEY, EVT_SPACEKEY, Brush::flag, float, GPencil, image_paint_brush_type_require_inbetween_mouse_events(), INBETWEEN_MOUSEMOVE, ISMOUSE_MOTION, KM_ALT, KM_RELEASE, KM_SHIFT, blender::ed::sculpt_paint::PaintStroke::last_mouse_position, blender::ed::sculpt_paint::PaintStroke::last_pressure, blender::bke::PaintRuntime::last_rake, blender::ed::sculpt_paint::PaintStroke::last_tablet_event_pressure, blender::ed::sculpt_paint::PaintStroke::last_world_space_position, blender::math::length(), Brush::mask_mtex, wmEvent::modifier, blender::ed::sculpt_paint::PaintSample::mouse, Brush::mtex, MTEX_ANGLE_RAKE, wmEvent::mval, NDOF_MOTION, ViewContext::obact, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, blender::ed::sculpt_paint::PaintStroke::original, blender::bke::PaintRuntime::overlap_factor, blender::ed::sculpt_paint::PaintStroke::paint, paint_brush_cursor_poll(), paint_brush_stroke_add_step(), paint_calculate_rake_rotation(), paint_draw_line_cursor(), paint_draw_smooth_cursor(), PAINT_SHOW_BRUSH, paint_smooth_stroke(), paint_space_stroke(), paint_space_stroke_enabled(), paint_stroke_add_sample(), paint_stroke_cancel(), paint_stroke_curve_end(), paint_stroke_integrate_overlap(), paint_stroke_line_constrain(), paint_stroke_line_end(), PAINT_STROKE_MODAL_CANCEL, paint_stroke_sample_average(), paint_stroke_use_scene_spacing(), paint_supports_smooth_stroke(), blender::ed::sculpt_paint::PaintStroke::pen_flip, blender::ed::sculpt_paint::PaintSample::pressure, print_pressure_status_enabled(), wmOperator::ptr, Brush::rate, blender::ed::sculpt_paint::PaintStroke::redraw, RGN_TYPE_ANY, RNA_boolean_set(), SPACE_TYPE_ANY, blender::ed::sculpt_paint::PaintStroke::stroke_cursor, blender::ed::sculpt_paint::PaintStroke::stroke_distance, stroke_done(), stroke_get_location_bvh(), blender::ed::sculpt_paint::PaintStroke::stroke_init, blender::ed::sculpt_paint::PaintStroke::stroke_mode, blender::ed::sculpt_paint::PaintStroke::stroke_over_mesh, blender::ed::sculpt_paint::PaintStroke::stroke_started, blender::ed::sculpt_paint::PaintStroke::test_start, blender::ed::sculpt_paint::PaintStroke::tilt, TIMER, blender::ed::sculpt_paint::PaintStroke::timer, blender::math::transform_point(), wmEvent::type, wmOperator::type, wmEvent::val, blender::ed::sculpt_paint::PaintStroke::vc, WM_event_is_tablet(), WM_event_tablet_data(), WM_event_timer_add(), WM_paint_cursor_activate(), WM_paint_cursor_end(), and WM_paint_cursor_tag_redraw().

Referenced by brush_stroke_modal(), grease_pencil_brush_stroke_modal(), grease_pencil_sculpt_paint_modal(), grease_pencil_vertex_brush_stroke_modal(), grease_pencil_weight_brush_stroke_modal(), blender::ed::sculpt_paint::image::ops::paint::paint_modal(), sculpt_curves_stroke_modal(), vpaint_modal(), and wpaint_modal().

◆ paint_stroke_modal_keymap()

wmKeyMap * blender::ed::sculpt_paint::paint_stroke_modal_keymap ( wmKeyConfig * keyconf)

Called in paint_ops.cc, on each regeneration of key-maps.

Definition at line 1186 of file paint_stroke.cc.

References name, PAINT_STROKE_MODAL_CANCEL, WM_modalkeymap_ensure(), and WM_modalkeymap_find().

Referenced by ED_keymap_paint().

◆ paint_stroke_mode_data()

◆ paint_stroke_new()

PaintStroke * blender::ed::sculpt_paint::paint_stroke_new ( bContext * C,
wmOperator * op,
StrokeGetLocation get_location,
StrokeTestStart test_start,
StrokeUpdateStep update_step,
StrokeRedraw redraw,
StrokeDone done,
int event_type )

Definition at line 914 of file paint_stroke.cc.

References blender::bke::PaintRuntime::average_stroke_accum, blender::bke::PaintRuntime::average_stroke_counter, BKE_brush_radius_get(), BKE_curvemapping_init(), BKE_image_pool_acquire_ibuf(), BKE_image_pool_release_ibuf(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_paint_set_overlay_override(), BKE_paintmode_get_active_from_context(), blender::ed::sculpt_paint::PaintStroke::brush, BRUSH_CURVE, BRUSH_STROKE_INVERT, BRUSH_STROKE_NORMAL, ImBuf::byte_buffer, C, blender::bke::PaintRuntime::colorspace, ImBufByteBuffer::colorspace, CTX_data_ensure_evaluated_depsgraph(), CTX_wm_region_view3d(), Brush::curve_distance_falloff, ImBufFloatBuffer::data, depsgraph, blender::bke::PaintRuntime::do_linear_conversion, blender::ed::sculpt_paint::PaintStroke::done, ED_view3d_viewcontext_init(), blender::ed::sculpt_paint::PaintStroke::event_type, Brush::flag, ImBuf::float_buffer, get_imapaint_zoom(), blender::ed::sculpt_paint::PaintStroke::get_location, Tex::ima, image_paint_brush_type_raycast_original(), Tex::iuser, Brush::mtex, mul_v3_fl(), blender::ed::sculpt_paint::PaintStroke::original, blender::bke::PaintRuntime::overlap_factor, Brush::overlay_flags, blender::ed::sculpt_paint::PaintStroke::paint, PAINT_USE_CAVITY_MASK, wmOperator::ptr, blender::ed::sculpt_paint::PaintStroke::redraw, RegionView3D::rflag, RNA_enum_get(), RNA_enum_set(), RV3D_PAINTING, blender::bke::PaintRuntime::start_pixel_radius, blender::bke::PaintRuntime::stroke_active, blender::ed::sculpt_paint::PaintStroke::stroke_mode, blender::ed::sculpt_paint::PaintStroke::test_start, MTex::tex, TEX_IMAGE, Tex::type, blender::ed::sculpt_paint::PaintStroke::update_step, blender::ed::sculpt_paint::PaintStroke::ups, blender::ed::sculpt_paint::PaintStroke::vc, and blender::ed::sculpt_paint::PaintStroke::zoom_2d.

Referenced by grease_pencil_brush_stroke_invoke(), grease_pencil_sculpt_paint_invoke(), grease_pencil_vertex_brush_stroke_invoke(), grease_pencil_weight_brush_stroke_invoke(), blender::ed::sculpt_paint::image::ops::paint::paint_exec(), blender::ed::sculpt_paint::image::ops::paint::paint_invoke(), sculpt_brush_stroke_exec(), sculpt_brush_stroke_invoke(), sculpt_curves_stroke_invoke(), vpaint_exec(), vpaint_invoke(), wpaint_exec(), and wpaint_invoke().

◆ paint_stroke_overlapped_curve()

float blender::ed::sculpt_paint::paint_stroke_overlapped_curve ( const Brush & br,
const float x,
const float spacing )
static

Definition at line 744 of file paint_stroke.cc.

References BKE_brush_curve_strength(), fabsf, i, max_ff(), sum(), and x.

Referenced by paint_stroke_integrate_overlap().

◆ paint_stroke_sample_average()

◆ paint_stroke_set_mode_data()

void blender::ed::sculpt_paint::paint_stroke_set_mode_data ( PaintStroke * stroke,
std::unique_ptr< PaintModeData > mode_data )

◆ paint_stroke_started()

bool blender::ed::sculpt_paint::paint_stroke_started ( PaintStroke * stroke)

◆ paint_stroke_use_dash()

bool blender::ed::sculpt_paint::paint_stroke_use_dash ( const Brush & brush)
static

Definition at line 505 of file paint_stroke.cc.

References BRUSH_CURVE, BRUSH_LINE, BRUSH_SPACE, and Brush::flag.

Referenced by paint_brush_stroke_add_step().

◆ paint_stroke_use_jitter()

bool blender::ed::sculpt_paint::paint_stroke_use_jitter ( const PaintMode mode,
const Brush & brush,
const bool invert )
static

◆ paint_stroke_use_scene_spacing()

bool blender::ed::sculpt_paint::paint_stroke_use_scene_spacing ( const Brush & brush,
const PaintMode mode )
static

◆ paint_stroke_view_context()

ViewContext * blender::ed::sculpt_paint::paint_stroke_view_context ( PaintStroke * stroke)

◆ paint_supports_dynamic_size()

bool blender::ed::sculpt_paint::paint_supports_dynamic_size ( const Brush & br,
PaintMode mode )

◆ paint_supports_dynamic_tex_coords()

bool blender::ed::sculpt_paint::paint_supports_dynamic_tex_coords ( const Brush & br,
PaintMode mode )

Return true if the brush size can change during paint (normally used for pressure).

Definition at line 1166 of file paint_stroke.cc.

References BRUSH_ANCHORED, Brush::flag, Sculpt, and sculpt_is_grab_tool().

Referenced by paint_brush_update().

◆ paint_supports_smooth_stroke()

◆ paint_supports_texture()

bool blender::ed::sculpt_paint::paint_supports_texture ( PaintMode mode)

Definition at line 1159 of file paint_stroke.cc.

References ELEM, Sculpt, Texture2D, Texture3D, and Vertex.

Referenced by stencil_control_poll().

◆ paint_update_mouse_cursor()

◆ paint_use_2d_cursor()

bool blender::ed::sculpt_paint::paint_use_2d_cursor ( PaintMode mode)
static

◆ pbvh_gather_cursor_update()

◆ pbvh_gather_generic()

◆ pbvh_gather_texpaint()

IndexMask blender::ed::sculpt_paint::pbvh_gather_texpaint ( Object & ob,
const Brush & brush,
const bool use_original,
const float radius_scale,
IndexMaskMemory & memory )
static

Definition at line 2536 of file sculpt.cc.

References pbvh_gather_generic().

Referenced by do_brush_action().

◆ pose_fake_neighbors_free()

void blender::ed::sculpt_paint::pose_fake_neighbors_free ( SculptSession & ss)
static

◆ print_pressure_status_enabled()

bool blender::ed::sculpt_paint::print_pressure_status_enabled ( )
static

Definition at line 907 of file paint_stroke.cc.

References G.

Referenced by paint_stroke_modal(), and stroke_done().

◆ project_brush_radius()

int blender::ed::sculpt_paint::project_brush_radius ( ViewContext * vc,
float radius,
const float location[3] )
static

◆ project_brush_radius_grease_pencil()

int blender::ed::sculpt_paint::project_brush_radius_grease_pencil ( ViewContext * vc,
const float radius,
const float3 world_location,
const float4x4 & to_world )
static

◆ project_translations()

void blender::ed::sculpt_paint::project_translations ( MutableSpan< float3 > translations,
const float3 & plane )

Align the translations with plane normal.

Definition at line 7311 of file sculpt.cc.

References blender::math::dot(), i, blender::MutableSpan< T >::index_range(), blender::math::length_squared(), project_translations(), and blender::math::rcp().

Referenced by project_translations().

◆ push_undo_nodes()

◆ rake_data_update()

void blender::ed::sculpt_paint::rake_data_update ( SculptRakeData * srd,
const float co[3] )
static

◆ raycast_init()

◆ redo_empty_ui()

void blender::ed::sculpt_paint::redo_empty_ui ( bContext * ,
wmOperator *  )
static

Definition at line 5765 of file sculpt.cc.

References redo_empty_ui().

Referenced by redo_empty_ui(), and SCULPT_OT_brush_stroke().

◆ remember_stroke_position()

◆ remove_points_and_split_from_drawings()

bool blender::ed::sculpt_paint::remove_points_and_split_from_drawings ( const Scene & scene,
GreasePencil & grease_pencil,
const Span< ed::greasepencil::MutableDrawingInfo > drawings,
const Span< IndexMask > points_to_remove_per_drawing )
static

◆ replace_attribute()

◆ report_empty_evaluated_surface()

◆ report_empty_original_surface()

◆ report_if_shape_key_is_locked()

bool blender::ed::sculpt_paint::report_if_shape_key_is_locked ( const Object & ob,
ReportList * reports )

Checks if the currently active Sculpt Mode on the object is targeting a locked shape key, and produces an error message if so (unless reports is null).

Returns
true if the shape key was locked.

Definition at line 127 of file sculpt.cc.

References BKE_reportf(), KeyBlock::flag, Object::id, KEYBLOCK_LOCKED_SHAPE, ID::name, RPT_ERROR, Object::sculpt, and SculptSession::shapekey_active.

Referenced by blender::ed::transform::createTransSculpt(), sculpt_brush_stroke_invoke(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_invoke(), and blender::ed::sculpt_paint::filter::sculpt_mesh_filter_start().

◆ report_invalid_uv_map()

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

◆ report_missing_surface()

◆ 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)

◆ reset_translations_to_original()

void blender::ed::sculpt_paint::reset_translations_to_original ( MutableSpan< float3 > translations,
Span< float3 > positions,
Span< float3 > orig_positions )

Cancel out translations already applied over the course of the operation from the new translations. This is used for tools that calculate new positions based on the original positions for the entirety of an operation. Conceptually this is the same as resetting the positions before each step of the operation, but combining that into the same loop should be preferable for performance.

Definition at line 7249 of file sculpt.cc.

References BLI_assert, i, blender::MutableSpan< T >::index_range(), reset_translations_to_original(), blender::MutableSpan< T >::size(), and blender::Span< T >::size().

Referenced by blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), and reset_translations_to_original().

◆ rna_asset_library_reference_itemf()

const EnumPropertyItem * blender::ed::sculpt_paint::rna_asset_library_reference_itemf ( bContext * ,
PointerRNA * ,
PropertyRNA * ,
bool * r_free )
static

◆ same_tex_snap()

int blender::ed::sculpt_paint::same_tex_snap ( TexSnapshot * snap,
MTex * mtex,
ViewContext * vc,
bool col,
float zoom )
static

◆ sample_color_invoke()

◆ 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 172 of file curves_sculpt_brush.cc.

References BKE_object_get_evaluated_mesh(), BLI_bvhtree_ray_cast(), BVHTreeRayHit::co, Object::data, DEG_get_evaluated(), depsgraph, BVHTreeRayHit::dist, dist_to_line_v3(), blender::math::distance(), ED_view3d_win_to_segment_clipped(), find_curves_brush_position(), FLT_MAX, Curves::geometry, blender::bke::crazyspace::get_evaluated_curves_deformation(), BVHTreeRayHit::index, blender::math::invert(), blender::math::normalize(), blender::ed::sculpt_paint::CurvesBrush3D::position_cu, blender::bke::crazyspace::GeometryDeformation::positions, blender::ed::sculpt_paint::CurvesBrush3D::radius_cu, blender::bke::BVHTreeFromMesh::raycast_callback, Curves::surface, blender::math::transform_point(), and blender::bke::BVHTreeFromMesh::tree.

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

◆ sampled_curve_free()

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

◆ scale_factors() [1/2]

void blender::ed::sculpt_paint::scale_factors ( MutableSpan< float > factors,
float strength )

Definition at line 7512 of file sculpt.cc.

References scale_factors().

Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_bmesh(), blender::ed::sculpt_paint::cloth::apply_filter_forces_grids(), blender::ed::sculpt_paint::cloth::apply_filter_forces_mesh(), blender::ed::sculpt_paint::mask::apply_mask_bmesh(), blender::ed::sculpt_paint::mask::apply_mask_grids(), blender::ed::sculpt_paint::mask::apply_mask_mesh(), blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::brushes::calc_faces(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::filter::calc_sphere_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), blender::ed::sculpt_paint::color::color_filter_task(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::paint::image::do_paint_pixels(), blender::ed::sculpt_paint::color::do_smear_brush_task(), elastic_transform_node_bmesh(), elastic_transform_node_grids(), elastic_transform_node_mesh(), scale_factors(), scale_factors(), and blender::ed::sculpt_paint::cloth::solve_verts_simulation().

◆ scale_factors() [2/2]

void blender::ed::sculpt_paint::scale_factors ( MutableSpan< float > factors,
Span< float > strengths )

◆ scale_translations() [1/2]

void blender::ed::sculpt_paint::scale_translations ( MutableSpan< float3 > translations,
float factor )

Definition at line 7502 of file sculpt.cc.

References i, blender::MutableSpan< T >::index_range(), and scale_translations().

◆ scale_translations() [2/2]

void blender::ed::sculpt_paint::scale_translations ( MutableSpan< float3 > translations,
Span< float > factors )

Definition at line 7495 of file sculpt.cc.

References i, blender::MutableSpan< T >::index_range(), and scale_translations().

Referenced by blender::ed::sculpt_paint::cloth::apply_filter_forces_bmesh(), blender::ed::sculpt_paint::cloth::apply_filter_forces_grids(), blender::ed::sculpt_paint::cloth::apply_filter_forces_mesh(), blender::ed::sculpt_paint::project::apply_projection_bmesh(), blender::ed::sculpt_paint::project::apply_projection_grids(), blender::ed::sculpt_paint::project::apply_projection_mesh(), blender::ed::sculpt_paint::cloth::apply_scale_filter(), blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::filter::calc_enhance_details_filter(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::brushes::calc_faces(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::face_set::edit_fairing(), elastic_transform_node_bmesh(), elastic_transform_node_grids(), elastic_transform_node_mesh(), scale_translations(), scale_translations(), blender::ed::sculpt_paint::cloth::solve_verts_simulation(), transform_node_bmesh(), transform_node_grids(), and transform_node_mesh().

◆ scatter_data_bmesh()

◆ scatter_data_bmesh< float >()

template void blender::ed::sculpt_paint::scatter_data_bmesh< float > ( Span< float > ,
const Set< BMVert *, 0 > & ,
MutableSpan< float >  )

References scatter_data_bmesh().

◆ scatter_data_bmesh< float3 >()

◆ scatter_data_grids()

template<typename T>
void blender::ed::sculpt_paint::scatter_data_grids ( const SubdivCCG & subdiv_ccg,
Span< T > node_data,
Span< int > grids,
MutableSpan< T > dst )

◆ scatter_data_grids< float >()

template void blender::ed::sculpt_paint::scatter_data_grids< float > ( const SubdivCCG & ,
Span< float > ,
Span< int > ,
MutableSpan< float >  )

References scatter_data_grids().

◆ scatter_data_grids< float3 >()

◆ scatter_data_mesh()

template<typename T>
void blender::ed::sculpt_paint::scatter_data_mesh ( Span< T > src,
Span< int > indices,
MutableSpan< T > dst )

Scatter data from an array of the node's data to the referenced geometry vertices.

Definition at line 6435 of file sculpt.cc.

References BLI_assert, i, indices, scatter_data_mesh(), and blender::Span< T >::size().

Referenced by blender::ed::sculpt_paint::cloth::apply_grab_brush(), blender::ed::sculpt_paint::mask::apply_mask_mesh(), blender::ed::sculpt_paint::mask::apply_new_mask_mesh(), blender::ed::sculpt_paint::cloth::apply_snake_hook_brush(), blender::ed::sculpt_paint::smooth::blur_geometry_data_array(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::pose::calc_mesh(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), blender::ed::sculpt_paint::mask::decrease_contrast_mask_mesh(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::face_set::face_hide_update(), blender::ed::sculpt_paint::face_set::face_sets_update(), blender::ed::sculpt_paint::hide::flush_face_changes_node(), blender::ed::sculpt_paint::mask::increase_contrast_mask_mesh(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), blender::ed::sculpt_paint::undo::restore_face_set_from_undo_step(), blender::ed::sculpt_paint::undo::restore_mask_from_undo_step(), blender::ed::sculpt_paint::undo::restore_position_from_undo_step(), blender::ed::sculpt_paint::undo::restore_position_mesh(), scatter_data_mesh(), scatter_data_mesh< bool >(), scatter_data_mesh< float >(), scatter_data_mesh< float3 >(), scatter_data_mesh< float4 >(), scatter_data_mesh< int >(), blender::ed::sculpt_paint::mask::update_mask_mesh(), and blender::ed::sculpt_paint::hide::vert_hide_update().

◆ scatter_data_mesh< bool >()

template void blender::ed::sculpt_paint::scatter_data_mesh< bool > ( Span< bool > ,
Span< int > ,
MutableSpan< bool >  )

References scatter_data_mesh().

◆ scatter_data_mesh< float >()

◆ scatter_data_mesh< float3 >()

◆ scatter_data_mesh< float4 >()

◆ scatter_data_mesh< int >()

template void blender::ed::sculpt_paint::scatter_data_mesh< int > ( Span< int > ,
Span< int > ,
MutableSpan< int >  )

References scatter_data_mesh().

◆ sculpt_brush_needs_normal()

◆ sculpt_brush_stroke_cancel()

◆ sculpt_brush_stroke_exec()

◆ sculpt_brush_stroke_invoke()

◆ SCULPT_CURVES_OT_brush_stroke()

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

◆ SCULPT_CURVES_OT_min_distance_edit()

◆ SCULPT_CURVES_OT_select_grow()

◆ SCULPT_CURVES_OT_select_random()

◆ sculpt_curves_stroke_cancel()

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

◆ sculpt_curves_stroke_invoke()

◆ sculpt_curves_stroke_modal()

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

◆ sculpt_find_nearest_to_ray_cb()

◆ sculpt_fix_noise_tear()

void blender::ed::sculpt_paint::sculpt_fix_noise_tear ( const Sculpt & sd,
Object & ob )
static

Noise texture gives different values for the same input coord; this can tear a multi-resolution mesh during sculpting so do a stitch in this case.

Definition at line 3624 of file sculpt.cc.

References SculptSession::active, BKE_brush_mask_texture_get(), BKE_paint_brush_for_read(), SculptSession::multires, multires_stitch_grids(), OB_MODE_SCULPT, Sculpt::paint, Object::sculpt, MTex::tex, TEX_NOISE, and Tex::type.

Referenced by stroke_update_step().

◆ sculpt_geometry_preview_lines_draw()

◆ sculpt_init_mirror_clipping()

◆ sculpt_is_grab_tool()

◆ SCULPT_layer_brush_height_preview_draw()

void blender::ed::sculpt_paint::SCULPT_layer_brush_height_preview_draw ( const uint gpuattr,
const Brush & brush,
const float rds,
const float line_width,
const float3 & outline_col,
const float alpha )
static

◆ sculpt_mode_toggle_exec()

◆ sculpt_needs_connectivity_info()

◆ SCULPT_OT_brush_stroke()

◆ SCULPT_OT_optimize()

void blender::ed::sculpt_paint::SCULPT_OT_optimize ( wmOperatorType * ot)
static

Definition at line 180 of file sculpt_ops.cc.

References optimize_exec(), OPTYPE_REGISTER, ot, and SCULPT_mode_poll().

Referenced by operatortypes_sculpt().

◆ SCULPT_OT_sample_color()

void blender::ed::sculpt_paint::SCULPT_OT_sample_color ( wmOperatorType * ot)
static

◆ SCULPT_OT_sculptmode_toggle()

void blender::ed::sculpt_paint::SCULPT_OT_sculptmode_toggle ( wmOperatorType * ot)
static

◆ SCULPT_OT_set_persistent_base()

void blender::ed::sculpt_paint::SCULPT_OT_set_persistent_base ( wmOperatorType * ot)
static

◆ SCULPT_OT_set_pivot_position()

◆ SCULPT_OT_symmetrize()

void blender::ed::sculpt_paint::SCULPT_OT_symmetrize ( wmOperatorType * ot)
static

◆ sculpt_raycast_cb()

void blender::ed::sculpt_paint::sculpt_raycast_cb ( bke::pbvh::Node & node,
RaycastData & rd,
float * tmin )
static

Definition at line 4486 of file sculpt.cc.

References blender::ed::sculpt_paint::RaycastData::active_face_grid_index, blender::ed::sculpt_paint::RaycastData::active_vertex, BKE_pbvh_node_get_tmin(), BKE_subdiv_ccg_key_top_level(), blender::bke::pbvh::BMesh, blender::ed::sculpt_paint::RaycastData::corner_tris, blender::ed::sculpt_paint::RaycastData::corner_verts, blender::ed::sculpt_paint::RaycastData::depth, blender::ed::sculpt_paint::RaycastData::face_normal, blender::ed::sculpt_paint::RaycastData::faces, blender::bke::pbvh::Node::flag_, blender::bke::pbvh::Node::FullyHidden, blender::bke::pbvh::Grids, blender::ed::sculpt_paint::RaycastData::hide_poly, blender::ed::sculpt_paint::RaycastData::hit, blender::ed::sculpt_paint::RaycastData::is_mid_stroke, blender::ed::sculpt_paint::RaycastData::isect_precalc, blender::bke::pbvh::Mesh, blender::bke::pbvh::node_raycast_bmesh(), blender::bke::pbvh::node_raycast_grids(), blender::bke::pbvh::node_raycast_mesh(), blender::ed::sculpt_paint::RaycastData::object, orig_position_data_lookup_grids(), orig_position_data_lookup_mesh_all_verts(), blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::RaycastData::ray_normal, blender::ed::sculpt_paint::RaycastData::ray_start, sculpt_raycast_cb(), blender::ed::sculpt_paint::RaycastData::subdiv_ccg, SubdivCCGCoord::to_index(), blender::bke::pbvh::Tree::type(), blender::ed::sculpt_paint::RaycastData::use_original, and blender::ed::sculpt_paint::RaycastData::vert_positions.

Referenced by cursor_geometry_info_update(), sculpt_raycast_cb(), stroke_get_location_bvh_ex(), and vertex_is_occluded().

◆ sculpt_transform_all_vertices()

◆ sculpt_update_cache_invariants()

void blender::ed::sculpt_paint::sculpt_update_cache_invariants ( bContext * C,
Sculpt & sd,
SculptSession & ss,
const wmOperator & op,
const float mval[2] )
static

Definition at line 3939 of file sculpt.cc.

References blender::ed::sculpt_paint::StrokeCache::accum, blender::ed::sculpt_paint::StrokeCache::alt_smooth, BKE_brush_color_jitter_get_settings(), BKE_paint_brush(), BKE_paint_brush_for_read(), BLI_dial_init(), blender::ed::sculpt_paint::StrokeCache::brush, BRUSH_ACCUMULATE, BRUSH_ANCHORED, brush_flip(), BRUSH_STROKE_INVERT, BRUSH_STROKE_SMOOTH, C, SculptSession::cache, copy_v2_v2(), CTX_data_active_object(), CTX_data_tool_settings(), SculptSession::cursor_location, SculptSession::cursor_normal, SculptSession::cursor_sampled_normal, wmOperator::customdata, blender::ed::sculpt_paint::StrokeCache::dial, blender::bke::PaintRuntime::draw_inverted, ED_view3d_ob_project_mat_get(), fabsf, blender::ed::sculpt_paint::StrokeCache::first_time, blender::ed::sculpt_paint::StrokeCache::flag, Brush::flag, blender::ed::sculpt_paint::StrokeCache::gravity_direction, Sculpt::gravity_factor, Sculpt::gravity_object, i, blender::ed::sculpt_paint::StrokeCache::initial_direction_flipped, blender::ed::sculpt_paint::StrokeCache::initial_hsv_jitter, blender::ed::sculpt_paint::StrokeCache::initial_location, blender::ed::sculpt_paint::StrokeCache::initial_location_symm, blender::ed::sculpt_paint::StrokeCache::initial_mouse, blender::ed::sculpt_paint::StrokeCache::initial_normal, blender::ed::sculpt_paint::StrokeCache::initial_normal_symm, blender::ed::sculpt_paint::StrokeCache::invert, blender::math::invert(), max_ff(), blender::ed::sculpt_paint::StrokeCache::mirror_modifier_clip, blender::ed::sculpt_paint::StrokeCache::mouse, blender::ed::sculpt_paint::StrokeCache::mouse_event, blender::ed::sculpt_paint::StrokeCache::normal_weight, Brush::normal_weight, blender::math::normalize(), blender::ed::sculpt_paint::StrokeCache::paint, Sculpt::paint, ToolSettings::paint_mode, paint_stroke_view_context(), blender::ed::sculpt_paint::StrokeCache::pen_flip, blender::ed::sculpt_paint::StrokeCache::plane_brush, Brush::plane_trim, blender::ed::sculpt_paint::StrokeCache::plane_trim_squared, blender::ed::sculpt_paint::StrokeCache::projection_mat, wmOperator::ptr, RNA_boolean_get(), RNA_enum_get(), Object::runtime, Paint::runtime, ViewContext::rv3d, blender::ed::sculpt_paint::StrokeCache::scale, Object::scale, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_DRAW_SHARP, SCULPT_BRUSH_TYPE_PAINT, SCULPT_BRUSH_TYPE_ROTATE, sculpt_init_mirror_clipping(), sculpt_update_cache_invariants(), SCULPT_use_image_paint_brush(), seed_hsv_jitter(), smooth_brush_toggle_on(), blender::bke::brush::supports_accumulate(), blender::bke::brush::supports_gravity(), blender::ed::sculpt_paint::StrokeCache::supports_gravity, blender::bke::brush::supports_normal_weight(), blender::bke::PaintRuntime::tex_mouse, blender::math::transform_direction(), blender::ed::sculpt_paint::StrokeCache::vc, blender::ed::sculpt_paint::StrokeCache::view_normal, and RegionView3D::viewinv.

Referenced by sculpt_update_cache_invariants(), and stroke_test_start().

◆ sculpt_update_cache_variants()

void blender::ed::sculpt_paint::sculpt_update_cache_variants ( bContext * C,
Sculpt & sd,
Object & ob,
PointerRNA * ptr )
static

Definition at line 4339 of file sculpt.cc.

References blender::bke::PaintRuntime::anchored_initial_mouse, blender::bke::PaintRuntime::anchored_size, BKE_brush_unprojected_size_set(), BKE_brush_use_locked_size(), BKE_brush_use_size_pressure(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BLI_dial_angle(), BRUSH_ANCHORED, brush_delta_update(), brush_dynamic_size_get(), BRUSH_EDGE_TO_EDGE, blender::bke::PaintRuntime::brush_rotation, blender::ed::sculpt_paint::StrokeCache::bstrength, C, SculptSession::cache, cache_paint_invariants_update(), blender::ed::sculpt_paint::StrokeCache::clay_thumb_brush, copy_v2_v2(), CTX_data_depsgraph_pointer(), depsgraph, blender::ed::sculpt_paint::StrokeCache::dial, blender::bke::PaintRuntime::draw_anchored, blender::ed::sculpt_paint::StrokeCache::dyntopo_pixel_radius, blender::ed::sculpt_paint::StrokeCache::first_time, Brush::flag, blender::ed::sculpt_paint::StrokeCache::initial_mouse, blender::bke::PaintRuntime::initial_pixel_radius, blender::ed::sculpt_paint::StrokeCache::initial_radius, blender::ed::sculpt_paint::cloth::is_cloth_deform_brush(), blender::ed::sculpt_paint::StrokeCache::iteration_count, blender::ed::sculpt_paint::StrokeCache::location, blender::ed::sculpt_paint::StrokeCache::mouse, blender::ed::sculpt_paint::StrokeCache::mouse_event, object_space_radius_get(), Sculpt::paint, paint_calc_object_space_radius(), paint_supports_dynamic_size(), blender::bke::PaintRuntime::pixel_radius, blender::ed::sculpt_paint::StrokeCache::pressure, blender::ed::sculpt_paint::StrokeCache::pressure_stabilizer, ptr, blender::ed::sculpt_paint::StrokeCache::radius, blender::ed::sculpt_paint::StrokeCache::radius_squared, RNA_float_get(), RNA_float_get_array(), Sculpt, Object::sculpt, Brush::sculpt_brush_type, SCULPT_BRUSH_TYPE_CLAY_THUMB, SCULPT_BRUSH_TYPE_ROTATE, SCULPT_BRUSH_TYPE_SNAKE_HOOK, SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), sculpt_update_cache_variants(), blender::ed::sculpt_paint::StrokeCache::special_rotation, blender::ed::sculpt_paint::StrokeCache::stabilizer_index, blender::ed::sculpt_paint::StrokeCache::tilt, blender::ed::sculpt_paint::StrokeCache::vc, and blender::ed::sculpt_paint::StrokeCache::vertex_rotation.

Referenced by sculpt_update_cache_variants(), and stroke_update_step().

◆ set_persistent_base_exec()

◆ set_pivot_depends_on_cursor()

bool blender::ed::sculpt_paint::set_pivot_depends_on_cursor ( bContext & ,
wmOperatorType & ,
PointerRNA * ptr )
static

Definition at line 637 of file sculpt_transform.cc.

References ActiveVert, CursorSurface, ELEM, ptr, and RNA_enum_get().

Referenced by SCULPT_OT_set_pivot_position().

◆ set_pivot_position_exec()

◆ set_pivot_position_invoke()

wmOperatorStatus blender::ed::sculpt_paint::set_pivot_position_invoke ( bContext * C,
wmOperator * op,
const wmEvent * event )
static

◆ set_pivot_position_poll_property()

bool blender::ed::sculpt_paint::set_pivot_position_poll_property ( const bContext * ,
wmOperator * op,
const PropertyRNA * prop )
static

◆ simplify_fixed()

◆ smooth_brush_toggle_off()

◆ smooth_brush_toggle_on()

◆ smooth_fill_strokes()

◆ start_brush_operation()

◆ store_mesh_from_eval()

void blender::ed::sculpt_paint::store_mesh_from_eval ( const wmOperator & op,
const Scene & scene,
const Depsgraph & depsgraph,
const RegionView3D * rv3d,
Object & object,
Mesh * new_mesh )

Fully replace the sculpt mesh with a mesh outside of Main. This implements various checks to avoid pushing full geometry-type undo steps when possible, allowing for better performance.

Warning
To avoid false negatives when detecting mesh changes, it is critical that the caller adds an owner to the attribute data arrays before modifying the original object's mesh. This allows constant time checks for whether the mesh has changed.

Definition at line 5292 of file sculpt.cc.

References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_multiple(), blender::bke::pbvh::all_leaf_nodes(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::as_span(), attribute_matches(), Geometry::attributes, BKE_id_free(), BKE_mesh_copy_parameters(), BKE_sculptsession_use_pbvh_draw(), CD_PROP_FLOAT3, blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), CustomData_add_layer_named_with_data(), CustomData_free_layer_named(), DEG_id_tag_update(), depsgraph, ELEM, blender::bke::Face, blender::ed::sculpt_paint::undo::FaceSet, blender::bke::Float, blender::bke::AttributeIter::get(), get_vertex_group_sharing_info(), ID_RECALC_GEOMETRY, ID_RECALC_SHADING, blender::bke::Int32, LISTBASE_FOREACH, blender::ed::sculpt_paint::undo::Mask, blender::bke::AttributeIter::name, blender::bke::object::pbvh_get(), blender::bke::Point, blender::ed::sculpt_paint::undo::Position, blender::ed::sculpt_paint::undo::push_begin(), blender::ed::sculpt_paint::undo::push_end(), blender::ed::sculpt_paint::undo::push_nodes(), replace_attribute(), blender::bke::AttributeReader< T >::sharing_info, store_mesh_from_eval(), store_sculpt_entire_mesh(), blender::bke::pbvh::Tree::tag_face_sets_changed(), blender::bke::pbvh::Tree::tag_masks_changed(), tag_mesh_positions_changed(), blender::bke::pbvh::Tree::tag_positions_changed(), topology_matches(), blender::bke::pbvh::Tree::update_bounds(), and blender::bke::AttributeReader< T >::varray.

Referenced by store_mesh_from_eval(), and blender::ed::geometry::store_result_geometry().

◆ store_sculpt_entire_mesh()

void blender::ed::sculpt_paint::store_sculpt_entire_mesh ( const wmOperator & op,
const Scene & scene,
Object & object,
Mesh * new_mesh )
static

◆ stroke_done() [1/4]

◆ stroke_done() [2/4]

◆ stroke_done() [3/4]

◆ stroke_done() [4/4]

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

◆ stroke_get_location() [1/2]

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

Definition at line 81 of file grease_pencil_draw_ops.cc.

References out.

◆ stroke_get_location() [2/2]

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

◆ stroke_get_location_bvh()

bool blender::ed::sculpt_paint::stroke_get_location_bvh ( bContext * C,
float out[3],
const float mval[2],
bool force_original )

◆ stroke_get_location_bvh_ex()

bool blender::ed::sculpt_paint::stroke_get_location_bvh_ex ( bContext * C,
float3 & out,
const float2 & mval,
const bool force_original,
const bool check_closest,
const bool limit_closest_radius )
static
Parameters
check_closestif true and the ray test fails a point closest to the ray will be found.
limit_closest_radiusif true then the closest point will be tested against the active brush radius.

Definition at line 4827 of file sculpt.cc.

References blender::ed::sculpt_paint::StrokeCache::accum, BKE_paint_brush(), BKE_paint_get_active_from_context(), C, SculptSession::cache, blender::ed::sculpt_paint::FindNearestToRayData::corner_tris, blender::ed::sculpt_paint::RaycastData::corner_tris, blender::ed::sculpt_paint::FindNearestToRayData::corner_verts, blender::ed::sculpt_paint::RaycastData::corner_verts, CTX_data_depsgraph_pointer(), Object::data, depsgraph, blender::ed::sculpt_paint::FindNearestToRayData::depth, blender::ed::sculpt_paint::RaycastData::depth, blender::ed::sculpt_paint::FindNearestToRayData::dist_sq_to_ray, ED_view3d_viewcontext_init(), blender::bke::Face, blender::ed::sculpt_paint::FindNearestToRayData::faces, blender::ed::sculpt_paint::RaycastData::faces, blender::bke::pbvh::find_nearest_to_ray(), blender::bke::pbvh::Grids, blender::ed::sculpt_paint::FindNearestToRayData::hide_poly, blender::ed::sculpt_paint::RaycastData::hide_poly, blender::ed::sculpt_paint::FindNearestToRayData::hit, blender::ed::sculpt_paint::RaycastData::hit, blender::ed::sculpt_paint::FindNearestToRayData::is_mid_stroke, blender::ed::sculpt_paint::RaycastData::is_mid_stroke, blender::ed::sculpt_paint::RaycastData::isect_precalc, isect_ray_tri_watertight_v3_precalc(), blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, ViewContext::obact, blender::ed::sculpt_paint::FindNearestToRayData::object, blender::ed::sculpt_paint::RaycastData::object, object_space_radius_get(), out, blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::FindNearestToRayData::ray_normal, blender::ed::sculpt_paint::RaycastData::ray_normal, blender::ed::sculpt_paint::FindNearestToRayData::ray_start, blender::ed::sculpt_paint::RaycastData::ray_start, blender::bke::pbvh::raycast(), raycast_init(), Object::sculpt, sculpt_find_nearest_to_ray_cb(), sculpt_raycast_cb(), SCULPT_stroke_modifiers_check(), stroke_get_location_bvh_ex(), blender::ed::sculpt_paint::FindNearestToRayData::subdiv_ccg, blender::ed::sculpt_paint::RaycastData::subdiv_ccg, SculptSession::subdiv_ccg, blender::bke::pbvh::Tree::type(), blender::ed::sculpt_paint::FindNearestToRayData::use_original, blender::ed::sculpt_paint::RaycastData::use_original, blender::ed::sculpt_paint::FindNearestToRayData::vert_positions, blender::ed::sculpt_paint::RaycastData::vert_positions, blender::bke::pbvh::vert_positions_eval(), and vert_random_access_ensure().

Referenced by over_mesh(), stroke_get_location_bvh(), and stroke_get_location_bvh_ex().

◆ stroke_redraw()

◆ stroke_test_start() [1/3]

◆ stroke_test_start() [2/3]

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

Definition at line 180 of file grease_pencil_draw_ops.cc.

References C, and UNUSED_VARS.

◆ stroke_test_start() [3/3]

◆ stroke_update_step() [1/3]

◆ stroke_update_step() [2/3]

◆ stroke_update_step() [3/3]

◆ symmetrize_exec()

◆ symmetry_flip()

◆ tag_mesh_positions_changed()

void blender::ed::sculpt_paint::tag_mesh_positions_changed ( Object & object,
const bool use_pbvh_draw )
static

◆ tilt_apply_to_normal() [1/2]

float3 blender::ed::sculpt_paint::tilt_apply_to_normal ( const float3 & normal,
const StrokeCache & cache,
const float tilt_strength )

◆ tilt_apply_to_normal() [2/2]

◆ tilt_effective_normal_get()

float3 blender::ed::sculpt_paint::tilt_effective_normal_get ( const SculptSession & ss,
const Brush & brush )

◆ topology_matches()

bool blender::ed::sculpt_paint::topology_matches ( const Mesh & a,
const Mesh & b )
static

◆ transform_brush_radius()

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

◆ transform_matrices_init()

◆ transform_node_bmesh()

◆ transform_node_grids()

◆ transform_node_mesh()

◆ transform_radius_elastic()

◆ translations_from_new_positions() [1/2]

void blender::ed::sculpt_paint::translations_from_new_positions ( Span< float3 > new_positions,
Span< float3 > old_positions,
MutableSpan< float3 > translations )

◆ translations_from_new_positions() [2/2]

void blender::ed::sculpt_paint::translations_from_new_positions ( Span< float3 > new_positions,
Span< int > verts,
Span< float3 > old_positions,
MutableSpan< float3 > translations )

For brushes that calculate an averaged new position instead of generating a new translation vector.

Definition at line 7542 of file sculpt.cc.

References BLI_assert, i, blender::Span< T >::size(), translations_from_new_positions(), and verts.

Referenced by blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::boundary::calc_bend_mesh(), blender::ed::sculpt_paint::filter::calc_erase_displacement_filter(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::boundary::calc_grab_mesh(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_mesh(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_slide_mesh(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::filter::calc_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_mesh(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::ed::sculpt_paint::boundary::calc_twist_mesh(), blender::ed::sculpt_paint::undo::restore_position_from_undo_step(), blender::ed::sculpt_paint::undo::restore_position_mesh(), translations_from_new_positions(), and translations_from_new_positions().

◆ translations_from_offset_and_factors()

◆ update_curve_mask()

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

◆ update_sampled_curve()

◆ update_sculpt_normal()

◆ use_add_density_mode()

◆ vert_neighbors_get_bmesh()

Span< BMVert * > blender::ed::sculpt_paint::vert_neighbors_get_bmesh ( BMVert & vert,
BMeshNeighborVerts & r_neighbors )

◆ vert_neighbors_get_interior_bmesh()

◆ vert_neighbors_get_mesh()

◆ vert_positions_for_grab_active_get()

Span< float3 > blender::ed::sculpt_paint::vert_positions_for_grab_active_get ( const Depsgraph & depsgraph,
const Object & object )

◆ vert_random_access_ensure()

void blender::ed::sculpt_paint::vert_random_access_ensure ( Object & object)

Ensure random access; required for blender::bke::pbvh::Type::BMesh

Definition at line 141 of file sculpt.cc.

References SculptSession::bm, BM_mesh_elem_index_ensure(), BM_mesh_elem_table_ensure(), BM_VERT, blender::bke::pbvh::BMesh, and blender::bke::object::pbvh_get().

Referenced by blender::ed::sculpt_paint::auto_mask::cache_init(), blender::ed::sculpt_paint::pose::calc_average_face_set_center(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_bmesh(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), calc_smooth_translations(), blender::ed::sculpt_paint::islands::calc_topology_islands_bmesh(), blender::ed::sculpt_paint::face_set::change_visibility_invoke(), cursor_geometry_info_update(), blender::ed::sculpt_paint::boundary::data_init_bmesh(), blender::ed::sculpt_paint::brushes::do_smooth_brush(), blender::ed::sculpt_paint::brushes::do_smooth_mask_brush(), blender::ed::sculpt_paint::brushes::do_surface_smooth_brush(), blender::ed::sculpt_paint::mask::duplicate_mask(), blender::ed::sculpt_paint::hide::duplicate_visibility_bmesh(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_invoke(), blender::ed::sculpt_paint::cloth::ensure_nodes_constraints(), blender::ed::sculpt_paint::expand::ensure_sculptsession_data(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_bmesh(), init_transform(), blender::ed::sculpt_paint::trim::initialize_cursor_info(), blender::ed::sculpt_paint::mask::mask_from_boundary_exec(), blender::ed::sculpt_paint::mask::mask_from_cavity_exec(), paint_cursor_draw_3d_view_brush_cursor_inactive(), paint_cursor_sculpt_session_update_and_init(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_modal(), blender::ed::sculpt_paint::expand::sculpt_expand_invoke(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_apply(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_start(), stroke_get_location_bvh_ex(), update_modal_transform(), vertex_is_occluded(), and blender::ed::sculpt_paint::expand::write_mask_data().

◆ vertex_is_occluded()

bool blender::ed::sculpt_paint::vertex_is_occluded ( const Depsgraph & depsgraph,
const Object & object,
const float3 & position,
bool original )

◆ visit_active_library_catalogs_catalog_for_search_fn()

void blender::ed::sculpt_paint::visit_active_library_catalogs_catalog_for_search_fn ( const bContext * C,
PointerRNA * ,
PropertyRNA * ,
const char * edit_text,
FunctionRef< void(StringPropertySearchVisitParams)> visit_fn )
static

◆ visit_library_prop_catalogs_catalog_for_search_fn()

void blender::ed::sculpt_paint::visit_library_prop_catalogs_catalog_for_search_fn ( const bContext * C,
PointerRNA * ptr,
PropertyRNA * ,
const char * edit_text,
FunctionRef< void(StringPropertySearchVisitParams)> visit_fn )
static

Variable Documentation

◆ AntiAliasingSamplesPerTexelAxisMax

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

Definition at line 22 of file paint_image_2d_curve_mask.cc.

Referenced by aa_samples_per_texel_axis().

◆ AntiAliasingSamplesPerTexelAxisMin

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

Definition at line 21 of file paint_image_2d_curve_mask.cc.

Referenced by aa_samples_per_texel_axis().

◆ CurveSamplesBaseLen

int blender::ed::sculpt_paint::CurveSamplesBaseLen = 1024
constexpr

Number of samples to use between 0..1.

Definition at line 26 of file paint_image_2d_curve_mask.cc.

Referenced by update_curve_mask(), and update_sampled_curve().

◆ CurveSamplesLen

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 33 of file paint_image_2d_curve_mask.cc.

Referenced by update_curve_mask(), and update_sampled_curve().

◆ plane_brush_max_rolling_average_num

int blender::ed::sculpt_paint::plane_brush_max_rolling_average_num = 20
staticconstexpr

Definition at line 150 of file sculpt_intern.hh.

Referenced by calc_stabilized_plane().

◆ prop_sculpt_pivot_position_types

EnumPropertyItem blender::ed::sculpt_paint::prop_sculpt_pivot_position_types[]
static
Initial value:
= {
"ORIGIN",
0,
"Origin",
"Sets the pivot to the origin of the sculpt"},
"UNMASKED",
0,
"Unmasked",
"Sets the pivot position to the average position of the unmasked vertices"},
"BORDER",
0,
"Mask Border",
"Sets the pivot position to the center of the border of the mask"},
"ACTIVE",
0,
"Active Vertex",
"Sets the pivot position to the active vertex position"},
"SURFACE",
0,
"Surface",
"Sets the pivot position to the surface under the cursor"},
{0, nullptr, 0, nullptr, nullptr},
}

Definition at line 608 of file sculpt_transform.cc.

Referenced by SCULPT_OT_set_pivot_position().

◆ transform_mirror_max_distance_eps

float blender::ed::sculpt_paint::transform_mirror_max_distance_eps = 0.00002f
staticconstexpr

Definition at line 154 of file sculpt_transform.cc.

Referenced by filter_translations_with_symmetry().