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

Namespaces

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

Classes

struct  ActiveElementInfo
class  AddOperation
struct  AddOperationExecutor
struct  AreaNormalCenterData
struct  AveragePositionAccumulation
struct  BrushPositionCandidate
struct  BrushProjectionInfo
class  CombOperation
struct  CombOperationExecutor
struct  CursorGeometryInfo
struct  CurvesBrush3D
struct  CurvesConstraintSolver
class  CurvesEffect
class  CurvesEffectOperation
struct  CurvesEffectOperationExecutor
class  CurvesGeometry
class  CurvesSculptCommonContext
class  CurvesSculptStrokeOperation
struct  CurvesSurfaceTransforms
class  CutOperation
struct  CutOperationExecutor
class  DeleteOperation
struct  DeleteOperationExecutor
class  DensityAddOperation
struct  DensityAddOperationExecutor
class  DensitySubtractOperation
struct  DensitySubtractOperationExecutor
class  ExtrapolateCurvesEffect
struct  FillToolTargetInfo
struct  FindNearestToRayData
struct  GeometryExtractParams
struct  GreasePencilFillOpData
struct  GreasePencilPaintStroke
class  GreasePencilStrokeOperation
struct  InputSample
struct  LoadTexData
struct  MeshAttributeData
struct  MoveAndResampleBuffers
struct  NearestVertData
struct  OrigPositionData
struct  PaintCursorContext
class  PaintModeData
struct  PaintSample
struct  PaintStroke
class  PinchOperation
struct  PinchOperationExecutor
class  PositionDeformData
struct  ProjectBrushTarget
class  PuffOperation
struct  PuffOperationExecutor
struct  RaycastData
class  ReverseUVSampler
struct  SampleColorData
struct  SampleLocalData
class  ScaleCurvesEffect
struct  SculptCurvesBrushStroke
struct  SculptPaintStroke
struct  SculptRakeData
class  SelectionPaintOperation
struct  SelectionPaintOperationExecutor
struct  ShapeKeyData
class  ShrinkCurvesEffect
struct  SlideCurveInfo
struct  SlideInfo
class  SlideOperation
struct  SlideOperationExecutor
class  SmoothOperation
struct  SmoothOperationExecutor
class  SnakeHookOperation
struct  SnakeHookOperatorExecutor
struct  StrokeCache
struct  StrokeExtension
struct  StrokeToggleSettings
struct  TransformLocalData

Typedefs

using DeltaProjectionFunc
using BrushActionFn
using GeometryExtractTagMeshFunc = void(BMesh *, GeometryExtractParams *)

Enumerations

enum class  UpdateType {
  Position , Mask , Visibility , Color ,
  FaceSet
}
enum class  TransformDisplacementMode { Original = 0 , Incremental = 1 }
enum class  PivotPositionMode {
  Origin = 0 , Unmasked = 1 , MaskBorder = 2 , ActiveVert = 3 ,
  CursorSurface = 4
}
enum class  PaintCursorDrawingType { Curve , Cursor2D , Cursor3D }

Functions

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_init (Object &ob, const float fill_color[4])
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 wmOperatorStatus brush_asset_save_as_invoke (bContext *C, wmOperator *op, const wmEvent *)
static const EnumPropertyItem * rna_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< AssetLibraryReference > get_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)
std::unique_ptr< CurvesSculptStrokeOperation > new_add_operation ()
static std::optional< float3 > find_curves_brush_position (const CurvesGeometry &curves, const float3 &ray_start_cu, const float3 &ray_end_cu, const float brush_radius_re, const ARegion &region, const RegionView3D &rv3d, const Object &object, const Span< float3 > positions)
std::optional< CurvesBrush3D > 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)
std::optional< CurvesBrush3D > sample_curves_surface_3d_brush (const Depsgraph &depsgraph, const ARegion &region, const View3D &v3d, const CurvesSurfaceTransforms &transforms, const bke::bvh::Tree &surface_bvh, const float2 &brush_pos_re, const float brush_radius_re)
Vector< float4x4 > get_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)
void report_cyclic_not_supported (ReportList *reports)
std::unique_ptr< CurvesSculptStrokeOperation > new_comb_operation ()
std::unique_ptr< CurvesSculptStrokeOperation > new_cut_operation ()
std::unique_ptr< CurvesSculptStrokeOperation > new_delete_operation ()
static bool use_add_density_mode (const BrushStrokeMode brush_mode, const Scene &scene, const Depsgraph &depsgraph, const ARegion &region, const View3D &v3d, const Object &object, const StrokeExtension &stroke_start)
std::unique_ptr< CurvesSculptStrokeOperation > new_density_operation (BrushStrokeMode brush_mode, const Scene &scene, const Depsgraph &depsgraph, const ARegion &region, const View3D &v3d, const Object &object, const StrokeExtension &stroke_start)
std::unique_ptr< CurvesSculptStrokeOperation > new_grow_shrink_operation (const BrushStrokeMode brush_mode, const Scene &scene)
std::unique_ptr< CurvesSculptStrokeOperation > new_snake_hook_operation ()
std::unique_ptr< CurvesSculptStrokeOperation > new_selection_paint_operation (BrushStrokeMode brush_mode, BrushSwitchMode brush_switch_mode, const Scene &scene)
std::unique_ptr< CurvesSculptStrokeOperation > new_pinch_operation (BrushStrokeMode brush_mode, const Scene &scene)
std::unique_ptr< CurvesSculptStrokeOperation > new_smooth_operation ()
std::unique_ptr< CurvesSculptStrokeOperation > new_puff_operation ()
std::unique_ptr< CurvesSculptStrokeOperation > new_slide_operation ()
bke::SpanAttributeWriter< float > float_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)
static int project_brush_radius_grease_pencil (ViewContext *vc, const float radius, const float3 world_location, const float4x4 &to_world)
static void grease_pencil_eraser_draw (PaintCursorContext &pcontext)
void grease_pencil_cursor_draw (PaintCursorContext &pcontext)
void filter_translations (MutableSpan< float3 > translations, Span< float > factors)
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< T > gather_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< T > gather_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< T > gather_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< float3 > gather_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< float3 > gather_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, MutableSpan< float > factors, MutableSpan< float > 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_cube_tip_factors_common_grids (const Depsgraph &depsgraph, const Brush &brush, const Object &object, const float4x4 &mat, Span< float3 > positions, const bke::pbvh::GridsNode &node, Vector< float > &r_factors, Vector< float > &r_distances)
void calc_cube_tip_factors_common_bmesh (const Depsgraph &depsgraph, const Brush &brush, const Object &object, const float4x4 &mat, 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, MutableSpan< float > r_factors, MutableSpan< 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 (PaintMode paint_mode, const SculptSession &ss, const Brush &brush, Span< float3 > vert_positions, Span< int > vert, MutableSpan< float > factors)
void calc_brush_texture_factors (PaintMode paint_mode, 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, const Set< OrderedEdge > &boundary_edges, 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, const Set< OrderedEdge > &boundary_edges, 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 Set< OrderedEdge > &boundary_edges, 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)
void calc_local_positions (Span< float3 > vert_positions, Span< int > verts, const float4x4 &mat, const float3 &plane_center, const float3 &view_normal, eBrushFalloffShape falloff_shape, MutableSpan< float3 > local_positions)
void calc_local_positions (Span< float3 > positions, const float4x4 &mat, const float3 &plane_center, const float3 &view_normal, eBrushFalloffShape falloff_shape, MutableSpan< float3 > local_positions)
void calc_local_positions (Span< float3 > vert_positions, Span< int > verts, const float4x4 &mat, const float3 &plane_center, const float3 &view_normal, eBrushFalloffShape falloff_shape, MutableSpan< float2 > xy_positions, MutableSpan< float > z_positions)
void calc_local_positions (Span< float3 > positions, const float4x4 &mat, const float3 &plane_center, const float3 &view_normal, eBrushFalloffShape falloff_shape, MutableSpan< float2 > xy_positions, MutableSpan< float > z_positions)
static int brush_radius_project (ViewContext *vc, float radius, const float location[3])
static void pixel_radius_update (PaintCursorContext &pcontext)
static void brush_unprojected_size_update (Paint &paint, Brush &brush, const ViewContext &vc, const float location[3])
void mesh_cursor_update_and_init (PaintCursorContext &pcontext)
static void geometry_preview_lines_draw (const Depsgraph &depsgraph, const uint gpuattr, const Brush &brush, const Object &object)
void mesh_cursor_active_draw (PaintCursorContext &pcontext)
static void screen_space_point_draw (const uint gpuattr, const ARegion *region, const float true_location[3], const float obmat[4][4], const int size)
static void tiling_preview_draw (const uint gpuattr, const ARegion *region, const float true_location[3], const Paint &paint, const Object &ob, const float radius)
static void point_with_symmetry_draw (const PaintMode paint_mode, const Brush &brush, const uint gpuattr, const ARegion *region, const float true_location[3], const Paint &paint, const Object &ob, const float radius)
static void inactive_cursor_draw (PaintCursorContext &pcontext)
static void object_space_radius_update (PaintCursorContext &pcontext)
static void pose_brush_segments_draw (const PaintCursorContext &pcontext)
static void pose_brush_origins_draw (const PaintCursorContext &pcontext)
static void boundary_preview_pivot_draw (const PaintCursorContext &pcontext)
static void boundary_preview_update (const PaintCursorContext &pcontext)
static float3 get_active_vertex_position (const PaintCursorContext &pcontext)
static void screen_space_overlays_draw (const PaintCursorContext &pcontext)
static void object_space_overlays_draw (const PaintCursorContext &pcontext)
static void cursor_space_drawing_setup (const PaintCursorContext &pcontext)
static void main_inactive_cursor_draw (const PaintCursorContext &pcontext)
static void 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 void cursor_space_overlays_draw (const PaintCursorContext &pcontext)
void mesh_cursor_inactive_draw (PaintCursorContext &pcontext)
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)
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, const bool only_visible=false)
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, const bool only_visible=false)
static void fill_mesh_color (Mesh &mesh, const ColorPaint4f &color, const StringRef name, const bool use_vert_sel, const bool use_face_sel, const bool affect_alpha, const bool only_visible=false)
static bool fill_active_color (Object &ob, ColorPaint4f fill_color, bool only_selected=true, bool affect_alpha=true, const bool only_visible=false)
static void rake_data_update (SculptRakeData *srd, const float co[3])
static void sculpt_init_mirror_clipping (const Object &ob, const SculptSession &ss)
static void smooth_brush_toggle_on (Main *bmain, Paint *paint, StrokeToggleSettings &toggle_settings)
static void smooth_brush_toggle_off (Paint *paint, StrokeCache *cache)
static void mask_brush_toggle_on (Main *bmain, Paint *paint, StrokeToggleSettings &toggle_settings)
static void mask_brush_toggle_off (Paint *paint, StrokeCache *cache)
static void init_scene_project_brush_targets (const Depsgraph &depsgraph, ViewLayer &view_layer, const View3D &v3d, const Object &active_object, StrokeCache &cache)
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_brush_variants_update (StrokeCache &cache, const Brush &brush)
static void sculpt_raycast_cb (bke::pbvh::Node &node, RaycastData &rd, float *distance)
static void sculpt_find_nearest_to_ray_cb (bke::pbvh::Node &node, FindNearestToRayData &fntrd, float *tmin)
static std::optional< float3 > stroke_get_location_bvh_ex (Depsgraph &depsgraph, ViewContext &vc, const Paint &paint, const Sculpt *sd, const float2 &mval, const bool force_original, const bool check_closest, const bool limit_closest_radius)
static void brush_init_tex (const Sculpt &sd, SculptSession &ss)
static StrokeToggleSettings create_toggle_settings (const wmOperator &op, Main &bmain, Paint &paint)
static void brush_stroke_init (bContext *C, const wmOperator *op)
static void restore_from_undo_step_if_necessary (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob)
static void tag_mesh_positions_changed (Object &object, const bool use_pbvh_draw)
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 ImplicitSharingInfo * get_vertex_group_sharing_info (const Mesh &mesh)
static bool over_mesh (bContext *C, wmOperator *, const float mval[2])
static bool over_mesh (Depsgraph &depsgraph, ViewContext &vc, const Sculpt &sd, const Brush *brush, wmOperator *, const float mval[2])
static void stroke_cache_init (ViewContext &vc, const Sculpt &sd, const Brush &brush, Object &ob, const float mval[2])
static void stroke_cache_update (ViewContext &vc, const Depsgraph &depsgraph, Paint &paint, Brush &brush, Object &object, const PaintStroke::StrokeStep &stroke_step)
static void brush_exit_tex (Sculpt &sd)
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)
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_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 Set< OrderedEdge > &boundary_edges, const Span< bool > hide_poly, const Span< int > verts, const Span< float > factors, Vector< int > &r_offset_data, Vector< int > &r_data)
void mask_overlay_check (bContext &C, wmOperator &op)
void face_set_overlay_check (bContext &C, wmOperator &op)
void SCULPT_OT_set_pivot_position (wmOperatorType *ot)
void SCULPT_OT_paint_mask_extract (wmOperatorType *ot)
void SCULPT_OT_face_set_extract (wmOperatorType *ot)
void SCULPT_OT_paint_mask_slice (wmOperatorType *ot)
static bool geometry_extract_poll (bContext *C)
static wmOperatorStatus geometry_extract_apply (bContext *C, wmOperator *op, GeometryExtractTagMeshFunc *tag_fn, GeometryExtractParams *params)
static void geometry_extract_tag_masked_faces (BMesh *bm, GeometryExtractParams *params)
static void geometry_extract_tag_face_set (BMesh *bm, GeometryExtractParams *params)
static wmOperatorStatus paint_mask_extract_exec (bContext *C, wmOperator *op)
static wmOperatorStatus paint_mask_extract_invoke (bContext *C, wmOperator *op, const wmEvent *e)
static void geometry_extract_props (StructRNA *srna)
static wmOperatorStatus face_set_extract_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static void slice_paint_mask (BMesh *bm, bool invert, bool fill_holes, float mask_threshold)
static wmOperatorStatus paint_mask_slice_exec (bContext *C, wmOperator *op)
static void finish_pivot_change (bContext *C, Object &ob)
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)
static int same_tex_snap (bke::paint::TexSnapshot *snap, MTex *mtex, ViewContext *vc, bool col, float zoom)
static void make_tex_snap (bke::paint::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 (Paint *paint, 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 (Paint *paint, Brush *br, float zoom)
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, 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 bool paint_use_2d_cursor (PaintMode mode, const Brush &brush)
static bool paint_cursor_context_init (bContext *C, const int2 &xy, const float2 &tilt, PaintCursorContext &pcontext)
static void paint_update_mouse_cursor (PaintCursorContext &pcontext)
static void paint_draw_2D_view_brush_cursor_default (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_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 int2 &xy, const float2 &tilt, void *)
float2 paint_stroke_jitter_pos (Paint *paint, PaintMode mode, const Brush &brush, float pressure, BrushStrokeMode stroke_mode, float zoom_2d, const float2 &mval)
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 (const Brush &brush, PaintMode mode, BrushSwitchMode brush_switch_mode)
bool paint_supports_texture (PaintMode mode)
bool paint_brush_tool_poll (bContext *C)
bool paint_brush_tool_poll (const ScrArea *area, const ARegion *region, const Paint *paint, const Object *ob)
bool paint_brush_cursor_poll (bContext *C)
void PAINT_OT_sample_color (wmOperatorType *ot)
bool is_symmetry_iteration_valid (const char i, const char symm)
float3 symmetry_flip (const float3 &src, const ePaintSymmetryFlags symm)
static float2 imapaint_pick_uv (const Mesh *mesh_eval, Scene &scene, Object *ob_eval, const int tri_index, const float3 &bary_coord)
static bool imapaint_pick_face (ViewContext *vc, const int mval[2], int *r_tri_index, int *r_face_index, float3 *r_bary_coord, const Mesh &mesh)
static std::optional< float3 > sample_texture_paint_color (const Depsgraph &depsgraph, Scene &scene, ViewContext &vc, Object *object, const int2 mval)
static std::optional< float3 > sample_mesh_attribute_color (ViewContext &vc, Object &object, int2 mval)
static void apply_sampled_color (Main &bMain, Paint &paint, const float3 &sampled_color, const bool use_palette)
static float3 paint_sample_color (bContext *C, ARegion *region, const int2 mval, const bool use_merged_texture)
static void sample_color_update_header (SampleColorData *data, bContext *C)
static float3 sample_average_color (SampleColorData *data, const float3 &sampled_color)
static wmOperatorStatus sample_color_exec (bContext *C, wmOperator *op)
static wmOperatorStatus sample_color_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus sample_color_modal (bContext *C, wmOperator *op, const wmEvent *event)
static bool sample_color_poll (bContext *C)
static void paint_draw_smooth_cursor (bContext *C, const int2 &xy, const float2 &, void *customdata)
static void paint_draw_line_cursor (bContext *, const int2 &xy, const float2 &, void *customdata)
static bool 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 paint_brush_type_raycast_original (const Brush &brush, PaintMode)
static bool 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 bool paint_smooth_stroke (const Brush &brush, const PaintSample *sample, const PaintMode mode, const BrushSwitchMode brush_switch_mode, float zoom_2d, float2 last_mouse_position, float last_pressure, float2 &r_mouse, float &r_pressure)
static float paint_space_stroke_spacing (const ViewContext &vc, const Paint *paint, const PaintMode paint_mode, const Brush *brush, float3 last_world_space_position, float zoom_2d, const float size_factor, const float pressure)
static float paint_space_stroke_spacing_no_pressure (const ViewContext &vc, const Paint *paint, const PaintMode paint_mode, const Brush *brush, float3 last_world_space_position, float zoom_2d)
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 (ViewContext &vc, const Paint *paint, const PaintMode paint_mode, const Brush *brush, float3 last_world_space_position, float zoom_2d, const float last_pressure, const float pressure, const float pressure_delta, const float length)
static bool print_pressure_status_enabled ()
static bool curves_sculpt_brush_uses_spacing (const eBrushCurvesSculptType tool)
static bool sculpt_is_grab_tool (const Brush &br)
static void paint_stroke_line_constrain (float2 last_mouse_position, float2 &constrained_pos, float2 &mouse)
static const bToolRef * brush_tool_get (const ScrArea *area, const ARegion *region)
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)
static wmOperatorStatus sculpt_mode_toggle_exec (bContext *C, wmOperator *op)
static void SCULPT_OT_sculptmode_toggle (wmOperatorType *ot)
Sculpt Brush Utilities
bool shape_key_check (const Object &ob, ReportList *reports)
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)
int vertex_count_get (const Object &object)
Span< float3 > vert_positions_for_grab_active_get (const Depsgraph &depsgraph, const Object &object)
ePaintSymmetryFlags mesh_symmetry_xyz_get (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)
bool stroke_is_main_symmetry_pass (const StrokeCache &cache)
bool stroke_is_first_brush_step (const StrokeCache &cache)
bool stroke_is_first_brush_step_of_symmetry_pass (const StrokeCache &cache)
bool check_vertex_pivot_symmetry (const float vco[3], const float pco[3], const char symm)
static void sculpt_project_v3_normal_align (const StrokeCache &cache, const float normal_weight, float grab_delta[3])
float3 grab_delta_get (const Brush &brush, const StrokeCache &cache)
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< SubdivCCGCoord > nearest_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)
bool is_vertex_inside_brush_radius_symm (const float vertex[3], const float br_co[3], float radius, char symm)
void tag_update_overlays (bContext *C)
static void dynamic_topology_update (const Depsgraph &depsgraph, const Scene &scene, const Brush &brush, Object &ob, PaintModeData *)
static bool brush_type_needs_all_pbvh_nodes (const Brush &brush)
static brushes::CursorSampleResult calc_brush_node_mask (const Depsgraph &depsgraph, const Sculpt &sd, 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 const char * sculpt_brush_type_name (const Brush &brush)
static void do_brush_action (const Depsgraph &depsgraph, const Scene &scene, const Brush &brush, Object &ob, PaintModeData *)
void cache_calc_brushdata_symm (StrokeCache &cache, const ePaintSymmetryFlags symm, const char axis, const float angle)
static void sculpt_fix_noise_tear (const Sculpt &sd, Object &ob)
bool sculpt_mode_poll (bContext *C)
bool sculpt_mode_poll_view3d (bContext *C)
bool sculpt_mode_and_brush_poll (bContext *C)
static bool is_brush_related_tool (bContext *C)
bool brush_cursor_poll (bContext *C)
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< CurvesSculptStrokeOperation > start_brush_operation (wmOperator &op, Scene &scene, Depsgraph &depsgraph, ARegion &region, View3D &v3d, const Object &object, const StrokeExtension &stroke_start)
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 bool use_duplicate_previous_key (bContext *C, wmOperator *op)
static wmOperatorStatus grease_pencil_brush_stroke_exec (bContext *C, wmOperator *op)
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 std::unique_ptr< GreasePencilStrokeOperation > get_stroke_operation (bContext &C, wmOperator *op)
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 Utilities.
void calc_smooth_translations (const Depsgraph &depsgraph, const Object &object, const IndexMask &node_mask, const MutableSpan< float3 > translations)
float4x4 cube_tip_init (const Object &ob, const Brush &brush)
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::array< int, PAINT_SYMM_AREAS > find_all_symm_verts (const Depsgraph &depsgraph, const Object &object, const int original_vert, const float max_distance)
std::array< int, PAINT_SYMM_AREAS > find_all_symm_verts_mesh (const Depsgraph &depsgraph, const Object &object, const int original_vert, const float max_distance)
std::array< int, PAINT_SYMM_AREAS > find_all_symm_verts_grids (const Object &object, const int original_vert, const float max_distance)
std::array< int, PAINT_SYMM_AREAS > find_all_symm_verts_bmesh (const Object &object, const int original_vert, const float max_distance)
std::optional< OrigPositionData > orig_position_data_lookup_mesh_all_verts (const Object &object, const bke::pbvh::MeshNode &node)
std::optional< OrigPositionData > orig_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< OrigPositionData > orig_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< float4 > orig_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)
Stroke Functions
void geometry_preview_lines_update (Depsgraph &depsgraph, Object &object, SculptSession &ss, float radius)
void stroke_modifiers_check (Depsgraph &depsgraph, Object &ob, const Brush *brush)
float raycast_init (ViewContext *vc, const float2 &mval, float3 &r_ray_start, float3 &r_ray_end, float3 &r_ray_normal, bool original)
std::optional< ActiveElementInfo > active_element_info_get (ViewContext &vc, const float2 &mval)
std::optional< CursorGeometryInfo > cursor_geometry_info_update (bContext *C, const float2 &mval, const bool use_sampled_normal)
std::optional< CursorGeometryInfo > cursor_geometry_info_update (Depsgraph &depsgraph, const Paint &paint, const Sculpt *sd, ViewContext &vc, const Base *base, const float2 &mval, const bool use_sampled_normal)
std::optional< float3 > stroke_get_location_bvh (Depsgraph &depsgraph, ViewContext &vc, const Sculpt &sd, const Brush *brush, const float mval[2], const bool force_original)
std::optional< float3 > stroke_get_location_bvh (Depsgraph &depsgraph, ViewContext &vc, const Paint &paint, const Brush *brush, const float2 mval, const bool force_original)
std::optional< float3 > stroke_get_location_bvh (bContext *C, const float2 mval, const bool force_original)
Mode toggling
static void ensure_valid_pivot (const Object &ob, Paint &paint)
static void init_session (Main &bmain, Depsgraph &depsgraph, Paint &paint, Object &ob, eObjectMode object_mode)
void mode_enter_generic (Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob, const eObjectMode mode_flag)
void mode_exit_generic (Scene &scene, Object &ob, const eObjectMode mode_flag)
Stroke-level Symmetry
static void do_radial_symmetry (const Depsgraph &depsgraph, const Scene &scene, const Paint &, const Brush &brush, Object &object, const BrushActionFn action_fn, PaintModeData *paint_mode_data, const ePaintSymmetryFlags symm, const int axis)
void do_symmetrical_brush_actions (const Depsgraph &depsgraph, const Scene &scene, const Paint &paint, Object &object, const BrushActionFn action_fn, PaintModeData *paint_mode_data)
static float calc_overlap (const StrokeCache &cache, const ePaintSymmetryFlags symm, const char axis, const float angle)
static float calc_radial_symmetry_feather (const Mesh &mesh, const StrokeCache &cache, const ePaintSymmetryFlags symm, const char axis)
static float calc_symmetry_feather (const Paint &paint, const ePaintSymmetryFlags symm, const Mesh &mesh, const StrokeCache &cache)
static void do_tiled (const Depsgraph &depsgraph, const Scene &scene, const Paint &paint, const Brush &brush, Object &object, const BrushActionFn action_fn, PaintModeData *paint_mode_data)
static void do_radial_symmetry_with_tiling (const Depsgraph &depsgraph, const Scene &scene, const Paint &paint, const Brush &brush, Object &object, const BrushActionFn action_fn, PaintModeData *paint_mode_data, const ePaintSymmetryFlags symm, const int axis)
void do_symmetrical_brush_actions_with_tiling_and_feathering (const Depsgraph &depsgraph, const Scene &scene, const Paint &paint, Object &object, const BrushActionFn action_fn, PaintModeData *paint_mode_data)
StrokeCache Helpers
void stroke_cache_common_init (ViewContext &vc, const Paint &paint, const Brush &brush, Object &object, const float2 mval)
BVH Query Helper
IndexMask gather_brush_nodes (const Object &ob, const Brush &brush, IndexMaskMemory &memory, FunctionRef< bool(const bke::pbvh::Node &)> node_ignore_fn)
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)
Sculpt Paint Mesh
const float * brush_frontface_normal_from_falloff_shape (const SculptSession &ss, char falloff_shape)
Generic Brush Utilities
static float brush_flip (const Brush &brush, const StrokeCache &cache)
static float brush_strength (const Sculpt &sd, const StrokeCache &cache)
void apply_brush_texture (const PaintMode paint_mode, const SculptSession &ss, const Brush &brush, const float brush_point[3], const int thread_id, float *r_value, float4 &r_rgba)
void calc_vertex_displacement (const SculptSession &ss, const Brush &brush, float translation[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)
bool node_in_box (const float4x4 &mat, const Bounds< float3 > &bounds, const float3 &brush_center, const float3 &brush_half_lengths, const bool test_z_axis)
bool node_in_box_positive_z (const float4x4 &mat, const Bounds< float3 > &bounds)
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)
static IndexMask pbvh_gather_generic_cube (Object &ob, const Brush &brush, const float4x4 &brush_local_mat, const bool use_original, 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 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])
float3 calc_motion_normal_from_angle (const ViewContext &vc, const float3 &tip_location, const float angle)
void calc_brush_local_mat (const float3 &tip_normal, const float3 &motion_normal_local, const float3 &tip_location, const float radius, 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)
static void update_brush_local_mat (const Sculpt &sd, Object &ob)
Generic Brush Plane & Symmetry Utilities
ePaintSymmetryAreas get_vertex_symm_area (const float co[3])
static void flip_qt_qt (float out[4], const float in[4], const ePaintSymmetryFlags symm)
static void flip_qt (float quat[4], const ePaintSymmetryFlags symm)
float3 flip_v3_by_symm_area (const float3 &vector, const ePaintSymmetryFlags symm, const ePaintSymmetryAreas symmarea, const float3 &pivot)
void flip_quat_by_symm_area (float quat[4], const ePaintSymmetryFlags symm, const ePaintSymmetryAreas symmarea, const float pivot[3])
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)
Sculpt Update Functions
void flush_update_step (bContext *C, const UpdateType update_type)
void flush_update_step (ViewContext &vc, Object &object, const UpdateType update_type)
void flush_update_done (bContext *C, Object &ob, const UpdateType update_type)
void flush_update_done (ViewContext &vc, const wmWindowManager &wm, Object &ob, const UpdateType update_type)
Sculpt Poll Functions
bool color_supported_check (const Scene &scene, Object &object, ReportList *reports)
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)

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 face_set_none_id = 0
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_pixel_cb (const bContext &C, const GreasePencilFillOpData &op_data)
static void grease_pencil_fill_overlay_delaunay_cb (const 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< FillToolTargetInfo > ensure_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 void set_fill_attributes (bke::CurvesGeometry &fill_curves, const ViewContext &view_context, const Paint &paint, const Brush &brush, const Scene &scene, const float4x4 &to_world, const int material_index, const float hardness)
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 void ensure_drawing_for_autokey (bContext *C, GreasePencil &grease_pencil)
static bool remove_points_and_split_from_drawings (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)

Calculate Normal and Center

Calculate geometry surrounding the brush center. (optionally using original coordinates).

Functions are:

Note
These are all very similar, when changing one, check others.
enum class  AverageDataFlags : uint8_t { Position = 1 << 0 , Normal = 1 << 1 , All = Position | Normal }
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)
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, 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< float3 > calc_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])

Sculpt mesh accessor API

using BMeshNeighborVerts = Vector<BMVert *, 64>
Span< int > fake_neighbors_ensure (const Depsgraph &depsgraph, Object &ob, const float max_dist)
void fake_neighbors_free (Object &ob)
bool vertex_is_occluded (const Depsgraph &depsgraph, const Object &object, const float3 &position, bool original)

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

◆ BrushActionFn

◆ DeltaProjectionFunc

Initial value:
std::function<float3(const float3 position, const float2 &screen_delta)>
#define position
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 35 of file grease_pencil_intern.hh.

◆ GeometryExtractTagMeshFunc

Enumeration Type Documentation

◆ AverageDataFlags

Enumerator
Position 
Normal 
All 

Definition at line 1451 of file sculpt.cc.

◆ FillToolModalKey

Enumerator
Cancel 
Confirm 
ExtensionModeToggle 
ExtensionLengthen 
ExtensionShorten 
ExtensionDrag 
ExtensionCollide 
Invert 
Precision 

Definition at line 1945 of file draw_ops.cc.

◆ PaintCursorDrawingType

Enumerator
Curve 
Cursor2D 
Cursor3D 

Definition at line 23 of file paint_cursor.hh.

◆ PivotPositionMode

Enumerator
Origin 
Unmasked 
MaskBorder 
ActiveVert 
CursorSurface 

Definition at line 646 of file sculpt_transform.cc.

◆ TransformDisplacementMode

Enumerator
Original 
Incremental 

Definition at line 147 of file mesh/sculpt_intern.hh.

◆ UpdateType

Enumerator
Position 
Mask 
Visibility 
Color 
FaceSet 

Definition at line 127 of file mesh/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()

◆ accumulate_weighted_average_position()

◆ active_element_info_get()

std::optional< ActiveElementInfo > blender::ed::sculpt_paint::active_element_info_get ( ViewContext & vc,
const float2 & mval )

Retrieve the active vertex and active grid or face index.

Note
This API assumes that we are only interested in the current bounds of the BVH tree.

Definition at line 4512 of file sculpt.cc.

References active_element_info_get(), blender::ed::sculpt_paint::RaycastData::active_face_grid_index, blender::ed::sculpt_paint::ActiveElementInfo::active_face_idx, blender::ed::sculpt_paint::ActiveElementInfo::active_grid_idx, blender::ed::sculpt_paint::RaycastData::active_vertex, blender::BKE_base_is_visible(), blender::BKE_view_layer_base_find(), blender::BKE_view_layer_synced_ensure(), blender::ViewContext::bmain, blender::bke::pbvh::BMesh, blender::ed::sculpt_paint::RaycastData::corner_tris, blender::ed::sculpt_paint::RaycastData::corner_verts, blender::Object::data, blender::ViewContext::depsgraph, blender::ed::sculpt_paint::RaycastData::depth, blender::bke::Face, blender::ed::sculpt_paint::RaycastData::faces, 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::isect_ray_tri_watertight_v3_precalc(), blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, node, blender::ViewContext::obact, blender::ed::sculpt_paint::RaycastData::object, 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(), blender::Object::runtime, blender::ViewContext::rv3d, blender::ViewContext::scene, sculpt_raycast_cb(), blender::bke::ObjectRuntime::sculpt_session, blender::ed::sculpt_paint::RaycastData::subdiv_ccg, blender::SculptSession::subdiv_ccg, blender::ed::sculpt_paint::RaycastData::use_original, blender::ViewContext::v3d, blender::ed::sculpt_paint::ActiveElementInfo::vert, blender::ed::sculpt_paint::RaycastData::vert_positions, blender::bke::pbvh::vert_positions_eval(), vert_random_access_ensure(), and blender::ViewContext::view_layer.

Referenced by active_element_info_get(), and sample_mesh_attribute_color().

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

◆ 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 7652 of file sculpt.cc.

References apply_crazyspace_to_translations(), blender::BLI_assert(), blender::Editor, blender::Span< T >::index_range(), PRF_scope, blender::MutableSpan< T >::size(), blender::Span< T >::size(), and blender::math::transform_point().

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

◆ apply_translations() [1/3]

◆ 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 7592 of file sculpt.cc.

References apply_translations(), blender::BLI_assert(), blender::Span< T >::cast(), contains_nan(), blender::Editor, blender::Span< T >::index_range(), PRF_scope, and blender::Span< T >::size().

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 1411 of file sculpt.cc.

References area_center_calc_weighted(), and distance().

Referenced by accumulate_area_center(), and area_center_calc_weighted().

◆ 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 1404 of file sculpt.cc.

References area_normal_calc_weight(), and distance().

Referenced by accumulate_area_normal(), and area_normal_calc_weight().

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

◆ boundary_preview_pivot_draw()

◆ boundary_preview_update()

◆ brush_asset_activate_exec()

◆ brush_asset_delete_exec()

◆ brush_asset_delete_invoke()

◆ brush_asset_delete_poll()

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

◆ 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 170 of file brush_asset_ops.cc.

References blender::AS_asset_library_load(), blender::ID::asset_data, blender::bke::asset_edit_id_from_weak_reference(), blender::bke::asset_edit_id_save_as(), blender::ASSET_LIBRARY_LOCAL, blender::BKE_asset_metadata_catalog_id_set(), blender::BKE_asset_metadata_copy(), blender::BKE_asset_metadata_free(), blender::BKE_brush_duplicate(), blender::BKE_libblock_rename(), blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), blender::BKE_report(), blender::BLI_assert(), brush_asset_save_as_exec(), C, blender::asset_system::AssetCatalog::catalog_id, blender::CTX_data_main(), blender::asset_system::current_file_library_reference(), blender::asset_system::AssetCatalogPath::from_user_input(), blender::ed::asset::generate_preview(), blender::ed::asset::get_asset_library_from_opptr(), blender::Brush::id, blender::ID_BR, ID_IS_ASSET, blender::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, NC_ASSET, NC_BRUSH, ND_ASSET_LIST, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::wmOperator::ptr, blender::ed::asset::refresh_asset_library(), blender::wmOperator::reports, blender::RNA_enum_get(), blender::RNA_property_is_set(), blender::RNA_property_string_get(), blender::RNA_string_get(), blender::RNA_struct_find_property(), blender::RPT_ERROR, blender::RPT_WARNING, blender::ed::asset::shelf::show_catalog_in_visible_shelves(), blender::asset_system::AssetCatalog::simple_name, STRNCPY_UTF8, blender::USER_DUP_LINKED_ID, blender::USER_DUP_OBDATA, blender::ed::asset::user_library_to_library_ref(), blender::WM_file_tag_modified(), blender::WM_main_add_notifier(), and blender::WM_toolsystem_activate_brush_and_tool().

Referenced by brush_asset_save_as_exec(), and 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

◆ brush_asset_save_exec()

◆ brush_asset_save_poll()

◆ brush_cursor_poll()

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

Determines whether or not the brush cursor should be shown in the viewport

Definition at line 3855 of file sculpt.cc.

References brush_cursor_poll(), C, is_brush_related_tool(), paint_brush_cursor_poll(), and sculpt_mode_poll().

Referenced by brush_cursor_poll(), and mode_enter_generic().

◆ 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 4122 of file sculpt.cc.

References blender::SculptSession::active_vert(), blender::SculptSession::active_vert_position(), blender::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(), blender::BRUSH_CLOTH_DEFORM_SNAKE_HOOK, brush_delta_update(), blender::BRUSH_GRAB_ACTIVE_VERTEX, brush_needs_rake_rotation(), blender::BRUSH_STROKE_ANCHORED, brush_uses_topology_rake(), blender::SculptSession::cache, blender::copy_v2_v2(), blender::copy_v3_v3(), blender::bke::PaintRuntime::draw_anchored, blender::ED_view3d_win_to_3d(), ELEM, eps, blender::ed::sculpt_paint::SculptRakeData::follow_co, blender::ed::sculpt_paint::SculptRakeData::follow_dist, blender::ed::sculpt_paint::StrokeCache::grab_delta, blender::ed::sculpt_paint::StrokeCache::initial_mouse, blender::invert_m4_m4(), blender::is_zero_v3(), blender::len_squared_v3v3(), blender::ed::sculpt_paint::StrokeCache::location, blender::bke::pbvh::Mesh, blender::ed::sculpt_paint::StrokeCache::mouse_event, blender::mul_mat3_m4_v3(), blender::mul_v3_m4v3(), need_delta_for_tip_orientation(), need_delta_from_anchored_origin(), blender::normalize_v3(), blender::ed::sculpt_paint::StrokeCache::old_grab_location, blender::ed::sculpt_paint::StrokeCache::orig_grab_location, blender::PAINT_FALLOFF_SHAPE_TUBE, blender::bke::object::pbvh_get(), blender::bke::PaintRuntime::pixel_radius, blender::project_plane_v3_v3v3(), blender::ed::sculpt_paint::StrokeCache::radius, blender::ed::sculpt_paint::StrokeCache::rake_data, rake_data_update(), blender::ed::sculpt_paint::StrokeCache::rake_rotation, blender::ed::sculpt_paint::StrokeCache::rake_rotation_symm, blender::ViewContext::region, blender::Object::runtime, blender::SCULPT_BRUSH_TYPE_BOUNDARY, blender::SCULPT_BRUSH_TYPE_CLAY_STRIPS, blender::SCULPT_BRUSH_TYPE_CLAY_THUMB, blender::SCULPT_BRUSH_TYPE_CLOTH, blender::SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, blender::SCULPT_BRUSH_TYPE_GRAB, blender::SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE, blender::SCULPT_BRUSH_TYPE_NUDGE, blender::SCULPT_BRUSH_TYPE_PAINT, blender::SCULPT_BRUSH_TYPE_PINCH, blender::SCULPT_BRUSH_TYPE_PLANE, blender::SCULPT_BRUSH_TYPE_POSE, blender::SCULPT_BRUSH_TYPE_SMEAR, blender::SCULPT_BRUSH_TYPE_SNAKE_HOOK, blender::SCULPT_BRUSH_TYPE_THUMB, SCULPT_RAKE_BRUSH_FACTOR, blender::bke::ObjectRuntime::sculpt_session, sqrtf, blender::square_f(), stroke_is_first_brush_step_of_symmetry_pass(), blender::sub_v3_v3(), blender::sub_v3_v3v3(), blender::math::to_quaternion(), blender::v2, blender::ViewContext::v3d, blender::ed::sculpt_paint::StrokeCache::vc, vert_positions_for_grab_active_get(), blender::ed::sculpt_paint::StrokeCache::view_normal, and blender::zero_v3().

Referenced by brush_delta_update(), and stroke_cache_update().

◆ brush_dynamic_size_get()

◆ brush_exit_tex()

◆ brush_flip()

float blender::ed::sculpt_paint::brush_flip ( const Brush & brush,
const StrokeCache & cache )
static

Calculates the sign of the direction of the brush stroke, typically indicates whether the stroke will deform a surface inwards or outwards along the brush normal.

Definition at line 2249 of file sculpt.cc.

References blender::BRUSH_DIR_IN, brush_flip(), blender::ed::sculpt_paint::StrokeToggleSettings::invert, invert(), and blender::ed::sculpt_paint::StrokeCache::toggle_settings.

Referenced by brush_flip(), brush_strength(), and stroke_cache_init().

◆ brush_frontface_normal_from_falloff_shape()

◆ brush_init_tex()

◆ brush_needs_rake_rotation()

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

◆ BRUSH_OT_asset_activate()

◆ BRUSH_OT_asset_delete()

◆ BRUSH_OT_asset_edit_metadata()

◆ BRUSH_OT_asset_load_preview()

◆ BRUSH_OT_asset_revert()

◆ BRUSH_OT_asset_save()

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

◆ brush_strength()

float blender::ed::sculpt_paint::brush_strength ( const Sculpt & sd,
const StrokeCache & cache )
static

Return modified brush strength. Includes the direction of the brush, positive values pull vertices, negative values push. Uses tablet pressure and a special multiplier found experimentally to scale the strength factor.

Definition at line 2262 of file sculpt.cc.

References blender::BKE_brush_alpha_get(), blender::BKE_brush_use_alpha_pressure(), blender::BKE_curvemapping_evaluateF(), blender::BKE_paint_brush_for_read(), BLI_assert_unreachable, blender::BRUSH_CLOTH_DEFORM_EXPAND, blender::BRUSH_CLOTH_DEFORM_GRAB, blender::BRUSH_CLOTH_DEFORM_SNAKE_HOOK, brush_flip(), blender::BRUSH_MASK_DRAW, blender::BRUSH_MASK_SMOOTH, blender::BRUSH_PLANE_SWAP_HEIGHT_AND_DEPTH, brush_strength(), blender::bke::PaintRuntime::overlap_factor, blender::Sculpt::paint, blender::pow4f(), powf, blender::ed::sculpt_paint::StrokeCache::pressure, blender::Paint::runtime, blender::SCULPT_BRUSH_TYPE_BLOB, blender::SCULPT_BRUSH_TYPE_BLUR, blender::SCULPT_BRUSH_TYPE_BOUNDARY, blender::SCULPT_BRUSH_TYPE_CLAY, blender::SCULPT_BRUSH_TYPE_CLAY_STRIPS, blender::SCULPT_BRUSH_TYPE_CLAY_THUMB, blender::SCULPT_BRUSH_TYPE_CLOTH, blender::SCULPT_BRUSH_TYPE_CREASE, blender::SCULPT_BRUSH_TYPE_DISPLACEMENT_ERASER, blender::SCULPT_BRUSH_TYPE_DISPLACEMENT_SMEAR, blender::SCULPT_BRUSH_TYPE_DRAW, blender::SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, blender::SCULPT_BRUSH_TYPE_DRAW_SHARP, blender::SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, blender::SCULPT_BRUSH_TYPE_GRAB, blender::SCULPT_BRUSH_TYPE_INFLATE, blender::SCULPT_BRUSH_TYPE_LAYER, blender::SCULPT_BRUSH_TYPE_MASK, blender::SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE, blender::SCULPT_BRUSH_TYPE_NUDGE, blender::SCULPT_BRUSH_TYPE_PAINT, blender::SCULPT_BRUSH_TYPE_PINCH, blender::SCULPT_BRUSH_TYPE_PLANE, blender::SCULPT_BRUSH_TYPE_POSE, blender::SCULPT_BRUSH_TYPE_ROTATE, blender::SCULPT_BRUSH_TYPE_SCENE_PROJECT, blender::SCULPT_BRUSH_TYPE_SIMPLIFY, blender::SCULPT_BRUSH_TYPE_SLIDE_RELAX, blender::SCULPT_BRUSH_TYPE_SMEAR, blender::SCULPT_BRUSH_TYPE_SMOOTH, blender::SCULPT_BRUSH_TYPE_SNAKE_HOOK, and blender::SCULPT_BRUSH_TYPE_THUMB.

Referenced by brush_strength(), and blender::ed::sculpt_paint::SculptPaintStroke::update_step().

◆ brush_strength_factor()

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

◆ brush_strength_get()

◆ brush_stroke_init()

◆ brush_stroke_modal()

◆ 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

◆ brush_type_is_paint()

◆ brush_type_needs_all_pbvh_nodes()

◆ brush_type_needs_original()

◆ brush_unprojected_size_update()

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

void blender::ed::sculpt_paint::cache_calc_brushdata_symm ( ed::sculpt_paint::StrokeCache & cache,
ePaintSymmetryFlags symm,
char axis,
float angle )

Flip all the edit-data across the axis/axes specified by symm. Used to calculate multiple modifications to the mesh when symmetry is enabled.

Definition at line 3725 of file sculpt.cc.

References angle(), cache_calc_brushdata_symm(), flip_qt_qt(), frac(), blender::ed::sculpt_paint::StrokeCache::grab_delta, blender::ed::sculpt_paint::StrokeCache::grab_delta_symm, blender::ed::sculpt_paint::StrokeCache::gravity_direction, blender::ed::sculpt_paint::StrokeCache::gravity_direction_symm, blender::MatBase< float, 4, 4 >::identity(), blender::ed::sculpt_paint::StrokeCache::initial_location, blender::ed::sculpt_paint::StrokeCache::initial_location_symm, blender::ed::sculpt_paint::StrokeCache::initial_normal, blender::ed::sculpt_paint::StrokeCache::initial_normal_symm, blender::ed::sculpt_paint::StrokeCache::last_location, blender::ed::sculpt_paint::StrokeCache::last_location_symm, blender::ed::sculpt_paint::StrokeCache::location, blender::ed::sculpt_paint::StrokeCache::location_symm, blender::mul_m4_v3(), blender::mul_v3_fl(), blender::PAINT_SYMMETRY_FEATHER, blender::ed::sculpt_paint::StrokeCache::plane_offset, blender::gpu::shader::metadata::printf, blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::ed::sculpt_paint::StrokeCache::rake_rotation, blender::ed::sculpt_paint::StrokeCache::rake_rotation_symm, blender::rotate_m4(), blender::ed::sculpt_paint::StrokeCache::supports_gravity, blender::ed::sculpt_paint::StrokeCache::symm_rot_mat, blender::ed::sculpt_paint::StrokeCache::symm_rot_mat_inv, symmetry_flip(), blender::ed::sculpt_paint::StrokeCache::tip_motion_normal, blender::ed::sculpt_paint::StrokeCache::tip_motion_normal_symm, blender::ed::sculpt_paint::StrokeCache::view_normal, blender::ed::sculpt_paint::StrokeCache::view_normal_symm, and blender::zero_v3().

Referenced by cache_calc_brushdata_symm(), do_radial_symmetry(), do_radial_symmetry_with_tiling(), do_symmetrical_brush_actions(), do_symmetrical_brush_actions_with_tiling_and_feathering(), and blender::WeightPaintStroke::update_step().

◆ cache_paint_brush_variants_update()

◆ calc_area_center()

◆ calc_area_normal()

◆ calc_area_normal_and_center()

◆ calc_area_normal_and_center_node_bmesh()

void blender::ed::sculpt_paint::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

◆ calc_area_normal_and_center_node_grids()

void blender::ed::sculpt_paint::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

◆ calc_area_normal_and_center_node_mesh()

◆ calc_area_normal_and_center_reduce()

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

◆ 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 7370 of file sculpt.cc.

References calc_brush_distances(), calc_brush_distances_squared(), blender::Editor, and PRF_scope.

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(), blender::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::image::do_paint_pixels(), blender::ed::sculpt_paint::color::do_sample_wet_paint_task(), blender::ed::sculpt_paint::color::do_smear_brush_task(), blender::do_vpaint_brush_blur_loops(), blender::do_vpaint_brush_blur_verts(), blender::do_vpaint_brush_smear(), blender::do_wpaint_brush_blur(), blender::do_wpaint_brush_draw(), blender::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 blender::vpaint_do_draw().

◆ calc_brush_distances_squared() [1/2]

◆ calc_brush_distances_squared() [2/2]

◆ calc_brush_local_mat()

void blender::ed::sculpt_paint::calc_brush_local_mat ( const float3 & tip_normal,
const float3 & motion_normal_local,
const float3 & tip_location,
const float radius,
float local_mat[4][4],
float local_mat_inv[4][4] )

Calculates the local matrix of the brush and its inverse, which are used to transform points from object-space to brush-space and vice versa respectively.

Parameters
tip_normalTip normal is the sculpt normal under spherical falloff, but when under projected falloff, it is the view normal.
motion_normal_localNormal direction of the brush motion. Calculate with calc_motion_normal_from_angle.

Definition at line 2830 of file sculpt.cc.

References calc_brush_local_mat(), blender::copy_m4_m4(), blender::copy_v3_v3(), blender::cross_v3_v3v3(), blender::invert_m4_m4(), blender::mul_m4_m4m4(), blender::normalize_m4(), blender::normalize_v3_v3(), scale(), blender::scale_m4_fl(), and blender::v.

Referenced by calc_brush_local_mat(), calc_brush_node_mask(), cube_tip_init(), cursor_space_drawing_setup(), and update_brush_local_mat().

◆ calc_brush_node_mask()

brushes::CursorSampleResult blender::ed::sculpt_paint::calc_brush_node_mask ( const Depsgraph & depsgraph,
const Sculpt & sd,
Object & ob,
const Brush & brush,
IndexMaskMemory & memory )
static

◆ 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 3062 of file sculpt.cc.

References blender::BLI_assert(), blender::BRUSH_ORIGINAL_NORMAL, blender::BRUSH_ORIGINAL_PLANE, blender::SculptSession::cache, calc_area_center(), calc_area_normal_and_center(), calc_brush_plane(), 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(), blender::PAINT_FALLOFF_SHAPE_TUBE, blender::ed::sculpt_paint::StrokeCache::plane_offset, blender::project_plane_v3_v3v3(), blender::Object::runtime, blender::SCULPT_BRUSH_TYPE_PLANE, blender::SCULPT_DISP_DIR_AREA, blender::SCULPT_DISP_DIR_VIEW, blender::SCULPT_DISP_DIR_X, blender::SCULPT_DISP_DIR_Y, blender::SCULPT_DISP_DIR_Z, blender::ed::sculpt_paint::StrokeCache::sculpt_normal, blender::bke::ObjectRuntime::sculpt_session, stroke_is_first_brush_step_of_symmetry_pass(), 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, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.

Referenced by calc_brush_plane(), 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_cube_tip_factors_common_bmesh()

◆ calc_cube_tip_factors_common_grids()

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

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

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

Disable brush influence when vertex normals point away from the view.

Definition at line 7223 of file sculpt.cc.

References blender::BLI_assert(), calc_front_face(), blender::math::dot(), dot(), blender::Editor, blender::Span< T >::index_range(), PRF_scope, blender::MutableSpan< T >::size(), and blender::Span< T >::size().

Referenced by blender::ed::sculpt_paint::brushes::calc_bmesh(), calc_cube_tip_factors_common_bmesh(), calc_cube_tip_factors_common_grids(), 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(), calc_front_face(), calc_front_face(), calc_front_face(), calc_front_face(), calc_front_face(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::ed::sculpt_paint::color::do_sample_wet_paint_task(), blender::ed::sculpt_paint::color::do_smear_brush_task(), blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_grids(), and blender::ed::sculpt_paint::brushes::sample_node_surface_mesh().

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

◆ calc_local_positions() [1/4]

◆ calc_local_positions() [2/4]

◆ calc_local_positions() [3/4]

void blender::ed::sculpt_paint::calc_local_positions ( Span< float3 > vert_positions,
Span< int > verts,
const float4x4 & mat,
const float3 & plane_center,
const float3 & view_normal,
eBrushFalloffShape falloff_shape,
MutableSpan< float2 > xy_positions,
MutableSpan< float > z_positions )

Transforms positions from object space positions to brush-local space and then splits the XY and Z components. This gives slightly better performance for brushes that only need the XY components for certain calculations. For tube falloff shape, positions are first projected onto the view plane.

Definition at line 6670 of file sculpt.cc.

References blender::BLI_assert(), calc_local_positions(), blender::closest_to_plane_normalized_v3(), blender::Editor, blender::Span< T >::index_range(), blender::PAINT_FALLOFF_SHAPE_TUBE, blender::plane_from_point_normal_v3(), position, PRF_scope, blender::MutableSpan< T >::size(), blender::Span< T >::size(), and blender::math::transform_point().

◆ calc_local_positions() [4/4]

void blender::ed::sculpt_paint::calc_local_positions ( Span< float3 > vert_positions,
Span< int > verts,
const float4x4 & mat,
const float3 & plane_center,
const float3 & view_normal,
eBrushFalloffShape falloff_shape,
MutableSpan< float3 > local_positions )

◆ calc_motion_normal_from_angle()

float3 blender::ed::sculpt_paint::calc_motion_normal_from_angle ( const ViewContext & vc,
const float3 & tip_location,
const float angle )

◆ calc_overlap()

◆ calc_radial_symmetry_feather()

float blender::ed::sculpt_paint::calc_radial_symmetry_feather ( const Mesh & mesh,
const StrokeCache & cache,
const ePaintSymmetryFlags symm,
const char axis )
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_symmetry_feather()

float blender::ed::sculpt_paint::calc_symmetry_feather ( const Paint & paint,
const ePaintSymmetryFlags symm,
const Mesh & mesh,
const StrokeCache & cache )
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 7949 of file sculpt.cc.

References append_neighbors_to_vector(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), blender::BLI_assert(), calc_vert_neighbors(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::Editor, blender::Span< T >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), PRF_scope, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and blender::offset_indices::OffsetIndices< T >::total_size().

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]

◆ 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,
const Set< OrderedEdge > & boundary_edges,
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,
const Set< OrderedEdge > & boundary_edges,
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 8099 of file sculpt.cc.

References calc_vert_neighbors_interior(), and calc_vert_neighbors_interior_impl().

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(), blender::ed::sculpt_paint::tests::TEST_F(), and blender::ed::sculpt_paint::tests::TEST_F().

◆ calc_vert_neighbors_interior_impl()

◆ calc_vertex_displacement()

◆ cancel_modal_transform()

◆ check_vertex_pivot_symmetry()

◆ 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 7664 of file sculpt.cc.

References blender::math::abs(), blender::BLI_assert(), blender::SculptSession::cache, clip_and_lock_translations(), blender::ClipX, blender::Editor, blender::Sculpt::flags, blender::Span< T >::index_range(), blender::ed::sculpt_paint::StrokeCache::mirror_modifier_clip, PRF_scope, blender::SCULPT_LOCK_X, blender::MutableSpan< T >::size(), blender::Span< T >::size(), and blender::math::transform_point().

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 5432 of file sculpt.cc.

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

Referenced by color_supported_check(), blender::ed::sculpt_paint::mask::mask_by_color(), sample_color_exec(), 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]

◆ create_node_vert_offsets_bmesh()

◆ create_toggle_settings()

◆ cube_tip_init()

◆ cursor_geometry_info_update() [1/2]

std::optional< CursorGeometryInfo > blender::ed::sculpt_paint::cursor_geometry_info_update ( bContext * C,
const float2 & mval,
bool use_sampled_normal )

◆ cursor_geometry_info_update() [2/2]

std::optional< CursorGeometryInfo > blender::ed::sculpt_paint::cursor_geometry_info_update ( Depsgraph & depsgraph,
const Paint & paint,
const Sculpt * sd,
ViewContext & vc,
const Base * base,
const float2 & mval,
const bool use_sampled_normal )

Definition at line 4597 of file sculpt.cc.

References blender::ed::sculpt_paint::RaycastData::active_face_grid_index, blender::SculptSession::active_face_index, blender::SculptSession::active_grid_index, blender::ed::sculpt_paint::RaycastData::active_vertex, blender::BKE_base_is_visible(), blender::BKE_paint_brush_for_read(), blender::bke::pbvh::BMesh, blender::SculptSession::cache, calc_area_normal(), blender::SculptSession::clear_active_elements(), blender::ed::sculpt_paint::RaycastData::corner_tris, blender::ed::sculpt_paint::RaycastData::corner_verts, cursor_geometry_info_update(), blender::SculptSession::cursor_location, blender::SculptSession::cursor_normal, blender::SculptSession::cursor_radius, blender::SculptSession::cursor_sampled_normal, blender::SculptSession::cursor_view_normal, blender::Object::data, blender::ed::sculpt_paint::RaycastData::depth, distance(), blender::Editor, 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, blender::isect_ray_tri_watertight_v3_precalc(), blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, node, blender::math::normalize(), blender::ViewContext::obact, blender::ed::sculpt_paint::RaycastData::object, object_space_radius_get(), blender::gpu::shader::metadata::out, pbvh_gather_cursor_update(), blender::bke::object::pbvh_get(), PRF_scope, blender::ed::sculpt_paint::RaycastData::ray_normal, blender::ed::sculpt_paint::RaycastData::ray_start, blender::bke::pbvh::raycast(), raycast_init(), blender::Object::runtime, blender::SculptSession::rv3d, blender::ViewContext::rv3d, sculpt_raycast_cb(), blender::bke::ObjectRuntime::sculpt_session, blender::SculptSession::set_active_vert(), stroke_modifiers_check(), blender::ed::sculpt_paint::RaycastData::subdiv_ccg, blender::SculptSession::subdiv_ccg, blender::math::transform_direction(), blender::bke::pbvh::update_normals(), blender::ed::sculpt_paint::RaycastData::use_original, blender::SculptSession::v3d, blender::ViewContext::v3d, blender::ed::sculpt_paint::RaycastData::vert_positions, blender::bke::pbvh::vert_positions_eval(), vert_random_access_ensure(), blender::RegionView3D::viewinv, and blender::bke::ObjectRuntime::world_to_object.

◆ cursor_space_drawing_setup()

◆ cursor_space_overlays_draw()

◆ curve_mask_allocate()

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

◆ curve_mask_free()

◆ CURVES_OT_sculptmode_toggle()

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

◆ curves_sculptmode_enter()

◆ curves_sculptmode_exit()

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

◆ curves_sculptmode_toggle_exec()

◆ diameter_to_curve_mask_size()

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

◆ do_brush_action()

void blender::ed::sculpt_paint::do_brush_action ( const Depsgraph & depsgraph,
const Scene & scene,
const Brush & brush,
Object & ob,
PaintModeData *  )
static

Definition at line 3467 of file sculpt.cc.

References blender::ed::sculpt_paint::StrokeToggleSettings::alt_smooth, blender::BKE_brush_has_cube_tip(), blender::BKE_curvemapping_evaluateF(), blender::BLI_assert(), blender::BRUSH_AUTOMASKING_CAVITY_ALL, blender::BRUSH_DEFORM_TARGET_CLOTH_SIM, blender::BRUSH_MASK_DRAW, blender::BRUSH_MASK_SMOOTH, blender::ed::sculpt_paint::cloth::brush_simulation_create(), blender::BRUSH_SMOOTH_DEFORM_LAPLACIAN, blender::BRUSH_SMOOTH_DEFORM_SURFACE, blender::BRUSH_SMOOTH_PRESSURE, blender::ed::sculpt_paint::cloth::brush_store_simulation_state(), brush_uses_topology_rake(), brush_uses_vector_displacement(), blender::ed::sculpt_paint::StrokeCache::bstrength, blender::SculptSession::cache, calc_brush_node_mask(), blender::ed::sculpt_paint::auto_mask::Cache::calc_cavity_factor(), blender::ed::sculpt_paint::StrokeCache::cloth_sim, blender::ed::sculpt_paint::brushes::do_blob_brush(), blender::ed::sculpt_paint::color::do_blur_brush(), blender::ed::sculpt_paint::brushes::do_bmesh_topology_rake_brush(), blender::ed::sculpt_paint::boundary::do_boundary_brush(), do_brush_action(), 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::brushes::do_scene_project_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(), blender::Editor, ELEM, blender::ed::sculpt_paint::cloth::ensure_nodes_constraints(), blender::ed::sculpt_paint::auto_mask::Settings::flags, blender::ed::sculpt_paint::StrokeCache::initial_direction_flipped, blender::index_mask::IndexMask::is_empty(), blender::ed::sculpt_paint::auto_mask::is_enabled(), blender::ed::sculpt_paint::StrokeCache::location, blender::ed::sculpt_paint::StrokeCache::location_symm, blender::ed::sculpt_paint::brushes::CursorSampleResult::node_mask, blender::Sculpt::paint, blender::bke::object::pbvh_get(), blender::ed::sculpt_paint::brushes::CursorSampleResult::plane_center, blender::ed::sculpt_paint::brushes::CursorSampleResult::plane_normal, blender::ed::sculpt_paint::StrokeCache::pressure, PRF_scope, PRF_scope_set_dynamic_name, blender::math::project_point(), push_undo_nodes(), blender::Object::runtime, blender::SculptSession::rv3d, blender::Sculpt, blender::ToolSettings::sculpt, sculpt_brush_needs_normal(), blender::SCULPT_BRUSH_TYPE_BLOB, blender::SCULPT_BRUSH_TYPE_BLUR, blender::SCULPT_BRUSH_TYPE_BOUNDARY, blender::SCULPT_BRUSH_TYPE_CLAY, blender::SCULPT_BRUSH_TYPE_CLAY_STRIPS, blender::SCULPT_BRUSH_TYPE_CLAY_THUMB, blender::SCULPT_BRUSH_TYPE_CLOTH, blender::SCULPT_BRUSH_TYPE_CREASE, blender::SCULPT_BRUSH_TYPE_DISPLACEMENT_ERASER, blender::SCULPT_BRUSH_TYPE_DISPLACEMENT_SMEAR, blender::SCULPT_BRUSH_TYPE_DRAW, blender::SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, blender::SCULPT_BRUSH_TYPE_DRAW_SHARP, blender::SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, blender::SCULPT_BRUSH_TYPE_GRAB, blender::SCULPT_BRUSH_TYPE_INFLATE, blender::SCULPT_BRUSH_TYPE_LAYER, blender::SCULPT_BRUSH_TYPE_MASK, blender::SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE, sculpt_brush_type_name(), blender::SCULPT_BRUSH_TYPE_NUDGE, blender::SCULPT_BRUSH_TYPE_PAINT, blender::SCULPT_BRUSH_TYPE_PINCH, blender::SCULPT_BRUSH_TYPE_PLANE, blender::SCULPT_BRUSH_TYPE_POSE, blender::SCULPT_BRUSH_TYPE_ROTATE, blender::SCULPT_BRUSH_TYPE_SCENE_PROJECT, blender::SCULPT_BRUSH_TYPE_SIMPLIFY, blender::SCULPT_BRUSH_TYPE_SLIDE_RELAX, blender::SCULPT_BRUSH_TYPE_SMEAR, blender::SCULPT_BRUSH_TYPE_SMOOTH, blender::SCULPT_BRUSH_TYPE_SNAKE_HOOK, blender::SCULPT_BRUSH_TYPE_THUMB, blender::bke::ObjectRuntime::sculpt_session, blender::ed::sculpt_paint::auto_mask::Cache::settings, blender::ed::sculpt_paint::cloth::sim_activate_nodes(), blender::ed::sculpt_paint::auto_mask::stroke_cache_ensure(), stroke_is_first_brush_step_of_symmetry_pass(), stroke_is_main_symmetry_pass(), blender::bke::paint::stroke_track_location(), blender::bke::brush::supports_auto_smooth_pressure(), blender::ed::sculpt_paint::StrokeCache::supports_gravity, blender::ed::sculpt_paint::StrokeCache::toggle_settings, blender::Scene::toolsettings, update_brush_local_mat(), blender::bke::pbvh::update_normals(), update_sculpt_normal(), and blender::RegionView3D::view_render.

Referenced by do_brush_action(), and blender::ed::sculpt_paint::SculptPaintStroke::update_step().

◆ do_radial_symmetry()

void blender::ed::sculpt_paint::do_radial_symmetry ( const Depsgraph & depsgraph,
const Scene & scene,
const Paint & ,
const Brush & brush,
Object & object,
const BrushActionFn action_fn,
PaintModeData * paint_mode_data,
const ePaintSymmetryFlags symm,
const int axis )
static

◆ do_radial_symmetry_with_tiling()

void blender::ed::sculpt_paint::do_radial_symmetry_with_tiling ( const Depsgraph & depsgraph,
const Scene & scene,
const Paint & paint,
const Brush & brush,
Object & object,
const BrushActionFn action_fn,
PaintModeData * paint_mode_data,
const ePaintSymmetryFlags symm,
const int axis )
static

◆ do_symmetrical_brush_actions()

◆ do_symmetrical_brush_actions_with_tiling_and_feathering()

◆ do_tiled()

◆ draw_bezier_handle_lines()

◆ 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 & scene,
const Brush & brush,
Object & ob,
PaintModeData *  )
static

Definition at line 3157 of file sculpt.cc.

References blender::ed::sculpt_paint::StrokeCache::accum, blender::BKE_pbvh_bmesh_node_save_orig(), blender::BKE_pbvh_node_mark_topology_update(), blender::SculptSession::bm, blender::SculptSession::bm_log, blender::bke::pbvh::bmesh_update_topology(), blender::SculptSession::boundary_info_cache, blender::BRUSH_FRONTFACE, blender::ed::sculpt_paint::dyntopo::detail_size::brush_to_detail_size(), brush_type_needs_original(), blender::SculptSession::cache, blender::Sculpt::constant_detail, blender::ed::sculpt_paint::dyntopo::detail_size::constant_to_detail_size(), blender::Sculpt::detail_percent, blender::Sculpt::detail_size, dynamic_topology_update(), blender::ed::sculpt_paint::StrokeCache::dyntopo_pixel_radius, blender::ed::sculpt_paint::dyntopo::detail_size::EDGE_LENGTH_MIN_FACTOR, blender::Sculpt::flags, blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), blender::index_mask::IndexMask::is_empty(), blender::ed::sculpt_paint::StrokeCache::location_symm, blender::ed::sculpt_paint::undo::Mask, blender::PAINT_FALLOFF_SHAPE_SPHERE, blender::PBVH_Collapse, pbvh_gather_generic(), blender::bke::object::pbvh_get(), blender::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(), blender::Object::runtime, blender::ToolSettings::sculpt, blender::SCULPT_BRUSH_TYPE_MASK, blender::SCULPT_BRUSH_TYPE_SIMPLIFY, blender::SCULPT_DYNTOPO_COLLAPSE, blender::SCULPT_DYNTOPO_DETAIL_BRUSH, blender::SCULPT_DYNTOPO_DETAIL_CONSTANT, blender::SCULPT_DYNTOPO_DETAIL_MANUAL, blender::SCULPT_DYNTOPO_SUBDIVIDE, blender::bke::ObjectRuntime::sculpt_session, blender::Scene::toolsettings, blender::true, blender::U, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.

Referenced by dynamic_topology_update(), and blender::ed::sculpt_paint::SculptPaintStroke::update_step().

◆ elastic_transform_node_bmesh()

◆ elastic_transform_node_grids()

◆ elastic_transform_node_mesh()

◆ end_transform()

◆ ensure_drawing_for_autokey()

◆ ensure_editable_drawings()

◆ ensure_valid_pivot()

◆ ENUM_OPERATORS()

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

References ENUM_OPERATORS().

Referenced by ENUM_OPERATORS().

◆ face_set_extract_invoke()

◆ face_set_overlay_check()

◆ fake_neighbor_init()

◆ fake_neighbor_search()

◆ fake_neighbor_search_bmesh()

◆ fake_neighbor_search_grids()

◆ fake_neighbor_search_mesh()

◆ fake_neighbors_ensure()

Span< int > blender::ed::sculpt_paint::fake_neighbors_ensure ( const Depsgraph & depsgraph,
Object & ob,
float max_dist )

This allows the sculpt brushes to work on meshes with multiple connected components as if they had only one connected component. These neighbors are calculated for each vertex using the minimum distance to a vertex that is in a different connected component.

Definition at line 6230 of file sculpt.cc.

References blender::SculptFakeNeighbors::current_max_distance, blender::ed::sculpt_paint::islands::ensure_cache(), blender::SculptFakeNeighbors::fake_neighbor_index, fake_neighbor_init(), fake_neighbor_search(), blender::SculptSession::fake_neighbors, fake_neighbors_ensure(), blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), blender::Object::runtime, and blender::bke::ObjectRuntime::sculpt_session.

Referenced by fake_neighbors_ensure(), and blender::ed::sculpt_paint::pose::ik_chain_init().

◆ fake_neighbors_free()

◆ fill_active_color()

◆ 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,
const bool only_visible = false )
static

◆ fill_factor_from_hide() [1/3]

◆ fill_factor_from_hide() [2/3]

◆ fill_factor_from_hide() [3/3]

◆ fill_factor_from_hide_and_mask() [1/3]

◆ 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 7128 of file sculpt.cc.

References blender::BLI_assert(), blender::Editor, blender::MutableSpan< T >::fill(), fill_factor_from_hide_and_mask(), blender::Span< T >::index_range(), blender::Span< T >::is_empty(), PRF_scope, blender::MutableSpan< T >::size(), and blender::Span< T >::size().

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::brushes::calc_bmesh(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), calc_cube_tip_factors_common_bmesh(), calc_cube_tip_factors_common_grids(), 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(), 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(), 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::color::do_sample_wet_paint_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(), blender::ed::sculpt_paint::face_set::gesture_apply_mesh(), 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(), transform_node_bmesh(), transform_node_grids(), and transform_node_mesh().

◆ fill_mesh_color()

void blender::ed::sculpt_paint::fill_mesh_color ( Mesh & mesh,
const ColorPaint4f & color,
const StringRef name,
const bool use_vert_sel,
const bool use_face_sel,
const bool affect_alpha,
const bool only_visible = false )
static

◆ 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,
const bool only_visible = false )
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 )

◆ 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 7422 of file sculpt.cc.

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

Referenced by blender::ed::sculpt_paint::brushes::calc_bmesh(), calc_cube_tip_factors_common_bmesh(), calc_cube_tip_factors_common_grids(), 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(), blender::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::image::do_paint_pixels(), blender::ed::sculpt_paint::color::do_sample_wet_paint_task(), blender::ed::sculpt_paint::color::do_smear_brush_task(), blender::do_vpaint_brush_blur_loops(), blender::do_vpaint_brush_blur_verts(), blender::do_vpaint_brush_smear(), blender::do_wpaint_brush_blur(), blender::do_wpaint_brush_draw(), blender::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 blender::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 7285 of file sculpt.cc.

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

Referenced by blender::ed::sculpt_paint::brushes::calc_bmesh(), calc_cube_tip_factors_common_bmesh(), calc_cube_tip_factors_common_grids(), 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(), blender::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(), blender::do_vpaint_brush_blur_loops(), blender::do_vpaint_brush_blur_verts(), blender::do_vpaint_brush_smear(), blender::do_wpaint_brush_blur(), blender::do_wpaint_brush_draw(), blender::do_wpaint_brush_smear(), filter_region_clip_factors(), filter_region_clip_factors(), blender::ed::sculpt_paint::face_set::gesture_apply_bmesh(), blender::ed::sculpt_paint::face_set::gesture_apply_mesh(), 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 blender::vpaint_do_draw().

◆ filter_translations()

◆ filter_translations_with_symmetry()

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

std::array< int, PAINT_SYMM_AREAS > blender::ed::sculpt_paint::find_all_symm_verts ( const Depsgraph & depsgraph,
const Object & object,
const int original_vert,
const float max_distance )

◆ find_all_symm_verts_bmesh()

◆ find_all_symm_verts_grids()

◆ find_all_symm_verts_mesh()

std::array< int, PAINT_SYMM_AREAS > blender::ed::sculpt_paint::find_all_symm_verts_mesh ( const Depsgraph & depsgraph,
const Object & object,
int original_vert,
float max_distance = std::numeric_limits< float >::max() )

◆ find_curves_brush_position()

◆ find_symm_verts()

◆ find_symm_verts_bmesh()

◆ find_symm_verts_grids()

◆ find_symm_verts_mesh()

◆ finish_pivot_change()

◆ flip_qt()

void blender::ed::sculpt_paint::flip_qt ( float quat[4],
const ePaintSymmetryFlags symm )
static

Definition at line 3017 of file sculpt.cc.

References flip_qt(), and flip_qt_qt().

Referenced by flip_qt(), and flip_quat_by_symm_area().

◆ flip_qt_qt()

◆ flip_quat_by_symm_area()

void blender::ed::sculpt_paint::flip_quat_by_symm_area ( float quat[4],
const ePaintSymmetryFlags symm,
const ePaintSymmetryAreas symmarea,
const float pivot[3] )

◆ flip_v3_by_symm_area()

float3 blender::ed::sculpt_paint::flip_v3_by_symm_area ( const float3 & vector,
const ePaintSymmetryFlags symm,
const ePaintSymmetryAreas symmarea,
const float3 & pivot )

◆ float_selection_ensure()

◆ flush_update_done() [1/2]

◆ flush_update_done() [2/2]

◆ flush_update_step() [1/2]

◆ flush_update_step() [2/2]

◆ 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 6497 of file sculpt.cc.

References blender::BLI_assert(), blender::Editor, gather_bmesh_positions(), PRF_scope, blender::MutableSpan< T >::size(), and blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size().

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]

◆ gather_brush_nodes()

◆ gather_data_bmesh() [1/2]

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

◆ 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 6528 of file sculpt.cc.

References blender::BKE_subdiv_ccg_key_top_level(), blender::BLI_assert(), blender::MutableSpan< T >::copy_from(), blender::Editor, gather_data_grids(), blender::CCGKey::grid_area, blender::bke::ccg::grid_range(), blender::Span< T >::index_range(), PRF_scope, 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 94 of file mesh_brush_common.hh.

References blender::Editor, blender::array_utils::gather(), gather_data_mesh(), PRF_scope, and blender::exec_mode::serial.

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(), 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_grids_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 150 of file mesh_brush_common.hh.

References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::BKE_subdiv_ccg_key_top_level(), blender::Editor, gather_data_grids(), gather_grids_positions(), blender::CCGKey::grid_area, blender::SubdivCCG::positions, PRF_scope, 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(), gather_grids_positions(), blender::ed::sculpt_paint::face_set::gesture_apply_mesh(), and blender::ed::sculpt_paint::brushes::sample_node_surface_grids().

◆ gather_nodes()

◆ geometry_extract_apply()

wmOperatorStatus blender::ed::sculpt_paint::geometry_extract_apply ( bContext * C,
wmOperator * op,
GeometryExtractTagMeshFunc * tag_fn,
GeometryExtractParams * params )
static

Definition at line 81 of file sculpt_mask_extract.cc.

References blender::ed::sculpt_paint::GeometryExtractParams::add_boundary_loop, blender::ed::sculpt_paint::GeometryExtractParams::add_solidify, blender::ed::object::add_type(), blender::ed::sculpt_paint::GeometryExtractParams::apply_shrinkwrap, blender::BKE_id_copy(), blender::BKE_id_free(), blender::BKE_mesh_batch_cache_dirty_tag(), blender::BKE_MESH_BATCH_DIRTY_ALL, blender::BKE_mesh_from_bmesh_nomain(), blender::BKE_mesh_nomain_to_mesh(), blender::BKE_modifiers_findby_name(), blender::BKE_shrinkwrap_mesh_nearest_surface_deform(), blender::bm, blender::BM_EDGE, blender::BM_edge_is_boundary(), blender::BM_EDGES_OF_MESH, BM_elem_flag_set, blender::BM_ELEM_SELECT, blender::BM_ELEM_TAG, blender::BM_FACE, BM_ITER_MESH, blender::BM_mesh_bm_from_me(), blender::BM_mesh_create(), blender::BM_mesh_delete_hflag_context(), blender::BM_mesh_elem_hflag_disable_all(), blender::BM_mesh_free(), blender::BM_VERT, blender::BM_vert_is_boundary(), blender::BM_VERTS_OF_MESH, BMALLOC_TEMPLATE_FROM_ME, C, blender::BMeshFromMeshParams::calc_face_normal, blender::BMeshToMeshParams::calc_object_remap, blender::BMeshFromMeshParams::calc_vert_normal, blender::BMVert::co, blender::CTX_data_active_object(), blender::CTX_data_depsgraph_on_load(), blender::CTX_data_depsgraph_pointer(), blender::CTX_data_ensure_evaluated_depsgraph(), blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_wm_view3d(), blender::Object::data, blender::DEG_id_tag_update(), blender::DEG_relations_tag_update(), blender::DEL_FACES, blender::EDBM_extrude_edges_indiv(), blender::EDBM_smooth_vert(), blender::eModifierType_Solidify, geometry_extract_apply(), blender::Object::id, blender::ID_RECALC_GEOMETRY, blender::Object::loc, blender::View3D::local_view_uid, blender::View3D::localvd, blender::ed::object::modifier_add(), blender::mul_v3_v3(), NC_GEOM, NC_OBJECT, ND_DATA, ND_MODIFIER, blender::ed::sculpt_paint::GeometryExtractParams::num_smooth_iterations, blender::OB_MESH, object_sculpt_mode_exit(), blender::SolidifyModifierData::offset, blender::OPERATOR_FINISHED, blender::wmOperator::reports, blender::Object::rot, blender::Object::scale, blender::BMeshCreateParams::use_toolflags, blender::v, blender::Mesh::verts_num, and blender::WM_event_add_notifier().

Referenced by face_set_extract_invoke(), geometry_extract_apply(), and paint_mask_extract_exec().

◆ geometry_extract_poll()

◆ geometry_extract_props()

void blender::ed::sculpt_paint::geometry_extract_props ( StructRNA * srna)
static

◆ geometry_extract_tag_face_set()

◆ geometry_extract_tag_masked_faces()

◆ geometry_preview_lines_draw()

◆ geometry_preview_lines_update()

◆ get_active_vertex_position()

◆ 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_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 104 of file draw_ops.cc.

References blender::BKE_paint_brush_for_read(), blender::BKE_paint_get_active_from_context(), blender::BKE_paintmode_get_active_from_context(), BLI_assert_unreachable, C, blender::Erase, get_stroke_operation(), blender::GPAINT_BRUSH_TYPE_DRAW, blender::GPAINT_BRUSH_TYPE_ERASE, blender::GPAINT_BRUSH_TYPE_FILL, blender::GPAINT_BRUSH_TYPE_TINT, blender::GPencil, blender::GPSCULPT_BRUSH_TYPE_CLONE, blender::GPSCULPT_BRUSH_TYPE_GRAB, blender::GPSCULPT_BRUSH_TYPE_PINCH, blender::GPSCULPT_BRUSH_TYPE_PUSH, blender::GPSCULPT_BRUSH_TYPE_RANDOMIZE, blender::GPSCULPT_BRUSH_TYPE_SMOOTH, blender::GPSCULPT_BRUSH_TYPE_STRENGTH, blender::GPSCULPT_BRUSH_TYPE_THICKNESS, blender::GPSCULPT_BRUSH_TYPE_TWIST, blender::GPVERTEX_BRUSH_TYPE_AVERAGE, blender::GPVERTEX_BRUSH_TYPE_BLUR, blender::GPVERTEX_BRUSH_TYPE_DRAW, blender::GPVERTEX_BRUSH_TYPE_REPLACE, blender::GPVERTEX_BRUSH_TYPE_SMEAR, blender::GPVERTEX_BRUSH_TYPE_TINT, blender::GPWEIGHT_BRUSH_TYPE_AVERAGE, blender::GPWEIGHT_BRUSH_TYPE_BLUR, blender::GPWEIGHT_BRUSH_TYPE_DRAW, blender::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(), blender::wmOperator::ptr, blender::RNA_enum_get(), blender::SculptGPencil, blender::Smooth, blender::VertexGPencil, and blender::WeightGPencil.

Referenced by get_stroke_operation(), and blender::ed::sculpt_paint::GreasePencilPaintStroke::update_step().

◆ get_symmetry_brush_transforms()

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

Definition at line 311 of file sculpt_brush.cc.

References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::CURVES_SYMMETRY_X, blender::CURVES_SYMMETRY_Y, blender::CURVES_SYMMETRY_Z, get_symmetry_brush_transforms(), blender::MatBase< float, 4, 4 >::identity(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::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::CutOperationExecutor::cut_curves(), 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::CutOperationExecutor::find_projected_points_in_stroke_with_symmetry(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_projected_smooth_factors_with_symmetry(), blender::ed::sculpt_paint::CutOperationExecutor::find_spherical_points_in_stroke_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(), get_symmetry_brush_transforms(), 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

◆ get_vertex_symm_area()

◆ grab_delta_get()

◆ grease_pencil_apply_fill()

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

Definition at line 1627 of file draw_ops.cc.

References blender::bke::MutableAttributeAccessor::add(), blender::blender::IndexRange::after(), blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), blender::BKE_brush_tag_unsaved_changes(), blender::BKE_paint_brush(), blender::BKE_report(), blender::BLI_rcti_isect_pt_v(), C, blender::ed::greasepencil::calculate_texture_space(), blender::bke::AttributeAccessor::contains(), blender::CTX_data_active_object(), blender::CTX_data_depsgraph_pointer(), blender::CTX_data_scene(), blender::CTX_data_tool_settings(), blender::CTX_wm_region(), blender::CTX_wm_window(), blender::bke::Curve, blender::bke::curves_new_nomain(), blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), blender::wmOperator::customdata, blender::data, blender::ED_view3d_viewcontext_init(), ensure_editable_drawings(), blender::bke::SpanAttributeWriter< T >::finish(), blender::ed::greasepencil::FitToView, blender::bke::GeometrySet::from_curves(), blender::bke::GeometrySet::get_curves_for_write(), get_fill_boundary_layers(), blender::GP_BRUSH_FILL_AUTO_REMOVE_FILL_GUIDES, blender::GP_BRUSH_FILL_HIDE, blender::GP_BRUSH_FILL_INTERNAL_GAPS, blender::GP_FILL_SOLVER_DELAUNAY, blender::ToolSettings::gp_paint, blender::GP_TOOL_FLAG_PAINT_ONBACK, blender::ToolSettings::gpencil_flags, grease_pencil_apply_fill(), grease_pencil_fill_get_extension_data(), blender::GroupedSpan< T >::GroupedSpan(), blender::bke::GeometrySet::has_curves(), blender::IndexRange::IndexRange(), blender::bke::CurvesGeometry::is_empty(), blender::geometry::join_geometries(), layer, blender::bke::greasepencil::LEGACY_RADIUS_CONVERSION_FACTOR, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::wmEvent::mval, blender::GpPaint::paint, blender::ed::greasepencil::remove_fill_guides(), blender::wmOperator::reports, blender::RPT_ERROR, set_fill_attributes(), simplify_fixed(), smooth_fill_strokes(), blender::ViewContext::v3d, blender::ARegion::winrct, blender::WM_cursor_modal_restore(), and blender::wmEvent::xy.

Referenced by grease_pencil_apply_fill(), grease_pencil_fill_event_modal_map(), and grease_pencil_fill_modal().

◆ grease_pencil_brush_stroke_cancel()

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

◆ grease_pencil_brush_stroke_exec()

◆ grease_pencil_brush_stroke_invoke()

◆ grease_pencil_brush_stroke_modal()

◆ grease_pencil_brush_stroke_poll()

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

◆ grease_pencil_cursor_draw()

void blender::ed::sculpt_paint::grease_pencil_cursor_draw ( PaintCursorContext & pcontext)

Definition at line 77 of file grease_pencil/paint_cursor.cc.

References blender::BKE_brush_color_get(), blender::BKE_brush_radius_get(), blender::BKE_brush_size_set(), blender::BKE_brush_unprojected_radius_get(), blender::BKE_grease_pencil_object_material_from_brush_get(), blender::BLI_rcti_isect_pt(), blender::ed::sculpt_paint::PaintCursorContext::brush, blender::BRUSH_LOCK_SIZE, blender::BRUSH_SMOOTH_STROKE, blender::ed::sculpt_paint::greasepencil::brush_using_vertex_color(), blender::ToolSettings::gp_paint, blender::GPAINT_BRUSH_TYPE_DRAW, blender::GPAINT_BRUSH_TYPE_ERASE, blender::GPAINT_BRUSH_TYPE_FILL, blender::GPAINT_BRUSH_TYPE_TINT, blender::GPencil, blender::GPU_line_width(), grease_pencil_cursor_draw(), grease_pencil_eraser_draw(), blender::IMB_colormanagement_scene_linear_to_srgb_v3(), blender::imm_draw_circle_wire_2d(), blender::immUniformColor4f(), layer, blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::mval, blender::OB_GREASE_PENCIL, blender::ed::sculpt_paint::PaintCursorContext::object, blender::ed::sculpt_paint::PaintCursorContext::paint, blender::ed::sculpt_paint::PaintCursorContext::pixel_radius, blender::ed::sculpt_paint::PaintCursorContext::pos, blender::ed::greasepencil::DrawingPlacement::project(), project_brush_radius_grease_pencil(), blender::ed::sculpt_paint::PaintCursorContext::region, blender::ed::sculpt_paint::PaintCursorContext::scene, blender::MaterialGPencilStyle::stroke_rgba, blender::ed::greasepencil::DrawingPlacement::to_world_space(), blender::Scene::toolsettings, blender::math::transform_point(), blender::ViewContext::v3d, blender::ed::sculpt_paint::PaintCursorContext::vc, blender::VertexGPencil, blender::ARegion::winrct, blender::rcti::xmin, and blender::rcti::ymin.

Referenced by grease_pencil_cursor_draw(), and paint_draw_2D_view_brush_cursor().

◆ 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

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

void blender::ed::sculpt_paint::grease_pencil_fill_overlay_cb ( const bContext * C,
ARegion * ,
void * arg )
static

◆ grease_pencil_fill_overlay_delaunay_cb()

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

◆ grease_pencil_sculpt_paint_poll()

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

◆ grease_pencil_update_extend()

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

◆ grease_pencil_vertex_brush_stroke_poll()

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

◆ grease_pencil_weight_brush_stroke_poll()

◆ imapaint_pick_face()

◆ imapaint_pick_uv()

◆ inactive_cursor_draw()

◆ init_scene_project_brush_targets()

void blender::ed::sculpt_paint::init_scene_project_brush_targets ( const Depsgraph & depsgraph,
ViewLayer & view_layer,
const View3D & v3d,
const Object & active_object,
StrokeCache & cache )
static

◆ init_session()

◆ init_transform()

◆ is_brush_related_tool()

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

◆ 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 2211 of file draw_ops.cc.

References is_point_inside_bounds().

Referenced by is_point_inside_bounds().

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

◆ is_vertex_inside_brush_radius_symm()

bool blender::ed::sculpt_paint::is_vertex_inside_brush_radius_symm ( const float vertex[3],
const float br_co[3],
float radius,
char symm )

◆ keymap_sculpt()

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

◆ layer_brush_height_preview_draw()

◆ 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

◆ load_tex_task_cb_ex()

◆ main_inactive_cursor_draw()

◆ make_tex_snap()

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

◆ mask_border_weight_calc()

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

◆ mask_brush_toggle_off()

◆ mask_brush_toggle_on()

◆ mask_overlay_check()

◆ mesh_cursor_active_draw()

void blender::ed::sculpt_paint::mesh_cursor_active_draw ( PaintCursorContext & pcontext)

Definition at line 248 of file mesh/paint_cursor.cc.

References blender::BLI_assert(), blender::ed::sculpt_paint::PaintCursorContext::brush, blender::BRUSH_CLOTH_FORCE_FALLOFF_PLANE, blender::BRUSH_CLOTH_FORCE_FALLOFF_RADIAL, blender::BRUSH_CLOTH_SIMULATION_AREA_LOCAL, blender::SculptSession::cache, blender::ed::sculpt_paint::PaintCursorContext::depsgraph, blender::math::distance(), blender::Draw, blender::ED_view3d_draw_setup_view(), geometry_preview_lines_draw(), blender::GPU_matrix_mul(), blender::GPU_matrix_pop(), blender::GPU_matrix_pop_projection(), blender::GPU_matrix_push(), blender::GPU_matrix_push_projection(), blender::ed::sculpt_paint::StrokeCache::initial_location, blender::ed::sculpt_paint::StrokeCache::initial_normal, blender::ed::sculpt_paint::StrokeCache::location, mesh_cursor_active_draw(), blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::brushes::multiplane_scrape_preview_draw(), blender::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, PRF_scope, blender::ed::sculpt_paint::StrokeCache::radius, blender::ed::sculpt_paint::PaintCursorContext::region, blender::ed::sculpt_paint::PaintCursorContext::scene, blender::Sculpt, blender::SCULPT_BRUSH_TYPE_CLOTH, blender::SCULPT_BRUSH_TYPE_GRAB, blender::SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE, blender::ed::sculpt_paint::cloth::simulation_limits_draw(), blender::ed::sculpt_paint::PaintCursorContext::ss, stroke_is_first_brush_step_of_symmetry_pass(), blender::ViewContext::v3d, blender::ed::sculpt_paint::PaintCursorContext::vc, blender::ed::sculpt_paint::PaintCursorContext::win, blender::ARegion::winrct, blender::ed::sculpt_paint::PaintCursorContext::wm, blender::wmViewport(), and blender::wmWindowViewport().

Referenced by mesh_cursor_active_draw(), and paint_cursor_draw_3D_view_brush_cursor().

◆ mesh_cursor_inactive_draw()

◆ mesh_cursor_update_and_init()

void blender::ed::sculpt_paint::mesh_cursor_update_and_init ( PaintCursorContext & pcontext)

Definition at line 150 of file mesh/paint_cursor.cc.

References blender::SculptSession::active_vert_index(), blender::ed::sculpt_paint::PaintCursorContext::base, blender::BKE_brush_size_set(), blender::BKE_brush_use_locked_size(), blender::BLI_assert(), blender::ed::sculpt_paint::PaintCursorContext::brush, brush_unprojected_size_update(), cursor_geometry_info_update(), blender::ed::sculpt_paint::PaintCursorContext::depsgraph, blender::Editor, blender::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, mesh_cursor_update_and_init(), blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::mval, blender::ed::sculpt_paint::CursorGeometryInfo::normal, blender::ed::sculpt_paint::PaintCursorContext::normal, blender::ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::paint, blender::PAINT_FALLOFF_SHAPE_SPHERE, blender::bke::object::pbvh_ensure(), blender::ed::sculpt_paint::PaintCursorContext::pixel_radius, pixel_radius_update(), blender::ed::sculpt_paint::PaintCursorContext::prev_active_vert_index, PRF_scope, blender::ed::sculpt_paint::PaintCursorContext::region, blender::Paint::runtime, blender::ed::sculpt_paint::PaintCursorContext::scene_space_location, blender::ed::sculpt_paint::PaintCursorContext::sd, blender::ed::sculpt_paint::PaintCursorContext::ss, blender::bke::PaintRuntime::stroke_active, blender::bke::paint::supports_scene_size(), blender::ed::sculpt_paint::PaintCursorContext::vc, vert_random_access_ensure(), blender::ARegion::winrct, blender::rcti::xmin, and blender::rcti::ymin.

Referenced by mesh_cursor_update_and_init(), and paint_cursor_draw_3D_view_brush_cursor().

◆ mesh_symmetry_xyz_get()

ePaintSymmetryFlags blender::ed::sculpt_paint::mesh_symmetry_xyz_get ( const Object & object)

Definition at line 192 of file sculpt.cc.

References blender::data, blender::ME_SYMMETRY_XYZ, and mesh_symmetry_xyz_get().

Referenced by blender::ed::sculpt_paint::auto_mask::cache_init(), 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::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::pose::calc_pose_origin_and_factor_bmesh(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_grids(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_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::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::pose::do_pose_brush(), do_symmetrical_brush_actions(), do_symmetrical_brush_actions_with_tiling_and_feathering(), blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_bmesh(), blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_grids(), blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_mesh(), blender::ed::sculpt_paint::expand::find_active_connected_components_from_vert(), find_all_symm_verts_bmesh(), find_all_symm_verts_grids(), find_all_symm_verts_mesh(), find_symm_verts_bmesh(), find_symm_verts_grids(), find_symm_verts_mesh(), blender::ed::sculpt_paint::pose::grow_pose_factor(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_mesh(), blender::ed::sculpt_paint::gesture::init_common(), mesh_symmetry_xyz_get(), point_with_symmetry_draw(), blender::ed::sculpt_paint::expand::reposition_pivot(), sculpt_transform_all_vertices(), set_pivot_position_exec(), transform_node_bmesh(), transform_node_grids(), transform_node_mesh(), and transform_radius_elastic().

◆ mode_enter_generic()

◆ mode_exit_generic()

◆ move_last_point_and_resample()

◆ 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 501 of file 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 414 of file sculpt_comb.cc.

References new_comb_operation().

Referenced by new_comb_operation(), and start_brush_operation().

◆ new_cut_operation()

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

Definition at line 511 of file sculpt_cut.cc.

References new_cut_operation().

Referenced by new_cut_operation(), and start_brush_operation().

◆ new_delete_operation()

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

Definition at line 279 of file sculpt_delete.cc.

References new_delete_operation().

Referenced by new_delete_operation(), and start_brush_operation().

◆ new_density_operation()

std::unique_ptr< CurvesSculptStrokeOperation > blender::ed::sculpt_paint::new_density_operation ( BrushStrokeMode brush_mode,
const Scene & scene,
const Depsgraph & depsgraph,
const ARegion & region,
const View3D & v3d,
const Object & object,
const StrokeExtension & stroke_start )

◆ new_grow_shrink_operation()

◆ new_pinch_operation()

◆ new_puff_operation()

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

Definition at line 355 of file sculpt_puff.cc.

References new_puff_operation().

Referenced by new_puff_operation(), and start_brush_operation().

◆ new_selection_paint_operation()

◆ new_slide_operation()

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

Definition at line 505 of file 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 264 of file curves/sculpt_smooth.cc.

References new_smooth_operation().

Referenced by new_smooth_operation(), and start_brush_operation().

◆ new_snake_hook_operation()

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

Definition at line 307 of file sculpt_snake_hook.cc.

References new_snake_hook_operation().

Referenced by new_snake_hook_operation(), and start_brush_operation().

◆ no_multires_poll()

◆ node_fully_masked_or_hidden()

◆ node_in_box()

bool blender::ed::sculpt_paint::node_in_box ( const float4x4 & mat,
const Bounds< float3 > & bounds,
const float3 & brush_center = float3(0.0f, 0.0f, 0.0f),
const float3 & brush_half_lengths = float3(1.0f, 1.0f, 1.0f),
const bool test_z_axis = true )

Calculates whether the node intersects a local-space volume. By default, this is the [-1, 1] x [-1, 1] x [-1, 1] cube centered at the origin, but the dimensions can be specified. If test_z_axis is false, then the brush is treated as an infinite cuboid along the view direction.

Intersection is tested using the Separating Axis Theorem. Two boxes (not necessarily axis-aligned) intersect if and only if there does not exist an axis that separates them. In particular, it is necessary and sufficient to:

Definition at line 2536 of file sculpt.cc.

References blender::math::abs(), blender::math::cross(), blender::math::dot(), node_in_box(), blender::math::transform_point(), blender::MatBase< T, NumCol, NumRow, Alignment >::x_axis(), blender::MatBase< T, NumCol, NumRow, Alignment >::y_axis(), and blender::MatBase< T, NumCol, NumRow, Alignment >::z_axis().

Referenced by blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask(), node_in_box(), node_in_box_positive_z(), and pbvh_gather_generic_cube().

◆ node_in_box_positive_z()

bool blender::ed::sculpt_paint::node_in_box_positive_z ( const float4x4 & mat,
const Bounds< float3 > & bounds )

Calculates whether node intersects the [-1,1] x [-1,1] x [0,1] volume in local space.

Used for brushes similar to Clay strips that only affect vertices below the brush plane.

The local coordinate system is oriented so that the vertices below the plane have positive local z-coordinates.

Definition at line 2606 of file sculpt.cc.

References node_in_box(), and node_in_box_positive_z().

Referenced by blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask(), and node_in_box_positive_z().

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

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

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

Returns
true if successful.

Definition at line 2040 of file paint_vertex.cc.

References fill_active_color(), and object_active_color_init().

Referenced by blender::ed::geometry::geometry_color_attribute_add_exec(), object_active_color_init(), and blender::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_overlays_draw()

◆ object_space_radius_get()

◆ object_space_radius_update()

◆ operatortypes_sculpt()

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

Definition at line 1417 of file mesh/sculpt_ops.cc.

References operatortypes_sculpt(), 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(), SCULPT_OT_face_set_extract(), 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(), SCULPT_OT_paint_mask_extract(), SCULPT_OT_paint_mask_slice(), blender::ed::sculpt_paint::project::SCULPT_OT_project_line_gesture(), 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 blender::WM_operatortype_append().

Referenced by blender::ED_spacetypes_init(), and operatortypes_sculpt().

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

◆ 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 2506 of file sculpt_undo.cc.

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

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

◆ over_mesh() [1/2]

◆ over_mesh() [2/2]

bool blender::ed::sculpt_paint::over_mesh ( Depsgraph & depsgraph,
ViewContext & vc,
const Sculpt & sd,
const Brush * brush,
wmOperator * ,
const float mval[2] )
static

◆ paint_brush_cursor_poll()

◆ paint_brush_tool_poll() [1/2]

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

◆ paint_brush_tool_poll() [2/2]

bool blender::ed::sculpt_paint::paint_brush_tool_poll ( const ScrArea * area,
const ARegion * region,
const Paint * paint,
const Object * ob )

◆ paint_brush_type_raycast_original()

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

◆ paint_brush_type_require_inbetween_mouse_events()

◆ paint_brush_type_require_location()

◆ paint_cursor_check_and_draw_alpha_overlays()

◆ paint_cursor_context_init()

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

Definition at line 946 of file paint_cursor.cc.

References blender::Brush::add_col, blender::ed::sculpt_paint::PaintCursorContext::base, blender::BKE_brush_radius_get(), blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), blender::BKE_paintmode_get_active_from_context(), blender::ed::sculpt_paint::PaintCursorContext::brush, blender::BRUSH_DIR_IN, blender::BRUSH_STROKE_CURVE, C, blender::CTX_data_active_base(), blender::CTX_data_active_object(), blender::CTX_data_depsgraph_pointer(), blender::CTX_data_scene(), blender::CTX_data_tool_settings(), blender::CTX_wm_area(), blender::CTX_wm_manager(), blender::CTX_wm_region(), blender::CTX_wm_screen(), blender::CTX_wm_window(), Cursor2D, Cursor3D, blender::ed::sculpt_paint::PaintCursorContext::cursor_type, Curve, blender::ed::sculpt_paint::PaintCursorContext::depsgraph, blender::SculptSession::draw_faded_cursor, blender::ED_view3d_viewcontext_init(), blender::Editor, ELEM, blender::ed::sculpt_paint::PaintCursorContext::final_radius, blender::Brush::flag, float, blender::get_imapaint_zoom(), blender::ed::sculpt_paint::PaintCursorContext::is_brush_active, blender::ed::sculpt_paint::PaintCursorContext::is_stroke_active, blender::max_ff(), blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ed::sculpt_paint::PaintCursorContext::mval, blender::ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::object, 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_cursor_context_init(), paint_use_2d_cursor(), PRF_scope, blender::ed::sculpt_paint::PaintCursorContext::region, blender::ARegion::regiontype, blender::RGN_TYPE_WINDOW, blender::Object::runtime, blender::Paint::runtime, blender::ed::sculpt_paint::PaintCursorContext::scene, blender::ed::sculpt_paint::PaintCursorContext::screen, blender::Sculpt, blender::ToolSettings::sculpt, blender::bke::ObjectRuntime::sculpt_session, blender::ed::sculpt_paint::PaintCursorContext::sd, blender::ed::sculpt_paint::PaintCursorContext::ss, blender::bke::PaintRuntime::stroke_active, blender::Brush::stroke_method, blender::Brush::sub_col, blender::bke::brush::supports_secondary_cursor_color(), blender::Texture3D, blender::ed::sculpt_paint::PaintCursorContext::tilt, blender::ed::sculpt_paint::PaintCursorContext::translation, blender::Paint::unified_paint_settings, blender::ed::sculpt_paint::PaintCursorContext::ups, blender::ed::sculpt_paint::PaintCursorContext::vc, blender::Vertex, blender::Weight, blender::ed::sculpt_paint::PaintCursorContext::win, blender::ed::sculpt_paint::PaintCursorContext::wm, and blender::ed::sculpt_paint::PaintCursorContext::zoomx.

Referenced by paint_cursor_context_init(), and paint_draw_cursor().

◆ paint_cursor_draw_3D_view_brush_cursor()

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

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

◆ paint_cursor_setup_2D_drawing()

◆ paint_cursor_setup_3D_drawing()

◆ paint_cursor_update_anchored_location()

◆ paint_cursor_update_rake_rotation()

◆ paint_draw_2D_view_brush_cursor()

◆ paint_draw_2D_view_brush_cursor_default()

◆ 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 455 of file paint_cursor.cc.

References blender::bke::PaintRuntime::anchored_initial_mouse, blender::bke::PaintRuntime::anchored_size, blender::BKE_brush_radius_get(), blender::BKE_brush_use_size_pressure(), blender::BLI_rcti_size_x(), blender::BLI_rcti_size_y(), blender::MTex::brush_map_mode, blender::BRUSH_OVERLAY_PRIMARY, blender::BRUSH_OVERLAY_SECONDARY, blender::bke::PaintRuntime::brush_rotation, blender::bke::PaintRuntime::brush_rotation_sec, blender::copy_v3_v3(), blender::bke::PaintRuntime::draw_anchored, ELEM, blender::GPU_blend(), blender::GPU_BLEND_ALPHA_PREMULT, blender::GPU_color_mask(), blender::GPU_DEPTH_NONE, blender::GPU_depth_test(), blender::GPU_matrix_pop(), blender::GPU_matrix_push(), blender::GPU_matrix_rotate_2d(), blender::GPU_matrix_scale_2f(), blender::GPU_matrix_translate_2f(), blender::GPU_matrix_translate_2fv(), blender::GPU_PRIM_TRI_FAN, blender::GPU_SAMPLER_EXTEND_MODE_CLAMP_TO_BORDER, blender::GPU_SAMPLER_EXTEND_MODE_REPEAT, blender::GPU_SAMPLER_FILTERING_LINEAR, blender::GPU_SHADER_3D_IMAGE_COLOR, blender::GPU_texture_unbind(), blender::GPU_vertformat_attr_add(), blender::IMAGE_PAINT_BRUSH_TYPE_DRAW, blender::immAttr2f(), blender::immBegin(), blender::immBindBuiltinProgram(), blender::immBindTextureSampler(), blender::immEnd(), blender::immUnbindProgram(), blender::immUniformColor4fv(), blender::immVertex2f(), blender::immVertexFormat(), load_tex(), blender::MTEX_MAP_MODE_STENCIL, blender::MTEX_MAP_MODE_TILED, blender::MTEX_MAP_MODE_VIEW, blender::mul_v4_fl(), paint_draw_tex_overlay(), RAD2DEGF, blender::ViewContext::region, blender::MTex::rot, scale(), blender::bke::PaintRuntime::size_pressure_value, blender::bke::PaintRuntime::stroke_active, blender::MTex::tex, texture(), blender::Texture3D, blender::U, blender::ARegion::winrct, blender::x, blender::rctf::xmax, blender::rctf::xmin, y, blender::rctf::ymax, and blender::rctf::ymin.

Referenced by paint_draw_alpha_overlay(), and paint_draw_tex_overlay().

◆ paint_mask_extract_exec()

◆ paint_mask_extract_invoke()

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

◆ paint_mask_slice_exec()

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

Definition at line 434 of file sculpt_mask_extract.cc.

References blender::ed::object::add_type(), blender::BKE_id_copy(), blender::BKE_id_free(), blender::BKE_mesh_batch_cache_dirty_tag(), blender::BKE_MESH_BATCH_DIRTY_ALL, blender::BKE_mesh_from_bmesh_nomain(), blender::BKE_mesh_nomain_to_mesh(), blender::BKE_sculptsession_free_pbvh(), blender::bm, blender::BM_mesh_bm_from_me(), blender::BM_mesh_create(), blender::BM_mesh_free(), BMALLOC_TEMPLATE_FROM_ME, C, blender::BMeshFromMeshParams::calc_face_normal, blender::BMeshToMeshParams::calc_object_remap, blender::CTX_data_active_object(), blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_wm_view3d(), blender::Object::data, blender::DEG_id_tag_update(), blender::DEG_relations_tag_update(), blender::ed::sculpt_paint::face_set::find_next_available_id(), blender::ed::sculpt_paint::undo::geometry_begin(), blender::ed::sculpt_paint::undo::geometry_end(), blender::Object::id, blender::ID_RECALC_GEOMETRY, blender::ed::sculpt_paint::face_set::initialize_none_to_id(), blender::Object::loc, blender::View3D::local_view_uid, blender::View3D::localvd, blender::Object::mode, NC_GEOM, NC_OBJECT, ND_DATA, ND_MODIFIER, blender::OB_MESH, blender::OB_MODE_SCULPT, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, paint_mask_slice_exec(), blender::wmOperator::ptr, blender::RNA_boolean_get(), blender::RNA_float_get(), blender::Object::rot, slice_paint_mask(), blender::BMeshCreateParams::use_toolflags, and blender::WM_event_add_notifier().

Referenced by paint_mask_slice_exec(), and SCULPT_OT_paint_mask_slice().

◆ PAINT_OT_sample_color()

◆ paint_sample_color()

◆ paint_smooth_stroke()

bool blender::ed::sculpt_paint::paint_smooth_stroke ( const Brush & brush,
const PaintSample * sample,
const PaintMode mode,
const BrushSwitchMode brush_switch_mode,
float zoom_2d,
float2 last_mouse_position,
float last_pressure,
float2 & r_mouse,
float & r_pressure )
static

◆ paint_space_stroke_enabled()

◆ paint_space_stroke_spacing()

◆ paint_space_stroke_spacing_no_pressure()

float blender::ed::sculpt_paint::paint_space_stroke_spacing_no_pressure ( const ViewContext & vc,
const Paint * paint,
const PaintMode paint_mode,
const Brush * brush,
float3 last_world_space_position,
float zoom_2d )
static

◆ paint_space_stroke_spacing_variable()

float blender::ed::sculpt_paint::paint_space_stroke_spacing_variable ( ViewContext & vc,
const Paint * paint,
const PaintMode paint_mode,
const Brush * brush,
float3 last_world_space_position,
float zoom_2d,
const float last_pressure,
const float pressure,
const float pressure_delta,
const float length )
static

◆ paint_stroke_integrate_overlap()

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

◆ paint_stroke_jitter_pos()

float2 blender::ed::sculpt_paint::paint_stroke_jitter_pos ( Paint * paint,
PaintMode mode,
const Brush & brush,
float pressure,
BrushStrokeMode stroke_mode,
float zoom_2d,
const float2 & mval )

◆ paint_stroke_line_constrain()

void blender::ed::sculpt_paint::paint_stroke_line_constrain ( float2 last_mouse_position,
float2 & constrained_pos,
float2 & mouse )
static

◆ paint_stroke_overlapped_curve()

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

◆ paint_stroke_use_dash()

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

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

◆ paint_supports_dynamic_size()

◆ 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 1126 of file paint_stroke.cc.

References blender::BRUSH_STROKE_ANCHORED, paint_supports_dynamic_tex_coords(), blender::Sculpt, sculpt_is_grab_tool(), and blender::Brush::stroke_method.

Referenced by paint_supports_dynamic_tex_coords().

◆ paint_supports_smooth_stroke()

◆ paint_supports_texture()

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

◆ paint_update_mouse_cursor()

◆ paint_use_2d_cursor()

◆ pbvh_gather_cursor_update()

◆ pbvh_gather_generic()

◆ pbvh_gather_generic_cube()

◆ pixel_radius_update()

◆ point_with_symmetry_draw()

void blender::ed::sculpt_paint::point_with_symmetry_draw ( const PaintMode paint_mode,
const Brush & brush,
const uint gpuattr,
const ARegion * region,
const float true_location[3],
const Paint & paint,
const Object & ob,
const float radius )
static

◆ pose_brush_origins_draw()

◆ pose_brush_segments_draw()

◆ 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

◆ project_brush_radius_grease_pencil()

◆ project_translations()

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

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

◆ replace_attribute()

◆ report_cyclic_not_supported()

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

◆ report_empty_evaluated_surface()

◆ report_empty_original_surface()

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

◆ report_missing_uv_map_on_original_surface()

◆ 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 7572 of file sculpt.cc.

References blender::BLI_assert(), blender::Editor, blender::MutableSpan< T >::index_range(), PRF_scope, 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().

◆ restore_from_undo_step_if_necessary()

◆ 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 ( bke::paint::TexSnapshot * snap,
MTex * mtex,
ViewContext * vc,
bool col,
float zoom )
static

◆ sample_average_color()

float3 blender::ed::sculpt_paint::sample_average_color ( SampleColorData * data,
const float3 & sampled_color )
static

◆ sample_color_exec()

◆ sample_color_invoke()

◆ sample_color_modal()

◆ sample_color_poll()

◆ sample_color_update_header()

void blender::ed::sculpt_paint::sample_color_update_header ( SampleColorData * data,
bContext * C )
static

◆ sample_curves_3d_brush()

std::optional< CurvesBrush3D > blender::ed::sculpt_paint::sample_curves_3d_brush ( const Depsgraph & depsgraph,
const ARegion & region,
const View3D & v3d,
const RegionView3D & rv3d,
const Object & curves_object,
const float2 & brush_pos_re,
const float brush_radius_re )

Find 3d brush position based on cursor position for curves sculpting.

Definition at line 174 of file sculpt_brush.cc.

References blender::BKE_object_get_evaluated_mesh(), blender::BKE_object_visibility(), blender::Object::data, blender::DEG_get_evaluated(), blender::DEG_get_mode(), blender::dist_to_line_v3(), blender::math::distance(), blender::ED_view3d_win_to_segment_clipped(), find_curves_brush_position(), blender::bke::crazyspace::get_evaluated_curves_deformation(), blender::math::invert(), blender::math::normalize(), blender::OB_VISIBLE_SELF, blender::ed::sculpt_paint::CurvesBrush3D::position_cu, blender::bke::crazyspace::GeometryDeformation::positions, blender::ed::sculpt_paint::CurvesBrush3D::radius_cu, blender::bke::bvh::Tree::ray_intersect(), sample_curves_3d_brush(), blender::math::transform_point(), and XRAY_ENABLED.

Referenced by blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::CutOperationExecutor::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(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::initialize_spherical_brush_reference_point(), and sample_curves_3d_brush().

◆ sample_curves_surface_3d_brush()

◆ sample_mesh_attribute_color()

◆ sample_texture_paint_color()

std::optional< float3 > blender::ed::sculpt_paint::sample_texture_paint_color ( const Depsgraph & depsgraph,
Scene & scene,
ViewContext & vc,
Object * object,
const int2 mval )
static

Definition at line 154 of file paint_sample_color.cc.

References bary_coord, blender::BKE_image_acquire_ibuf(), blender::BKE_image_get_tile_from_pos(), blender::BKE_image_release_ibuf(), blender::BKE_imageuser_default(), blender::BKE_object_get_evaluated_mesh(), blender::BKE_object_material_get(), blender::BKE_texpaint_slot_refresh_cache(), BLI_SCOPED_DEFER, blender::ImBuf::byte_buffer, blender::ImBuf::byte_data(), blender::ImagePaintSettings::canvas, blender::math::clamp(), blender::ImBufByteBuffer::colorspace, blender::ImBuf::colorspace_is_data(), blender::DEG_get_evaluated(), blender::bke::Face, blender::ImBuf::float_data(), blender::ImageUser::framenr, blender::IMA_SRC_TILED, IMAGEPAINT_MODE_MATERIAL, blender::ToolSettings::imapaint, imapaint_pick_face(), imapaint_pick_uv(), blender::IMB_colormanagement_colorspace_to_scene_linear_v3(), blender::ImagePaintSettings::interp, interp(), blender::imbuf::interpolate_bilinear_wrap_byte(), blender::imbuf::interpolate_bilinear_wrap_fl(), blender::imbuf::interpolate_nearest_wrap_byte(), blender::imbuf::interpolate_nearest_wrap_fl(), blender::bke::AttributeAccessor::lookup_or_default(), blender::ImagePaintSettings::mode, blender::rgba_uchar_to_float(), sample_texture_paint_color(), blender::SHD_INTERP_CLOSEST, blender::SHD_INTERP_LINEAR, blender::straight_to_premul_v4(), blender::ImageUser::tile, blender::Scene::toolsettings, blender::v, blender::ImBuf::x, and blender::ImBuf::y.

Referenced by paint_sample_color(), and sample_texture_paint_color().

◆ 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 7856 of file sculpt.cc.

References blender::Editor, PRF_scope, and 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::image::do_paint_pixels(), blender::ed::sculpt_paint::color::do_smear_brush_task(), blender::do_wpaint_brush_draw(), elastic_transform_node_bmesh(), elastic_transform_node_grids(), elastic_transform_node_mesh(), scale_factors(), scale_factors(), blender::ed::sculpt_paint::cloth::solve_verts_simulation(), and blender::vpaint_do_draw().

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

◆ scale_translations() [2/2]

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

Definition at line 7837 of file sculpt.cc.

References blender::Editor, blender::MutableSpan< T >::index_range(), PRF_scope, 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 135 of file mesh_brush_common.hh.

References blender::Editor, PRF_scope, blender::array_utils::scatter(), scatter_data_mesh(), and blender::exec_mode::serial.

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(), blender::ed::sculpt_paint::mask::update_mask_mesh(), and blender::ed::sculpt_paint::hide::vert_hide_update().

◆ screen_space_overlays_draw()

void blender::ed::sculpt_paint::screen_space_overlays_draw ( const PaintCursorContext & pcontext)
static

Definition at line 556 of file mesh/paint_cursor.cc.

References blender::SculptSession::active_vert_index(), blender::BKE_sculptsession_update_for_edit(), blender::bm, blender::SculptSession::bm, blender::BM_vert_at_index(), blender::bke::pbvh::BMesh, boundary_preview_pivot_draw(), boundary_preview_update(), blender::ed::sculpt_paint::PaintCursorContext::brush, blender::BMVert::co, blender::ed::sculpt_paint::PaintCursorContext::depsgraph, blender::math::distance(), blender::SculptSession::expand_cache, get_active_vertex_position(), blender::bke::pbvh::Grids, blender::immUniformColor3fvAlpha(), blender::ed::sculpt_paint::expand::Cache::initial_active_vert, blender::ed::sculpt_paint::PaintCursorContext::is_brush_active, blender::ed::sculpt_paint::PaintCursorContext::location, blender::bke::pbvh::Mesh, blender::ed::sculpt_paint::PaintCursorContext::mode, blender::ViewContext::obact, blender::ed::sculpt_paint::PaintCursorContext::outline_alpha, blender::ed::sculpt_paint::PaintCursorContext::outline_col, blender::ed::sculpt_paint::PaintCursorContext::paint, blender::bke::object::pbvh_get(), point_with_symmetry_draw(), blender::ed::sculpt_paint::PaintCursorContext::pos, pose_brush_origins_draw(), blender::SculptSession::pose_ik_chain_preview, position, blender::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, screen_space_overlays_draw(), screen_space_point_draw(), blender::Sculpt, blender::SCULPT_BRUSH_TYPE_BOUNDARY, blender::SCULPT_BRUSH_TYPE_POSE, blender::ed::sculpt_paint::PaintCursorContext::ss, blender::SculptSession::subdiv_ccg, blender::ed::sculpt_paint::PaintCursorContext::vc, and blender::bke::pbvh::vert_positions_eval().

Referenced by mesh_cursor_inactive_draw(), and screen_space_overlays_draw().

◆ screen_space_point_draw()

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

◆ sculpt_brush_needs_normal()

◆ sculpt_brush_stroke_cancel()

◆ sculpt_brush_stroke_exec()

◆ sculpt_brush_stroke_invoke()

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

Definition at line 5785 of file sculpt.cc.

References blender::BKE_base_is_visible(), blender::BKE_paint_brush(), blender::BKE_report(), blender::BKE_sculpt_mask_layers_ensure(), blender::BKE_sculpt_multires_active(), blender::BLI_assert(), brush_stroke_init(), brush_type_is_attribute_only(), brush_type_is_mask(), brush_type_is_paint(), C, blender::ed::sculpt_paint::PaintStroke::cancel(), color_supported_check(), blender::CTX_data_active_base(), blender::CTX_data_active_object(), blender::CTX_data_depsgraph_pointer(), blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_data_tool_settings(), blender::CTX_wm_view3d(), blender::wmOperator::customdata, ELEM, face_set_overlay_check(), blender::ed::sculpt_paint::PaintStroke::finish(), float, blender::bke::pbvh::Grids, mask_overlay_check(), blender::wmOperatorType::modal, blender::wmEvent::mval, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::OPERATOR_PASS_THROUGH, OPERATOR_RETVAL_CHECK, blender::OPERATOR_RUNNING_MODAL, over_mesh(), blender::Sculpt::paint, blender::bke::object::pbvh_get(), blender::wmOperator::ptr, blender::wmOperator::reports, blender::RNA_boolean_get(), blender::RPT_ERROR, blender::ToolSettings::sculpt, sculpt_brush_stroke_invoke(), blender::SCULPT_BRUSH_TYPE_DISPLACEMENT_ERASER, blender::SCULPT_BRUSH_TYPE_DISPLACEMENT_SMEAR, blender::SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, shape_key_check(), blender::wmOperator::type, blender::WM_event_add_modal_handler(), and blender::WM_event_tablet_data().

Referenced by sculpt_brush_stroke_invoke(), and SCULPT_OT_brush_stroke().

◆ sculpt_brush_type_name()

◆ SCULPT_CURVES_OT_brush_stroke()

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

◆ 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

◆ sculpt_init_mirror_clipping()

◆ sculpt_is_grab_tool()

◆ sculpt_mode_and_brush_poll()

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

Checks for a brush, not just sculpt mode.

Definition at line 3811 of file sculpt.cc.

References C, paint_brush_tool_poll(), sculpt_mode_and_brush_poll(), and sculpt_mode_poll().

Referenced by sculpt_mode_and_brush_poll(), and SCULPT_OT_brush_stroke().

◆ sculpt_mode_poll()

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

Definition at line 3800 of file sculpt.cc.

References C, blender::CTX_data_active_object(), blender::Object::mode, blender::OB_MODE_SCULPT, and sculpt_mode_poll().

Referenced by brush_cursor_poll(), blender::ED_keymap_paint(), no_multires_poll(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_flood_fill(), sample_color_poll(), blender::ed::sculpt_paint::dyntopo::sculpt_and_constant_or_manual_detail_poll(), blender::ed::sculpt_paint::dyntopo::sculpt_and_dynamic_topology_poll(), sculpt_mode_and_brush_poll(), sculpt_mode_poll(), sculpt_mode_poll_view3d(), 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_dynamic_topology_toggle(), blender::ed::sculpt_paint::expand::SCULPT_OT_expand(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_change_visibility(), 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::dyntopo::SCULPT_OT_sample_detail_size(), and SCULPT_OT_set_persistent_base().

◆ sculpt_mode_poll_view3d()

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

Definition at line 3806 of file sculpt.cc.

References C, blender::CTX_wm_region_view3d(), sculpt_mode_poll(), and sculpt_mode_poll_view3d().

Referenced by blender::ed::sculpt_paint::hide::PAINT_OT_hide_show(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_all(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_lasso_gesture(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_line_gesture(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_masked(), blender::ed::sculpt_paint::hide::PAINT_OT_hide_show_polyline_gesture(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_box_gesture(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_lasso_gesture(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_line_gesture(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_polyline_gesture(), blender::ed::sculpt_paint::hide::PAINT_OT_visibility_filter(), blender::ed::sculpt_paint::hide::PAINT_OT_visibility_invert(), sculpt_mode_poll_view3d(), blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_box_gesture(), 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::project::SCULPT_OT_project_line_gesture(), SCULPT_OT_set_pivot_position(), 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(), and blender::ed::sculpt_paint::trim::SCULPT_OT_trim_polyline_gesture().

◆ sculpt_mode_toggle_exec()

◆ SCULPT_OT_brush_stroke()

◆ SCULPT_OT_face_set_extract()

◆ SCULPT_OT_optimize()

◆ SCULPT_OT_paint_mask_extract()

◆ SCULPT_OT_paint_mask_slice()

◆ SCULPT_OT_sculptmode_toggle()

◆ SCULPT_OT_set_persistent_base()

◆ SCULPT_OT_set_pivot_position()

◆ SCULPT_OT_symmetrize()

◆ sculpt_project_v3_normal_align()

void blender::ed::sculpt_paint::sculpt_project_v3_normal_align ( const StrokeCache & cache,
const float normal_weight,
float grab_delta[3] )
static

◆ sculpt_raycast_cb()

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

Definition at line 4320 of file sculpt.cc.

References blender::ed::sculpt_paint::RaycastData::active_face_grid_index, blender::ed::sculpt_paint::RaycastData::active_vertex, blender::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, distance(), blender::ed::sculpt_paint::RaycastData::face_normal, blender::ed::sculpt_paint::RaycastData::faces, 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, node, 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, blender::SubdivCCGCoord::to_index(), blender::ed::sculpt_paint::RaycastData::use_original, and blender::ed::sculpt_paint::RaycastData::vert_positions.

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

◆ sculpt_transform_all_vertices()

◆ set_fill_attributes()

void blender::ed::sculpt_paint::set_fill_attributes ( bke::CurvesGeometry & fill_curves,
const ViewContext & view_context,
const Paint & paint,
const Brush & brush,
const Scene & scene,
const float4x4 & to_world,
const int material_index,
const float hardness )
static

◆ set_persistent_base_exec()

◆ set_pivot_depends_on_cursor()

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

◆ 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

◆ shape_key_check()

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

◆ simplify_fixed()

bke::CurvesGeometry blender::ed::sculpt_paint::simplify_fixed ( bke::CurvesGeometry & curves,
const int step )
static

◆ slice_paint_mask()

◆ 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 5276 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, attribute_matches(), blender::BKE_id_free(), blender::BKE_mesh_copy_parameters(), blender::BKE_sculptsession_use_pbvh_draw(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::data, blender::DEG_id_tag_update(), ELEM, blender::bke::Face, blender::ed::sculpt_paint::undo::FaceSet, blender::bke::Float, blender::bke::Float3, blender::bke::AttributeIter::get(), get_vertex_group_sharing_info(), blender::ID_RECALC_GEOMETRY, blender::ID_RECALC_SHADING, blender::bke::Int32, blender::ed::sculpt_paint::undo::Mask, blender::bDeformGroup::name, blender::bke::AttributeIter::name, blender::bke::object::pbvh_get(), blender::bke::Point, blender::ed::sculpt_paint::undo::Position, position, blender::ed::sculpt_paint::undo::push_begin(), blender::ed::sculpt_paint::undo::push_end(), blender::ed::sculpt_paint::undo::push_nodes(), replace_attribute(), store_mesh_from_eval(), store_sculpt_entire_mesh(), tag_mesh_positions_changed(), and topology_matches().

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

void blender::ed::sculpt_paint::stroke_cache_common_init ( ViewContext & vc,
const Paint & paint,
const Brush & brush,
Object & object,
float2 mval )

◆ stroke_cache_init()

void blender::ed::sculpt_paint::stroke_cache_init ( ViewContext & vc,
const Sculpt & sd,
const Brush & brush,
Object & ob,
const float mval[2] )
static

Definition at line 5446 of file sculpt.cc.

References blender::ed::sculpt_paint::StrokeCache::accum, blender::BKE_brush_color_jitter_get_settings(), blender::BKE_paint_seed_hsv_jitter(), blender::BLI_dial_init(), blender::BRUSH_ACCUMULATE, brush_flip(), blender::BRUSH_STROKE_ANCHORED, blender::SculptSession::cache, blender::ed::sculpt_paint::StrokeCache::dial, fabsf, blender::ed::sculpt_paint::StrokeCache::first_time, blender::ed::sculpt_paint::StrokeCache::gravity_direction, blender::Sculpt::gravity_factor, blender::Sculpt::gravity_object, blender::ed::sculpt_paint::StrokeCache::initial_direction_flipped, blender::ed::sculpt_paint::StrokeCache::initial_hsv_jitter, blender::ed::sculpt_paint::StrokeCache::initial_mouse, blender::max_ff(), blender::ed::sculpt_paint::StrokeCache::mirror_modifier_clip, blender::math::normalize(), blender::Sculpt::paint, blender::ed::sculpt_paint::StrokeCache::plane_brush, blender::ed::sculpt_paint::StrokeCache::plane_trim_squared, blender::Object::runtime, blender::ed::sculpt_paint::StrokeCache::scale, blender::Object::scale, blender::SCULPT_BRUSH_TYPE_DRAW_SHARP, blender::SCULPT_BRUSH_TYPE_ROTATE, sculpt_init_mirror_clipping(), blender::bke::ObjectRuntime::sculpt_session, stroke_cache_common_init(), stroke_cache_init(), blender::bke::brush::supports_accumulate(), blender::bke::brush::supports_gravity(), blender::ed::sculpt_paint::StrokeCache::supports_gravity, and blender::math::transform_direction().

Referenced by stroke_cache_init(), and blender::ed::sculpt_paint::SculptPaintStroke::test_start().

◆ stroke_cache_update()

void blender::ed::sculpt_paint::stroke_cache_update ( ViewContext & vc,
const Depsgraph & depsgraph,
Paint & paint,
Brush & brush,
Object & object,
const PaintStroke::StrokeStep & stroke_step )
static
See also
vwpaint::update_cache_variants

Definition at line 5551 of file sculpt.cc.

References blender::bke::PaintRuntime::anchored_initial_mouse, blender::bke::PaintRuntime::anchored_size, blender::BKE_brush_unprojected_size_set(), blender::BKE_brush_use_locked_size(), blender::BKE_brush_use_size_pressure(), blender::BKE_curvemapping_evaluateF(), blender::BLI_dial_angle(), brush_delta_update(), brush_dynamic_size_get(), blender::BRUSH_EDGE_TO_EDGE, blender::BRUSH_HARDNESS_PRESSURE, blender::bke::PaintRuntime::brush_rotation, blender::BRUSH_STROKE_ANCHORED, blender::ed::sculpt_paint::StrokeCache::bstrength, blender::SculptSession::cache, cache_paint_brush_variants_update(), calc_motion_normal_from_angle(), blender::ed::sculpt_paint::StrokeCache::clay_thumb_brush, blender::copy_v2_v2(), blender::ed::sculpt_paint::StrokeCache::dial, blender::bke::PaintRuntime::draw_anchored, blender::ed::sculpt_paint::StrokeCache::dyntopo_pixel_radius, blender::Editor, blender::ed::sculpt_paint::StrokeCache::first_time, blender::ed::sculpt_paint::StrokeCache::hardness, init_scene_project_brush_targets(), 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::PaintStroke::StrokeStep::location, blender::ed::sculpt_paint::StrokeCache::location, blender::ed::sculpt_paint::PaintStroke::StrokeStep::mouse, blender::ed::sculpt_paint::StrokeCache::mouse, blender::ed::sculpt_paint::PaintStroke::StrokeStep::mouse_event, blender::ed::sculpt_paint::StrokeCache::mouse_event, object_space_radius_get(), blender::paint_calc_object_space_radius(), paint_supports_dynamic_size(), blender::bke::PaintRuntime::pixel_radius, blender::ed::sculpt_paint::PaintStroke::StrokeStep::pressure, blender::ed::sculpt_paint::StrokeCache::pressure, PRF_scope, blender::ed::sculpt_paint::StrokeCache::radius, blender::ed::sculpt_paint::StrokeCache::radius_squared, blender::Sculpt, blender::SCULPT_BRUSH_TYPE_CLAY_THUMB, blender::SCULPT_BRUSH_TYPE_ROTATE, blender::SCULPT_BRUSH_TYPE_SCENE_PROJECT, blender::SCULPT_BRUSH_TYPE_SNAKE_HOOK, stroke_cache_update(), stroke_is_first_brush_step_of_symmetry_pass(), blender::bke::brush::supports_hardness_pressure(), blender::ed::sculpt_paint::PaintStroke::StrokeStep::tilt, blender::ed::sculpt_paint::StrokeCache::tilt, blender::ed::sculpt_paint::StrokeCache::tip_motion_normal, blender::ViewContext::v3d, blender::ed::sculpt_paint::StrokeCache::vc, blender::ed::sculpt_paint::StrokeCache::vertex_rotation, and blender::ViewContext::view_layer.

Referenced by stroke_cache_update(), and blender::ed::sculpt_paint::SculptPaintStroke::update_step().

◆ stroke_get_location_bvh() [1/3]

std::optional< float3 > blender::ed::sculpt_paint::stroke_get_location_bvh ( bContext * C,
float2 mval,
bool force_original )

Do a ray-cast in the tree to find the 3d brush location (This allows us to ignore the GL depth buffer)

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

Definition at line 4881 of file sculpt.cc.

References blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), C, blender::CTX_data_depsgraph_pointer(), blender::CTX_data_tool_settings(), blender::ED_view3d_viewcontext_init(), blender::ToolSettings::sculpt, and stroke_get_location_bvh().

◆ stroke_get_location_bvh() [2/3]

std::optional< float3 > blender::ed::sculpt_paint::stroke_get_location_bvh ( Depsgraph & depsgraph,
ViewContext & vc,
const Paint & paint,
const Brush * brush,
const float2 mval,
const bool force_original )

◆ stroke_get_location_bvh() [3/3]

◆ stroke_get_location_bvh_ex()

std::optional< float3 > blender::ed::sculpt_paint::stroke_get_location_bvh_ex ( Depsgraph & depsgraph,
ViewContext & vc,
const Paint & paint,
const Sculpt * sd,
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 4735 of file sculpt.cc.

References blender::ed::sculpt_paint::StrokeCache::accum, blender::BKE_paint_brush_for_read(), blender::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, blender::Object::data, blender::ed::sculpt_paint::FindNearestToRayData::depth, blender::ed::sculpt_paint::RaycastData::depth, blender::ed::sculpt_paint::FindNearestToRayData::dist_sq_to_ray, 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, blender::isect_ray_tri_watertight_v3_precalc(), blender::bke::AttributeAccessor::lookup(), blender::bke::pbvh::Mesh, node, blender::ViewContext::obact, blender::ed::sculpt_paint::FindNearestToRayData::object, blender::ed::sculpt_paint::RaycastData::object, object_space_radius_get(), 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(), blender::Object::runtime, sculpt_find_nearest_to_ray_cb(), sculpt_raycast_cb(), blender::bke::ObjectRuntime::sculpt_session, stroke_get_location_bvh_ex(), stroke_modifiers_check(), blender::ed::sculpt_paint::FindNearestToRayData::subdiv_ccg, blender::ed::sculpt_paint::RaycastData::subdiv_ccg, blender::SculptSession::subdiv_ccg, 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(), over_mesh(), stroke_get_location_bvh(), stroke_get_location_bvh(), and stroke_get_location_bvh_ex().

◆ stroke_is_first_brush_step()

bool blender::ed::sculpt_paint::stroke_is_first_brush_step ( const ed::sculpt_paint::StrokeCache & cache)

Return true only once per stroke on the first symmetry pass, regardless of the symmetry passes enabled.

This should be used for functionality that needs to be computed once per stroke of a particular tool (allocating memory, updating random seeds...).

Definition at line 661 of file sculpt.cc.

References blender::ed::sculpt_paint::StrokeCache::first_time, blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, stroke_is_first_brush_step(), and blender::ed::sculpt_paint::StrokeCache::tile_pass.

Referenced by blender::ed::sculpt_paint::brushes::do_surface_smooth_brush(), and stroke_is_first_brush_step().

◆ stroke_is_first_brush_step_of_symmetry_pass()

◆ stroke_is_main_symmetry_pass()

bool blender::ed::sculpt_paint::stroke_is_main_symmetry_pass ( const ed::sculpt_paint::StrokeCache & cache)

◆ stroke_modifiers_check()

◆ symmetrize_exec()

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

Definition at line 218 of file mesh/sculpt_ops.cc.

References blender::BKE_base_is_visible(), blender::BKE_mesh_batch_cache_dirty_tag(), blender::BKE_MESH_BATCH_DIRTY_ALL, blender::BKE_mesh_mirror_apply_mirror_on_axis(), blender::BKE_sculptsession_free_pbvh(), blender::SculptSession::bm, blender::BM_EDGE, blender::BM_ELEM_TAG, blender::SculptSession::bm_log, blender::BM_log_all_added(), blender::BM_log_before_all_removed(), blender::BM_mesh_elem_hflag_disable_all(), blender::BM_mesh_toolflags_set(), blender::bke::pbvh::BMesh, BMO_FLAG_DEFAULTS, blender::BMO_FLAG_RESPECT_HIDE, blender::BMO_op_callf(), C, blender::CTX_data_active_base(), blender::CTX_data_active_object(), blender::CTX_data_depsgraph_pointer(), blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_data_tool_settings(), blender::CTX_wm_view3d(), blender::Object::data, blender::DEG_id_tag_update(), blender::ed::sculpt_paint::undo::Geometry, blender::ed::sculpt_paint::undo::geometry_begin(), blender::ed::sculpt_paint::undo::geometry_end(), blender::bke::pbvh::Grids, blender::Object::id, blender::ID_RECALC_GEOMETRY, blender::bke::pbvh::Mesh, NC_OBJECT, ND_DRAW, blender::OPERATOR_CANCELLED, blender::OPERATOR_FINISHED, blender::bke::object::pbvh_get(), blender::wmOperator::ptr, blender::ed::sculpt_paint::undo::push_begin(), blender::ed::sculpt_paint::undo::push_end(), blender::ed::sculpt_paint::undo::push_node(), blender::RNA_float_get(), blender::Object::runtime, blender::ToolSettings::sculpt, blender::bke::ObjectRuntime::sculpt_session, blender::Sculpt::symmetrize_direction, symmetrize_exec(), blender::ed::sculpt_paint::dyntopo::triangulate(), and blender::WM_event_add_notifier().

Referenced by SCULPT_OT_symmetrize(), and 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

◆ tag_update_overlays()

◆ tiling_preview_draw()

void blender::ed::sculpt_paint::tiling_preview_draw ( const uint gpuattr,
const ARegion * region,
const float true_location[3],
const Paint & paint,
const Object & ob,
const float radius )
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()

◆ transform_brush_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 7889 of file sculpt.cc.

References blender::BLI_assert(), blender::Editor, blender::Span< T >::index_range(), PRF_scope, blender::Span< T >::size(), and translations_from_new_positions().

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

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

void blender::ed::sculpt_paint::update_sculpt_normal ( const Depsgraph & depsgraph,
const Sculpt & sd,
Object & ob,
const brushes::CursorSampleResult & cursor_sample_result )
static

◆ use_add_density_mode()

◆ use_duplicate_previous_key()

◆ vert_neighbors_get_bmesh()

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

Definition at line 490 of file sculpt.cc.

References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BM_ITER_ELEM, blender::BM_LOOPS_OF_VERT, blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::l, blender::BMLoop::next, blender::BMLoop::prev, blender::BMLoop::v, and vert_neighbors_get_bmesh().

Referenced by blender::ed::sculpt_paint::smooth::average_data_bmesh(), blender::ed::sculpt_paint::mask::average_neighbor_mask_bmesh(), blender::ed::sculpt_paint::expand::boundary_from_enabled(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_bmesh(), blender::ed::sculpt_paint::smooth::calc_relaxed_translations_bmesh(), blender::ed::sculpt_paint::filter::calc_sharpen_filter(), blender::ed::sculpt_paint::cloth::calc_vert_neighbor_indices_bmesh(), calc_vert_neighbors(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_sample_from_surface(), blender::ed::sculpt_paint::boundary::edit_data_init_bmesh(), blender::ed::sculpt_paint::flood_fill::FillDataBMesh::execute(), blender::ed::sculpt_paint::pose::grow_factors_bmesh(), blender::ed::sculpt_paint::mask::grow_mask_bmesh(), blender::ed::sculpt_paint::hide::grow_shrink_visibility_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_bmesh(), blender::ed::sculpt_paint::auto_mask::init_boundary_masking_bmesh(), blender::ed::sculpt_paint::boundary::is_vert_in_editable_boundary_bmesh(), blender::ed::sculpt_paint::smooth::neighbor_position_average_bmesh(), blender::ed::sculpt_paint::mask::shrink_mask_bmesh(), and vert_neighbors_get_bmesh().

◆ 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 bke::pbvh::Type::BMesh

Definition at line 154 of file sculpt.cc.

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

Referenced by active_element_info_get(), 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(), mesh_cursor_inactive_draw(), mesh_cursor_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(), vert_random_access_ensure(), vertex_is_occluded(), and blender::ed::sculpt_paint::expand::write_mask_data().

◆ vertex_count_get()

int blender::ed::sculpt_paint::vertex_count_get ( const Object & object)

Definition at line 163 of file sculpt.cc.

References blender::BKE_sculpt_get_grid_num_verts(), blender::BLI_assert(), blender::SculptSession::bm, blender::BM_mesh_elem_count(), blender::BM_VERT, blender::bke::pbvh::BMesh, blender::data, blender::bke::pbvh::Grids, blender::bke::pbvh::Mesh, blender::OB_MESH, blender::bke::object::pbvh_get(), and vertex_count_get().

Referenced by blender::BLI_STATIC_ASSERT(), blender::ed::sculpt_paint::expand::boundary_topology_falloff_create(), blender::ed::sculpt_paint::cloth::brush_simulation_create(), blender::ed::sculpt_paint::auto_mask::cache_init(), blender::ed::sculpt_paint::expand::calc_topology_falloff_from_verts(), blender::ed::sculpt_paint::cloth::cloth_brush_satisfy_constraints(), blender::ed::sculpt_paint::expand::diagonals_falloff_create(), blender::ed::sculpt_paint::brushes::do_enhance_details_brush(), blender::ed::sculpt_paint::brushes::do_layer_brush(), blender::ed::sculpt_paint::brushes::do_surface_smooth_brush(), blender::ed::sculpt_paint::expand::enabled_state_to_bitmap(), fake_neighbor_init(), blender::ed::sculpt_paint::pose::grow_pose_factor(), blender::ed::sculpt_paint::pose::ik_chain_init_topology(), blender::ed::sculpt_paint::expand::init_from_face_set_boundary(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), blender::ed::sculpt_paint::filter::mesh_filter_surface_smooth_init(), blender::ed::sculpt_paint::auto_mask::normal_occlusion_automasking_fill(), blender::ed::sculpt_paint::expand::normals_falloff_create(), blender::ed::sculpt_paint::expand::original_state_store(), blender::ed::sculpt_paint::expand::sculpt_expand_invoke(), blender::ed::sculpt_paint::expand::sculpt_expand_modal(), blender::ed::sculpt_paint::filter::sculpt_filter_specific_init(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), blender::ed::sculpt_paint::expand::spherical_falloff_create(), blender::ed::sculpt_paint::expand::topology_falloff_create(), blender::ed::sculpt_paint::expand::topology_from_state_boundary(), blender::ed::sculpt_paint::expand::update_max_vert_falloff_value(), vertex_count_get(), and blender::ed::sculpt_paint::hide::visibility_filter_exec().

◆ vertex_is_occluded()

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

Definition at line 6255 of file sculpt.cc.

References blender::SculptSession::cache, blender::ed::sculpt_paint::RaycastData::corner_tris, blender::ed::sculpt_paint::RaycastData::corner_verts, blender::data, blender::ed::sculpt_paint::RaycastData::depth, blender::ED_view3d_project_float_v2_m4(), blender::ed::sculpt_paint::RaycastData::faces, blender::SculptSession::filter_cache, blender::bke::pbvh::Grids, blender::ed::sculpt_paint::RaycastData::hit, blender::ed::sculpt_paint::RaycastData::is_mid_stroke, blender::ed::sculpt_paint::RaycastData::isect_precalc, blender::isect_ray_tri_watertight_v3_precalc(), blender::bke::pbvh::Mesh, node, blender::ed::sculpt_paint::RaycastData::object, blender::bke::object::pbvh_get(), position, blender::ed::sculpt_paint::StrokeCache::projection_mat, blender::ed::sculpt_paint::RaycastData::ray_normal, blender::ed::sculpt_paint::RaycastData::ray_start, blender::bke::pbvh::raycast(), raycast_init(), blender::ViewContext::region, sculpt_raycast_cb(), blender::ed::sculpt_paint::RaycastData::subdiv_ccg, blender::SculptSession::subdiv_ccg, blender::ed::sculpt_paint::RaycastData::use_original, blender::ed::sculpt_paint::filter::Cache::vc, blender::ed::sculpt_paint::StrokeCache::vc, blender::ed::sculpt_paint::RaycastData::vert_positions, blender::bke::pbvh::vert_positions_eval(), vert_random_access_ensure(), vertex_is_occluded(), and blender::ed::sculpt_paint::filter::Cache::viewmat.

Referenced by blender::ed::sculpt_paint::auto_mask::calc_view_occlusion_factor(), and vertex_is_occluded().

◆ visit_active_library_catalogs_catalog_for_search_fn()

◆ 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 24 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 23 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 28 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 35 of file paint_image_2d_curve_mask.cc.

Referenced by update_curve_mask(), and update_sampled_curve().

◆ face_set_none_id

int blender::ed::sculpt_paint::face_set_none_id = 0
staticconstexpr

Definition at line 135 of file mesh/sculpt_intern.hh.

Referenced by face_set_extract_invoke().

◆ plane_brush_max_rolling_average_num

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

Definition at line 155 of file mesh/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 654 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 172 of file sculpt_transform.cc.

Referenced by filter_translations_with_symmetry().