Blender V5.0
sculpt_intern.hh File Reference
#include <optional>
#include "BKE_paint.hh"
#include "BKE_paint_bvh.hh"
#include "BKE_subdiv_ccg.hh"
#include "BLI_array.hh"
#include "BLI_math_matrix_types.hh"
#include "BLI_math_quaternion_types.hh"
#include "BLI_math_vector_types.hh"
#include "BLI_set.hh"
#include "BLI_span.hh"
#include "BLI_vector.hh"
#include "DNA_brush_enums.h"
#include "DNA_brush_types.h"
#include "ED_view3d.hh"

Go to the source code of this file.

Classes

struct  blender::ed::sculpt_paint::ShapeKeyData
class  blender::ed::sculpt_paint::PositionDeformData
struct  SculptRakeData
struct  blender::ed::sculpt_paint::StrokeCache
struct  blender::ed::sculpt_paint::CursorGeometryInfo
struct  blender::ed::sculpt_paint::OrigPositionData

Namespaces

namespace  blender
namespace  blender::ed
namespace  blender::ed::sculpt_paint
namespace  blender::ed::sculpt_paint::auto_mask
namespace  blender::ed::sculpt_paint::boundary
namespace  blender::ed::sculpt_paint::cloth
namespace  blender::ed::sculpt_paint::pose
namespace  blender::ed::sculpt_paint::undo
namespace  blender::ed::sculpt_paint::expand
namespace  blender::ed::sculpt_paint::project
namespace  blender::ed::sculpt_paint::trim
namespace  blender::ed::sculpt_paint::face_set
namespace  blender::ed::sculpt_paint::filter
namespace  blender::ed::sculpt_paint::color
namespace  blender::ed::sculpt_paint::mask
namespace  blender::ed::sculpt_paint::dyntopo

Macros

Sculpt Types
#define SCULPT_RAKE_BRUSH_FACTOR   0.25f

Typedefs

using blender::ed::sculpt_paint::BMeshNeighborVerts = Vector<BMVert *, 64>

Enumerations

enum class  blender::ed::sculpt_paint::UpdateType {
  blender::ed::sculpt_paint::Position , blender::ed::sculpt_paint::Mask , blender::ed::sculpt_paint::Visibility , blender::ed::sculpt_paint::Color ,
  blender::ed::sculpt_paint::Image , blender::ed::sculpt_paint::FaceSet
}
enum class  blender::ed::sculpt_paint::TransformDisplacementMode { blender::ed::sculpt_paint::Original = 0 , blender::ed::sculpt_paint::Incremental = 1 }

Functions

bool blender::ed::sculpt_paint::color_supported_check (const Scene &scene, Object &object, ReportList *reports)
void blender::ed::sculpt_paint::flush_update_step (const bContext *C, const UpdateType update_type)
void blender::ed::sculpt_paint::flush_update_done (const bContext *C, Object &ob, const UpdateType update_type)
bool blender::ed::sculpt_paint::stroke_get_location_bvh (bContext *C, float out[3], const float mval[2], const bool force_original)
bool blender::ed::sculpt_paint::cursor_geometry_info_update (bContext *C, CursorGeometryInfo *out, const float2 &mval, const bool use_sampled_normal)
void blender::ed::sculpt_paint::geometry_preview_lines_update (Depsgraph &depsgraph, Object &object, SculptSession &ss, float radius)
float blender::ed::sculpt_paint::raycast_init (ViewContext *vc, const float2 &mval, float3 &r_ray_start, float3 &r_ray_end, float3 &r_ray_normal, bool original)
void blender::ed::sculpt_paint::vert_random_access_ensure (Object &object)
bool blender::ed::sculpt_paint::vertex_is_occluded (const Depsgraph &depsgraph, const Object &object, const float3 &position, bool original)
Span< float3blender::ed::sculpt_paint::vert_positions_for_grab_active_get (const Depsgraph &depsgraph, const Object &object)
Span< BMVert * > blender::ed::sculpt_paint::vert_neighbors_get_bmesh (BMVert &vert, BMeshNeighborVerts &r_neighbors)
Span< BMVert * > blender::ed::sculpt_paint::vert_neighbors_get_interior_bmesh (BMVert &vert, BMeshNeighborVerts &r_neighbors)
Span< int > blender::ed::sculpt_paint::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)
float blender::ed::sculpt_paint::brush_plane_offset_get (const Brush &brush, const SculptSession &ss)
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)
std::optional< float3blender::ed::sculpt_paint::calc_area_normal (const Depsgraph &depsgraph, const Brush &brush, const Object &ob, const IndexMask &node_mask)
void blender::ed::sculpt_paint::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])
void blender::ed::sculpt_paint::calc_area_center (const Depsgraph &depsgraph, const Brush &brush, const Object &ob, const IndexMask &node_mask, float r_area_co[3])
std::optional< int > blender::ed::sculpt_paint::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< SubdivCCGCoordblender::ed::sculpt_paint::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 * > blender::ed::sculpt_paint::nearest_vert_calc_bmesh (const bke::pbvh::Tree &pbvh, const float3 &location, const float max_distance, const bool use_original)
Vector< int > blender::ed::sculpt_paint::find_symm_verts_mesh (const Depsgraph &depsgraph, const Object &object, const int original_vert, const float max_distance)
Vector< int > blender::ed::sculpt_paint::find_symm_verts_grids (const Object &object, const int original_vert, const float max_distance)
Vector< int > blender::ed::sculpt_paint::find_symm_verts_bmesh (const Object &object, const int original_vert, const float max_distance)
Vector< int > blender::ed::sculpt_paint::find_symm_verts (const Depsgraph &depsgraph, const Object &object, const int original_vert, const float max_distance)
bool blender::ed::sculpt_paint::node_fully_masked_or_hidden (const bke::pbvh::Node &node)
bool blender::ed::sculpt_paint::node_in_sphere (const bke::pbvh::Node &node, const float3 &location, const float radius_sq, const bool original)
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)
IndexMask blender::ed::sculpt_paint::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)
float3 blender::ed::sculpt_paint::tilt_apply_to_normal (const Object &object, const float4x4 &view_inverse, const float3 &normal, const float2 &tilt, const float tilt_strength)
float3 blender::ed::sculpt_paint::tilt_apply_to_normal (const float3 &normal, const StrokeCache &cache, const float tilt_strength)
float3 blender::ed::sculpt_paint::tilt_effective_normal_get (const SculptSession &ss, const Brush &brush)
void blender::ed::sculpt_paint::calc_smooth_translations (const Depsgraph &depsgraph, const Object &object, const IndexMask &node_mask, const MutableSpan< float3 > translations)
std::optional< OrigPositionDatablender::ed::sculpt_paint::orig_position_data_lookup_mesh_all_verts (const Object &object, const bke::pbvh::MeshNode &node)
std::optional< OrigPositionDatablender::ed::sculpt_paint::orig_position_data_lookup_mesh (const Object &object, const bke::pbvh::MeshNode &node)
OrigPositionData blender::ed::sculpt_paint::orig_position_data_get_mesh (const Object &object, const bke::pbvh::MeshNode &node)
std::optional< OrigPositionDatablender::ed::sculpt_paint::orig_position_data_lookup_grids (const Object &object, const bke::pbvh::GridsNode &node)
OrigPositionData blender::ed::sculpt_paint::orig_position_data_get_grids (const Object &object, const bke::pbvh::GridsNode &node)
void blender::ed::sculpt_paint::orig_position_data_gather_bmesh (const BMLog &bm_log, const Set< BMVert *, 0 > &verts, MutableSpan< float3 > positions, MutableSpan< float3 > normals)
std::optional< Span< float4 > > blender::ed::sculpt_paint::orig_color_data_lookup_mesh (const Object &object, const bke::pbvh::MeshNode &node)
Span< float4blender::ed::sculpt_paint::orig_color_data_get_mesh (const Object &object, const bke::pbvh::MeshNode &node)
std::optional< Span< int > > blender::ed::sculpt_paint::orig_face_set_data_lookup_mesh (const Object &object, const bke::pbvh::MeshNode &node)
std::optional< Span< int > > blender::ed::sculpt_paint::orig_face_set_data_lookup_grids (const Object &object, const bke::pbvh::GridsNode &node)
std::optional< Span< float > > blender::ed::sculpt_paint::orig_mask_data_lookup_mesh (const Object &object, const bke::pbvh::MeshNode &node)
std::optional< Span< float > > blender::ed::sculpt_paint::orig_mask_data_lookup_grids (const Object &object, const bke::pbvh::GridsNode &node)
bool blender::ed::sculpt_paint::brush_type_is_paint (const int tool)
bool blender::ed::sculpt_paint::brush_type_is_mask (const int tool)
BLI_INLINE bool blender::ed::sculpt_paint::brush_type_is_attribute_only (const int tool)
bool blender::ed::sculpt_paint::brush_uses_vector_displacement (const Brush &brush)
float blender::ed::sculpt_paint::object_space_radius_get (const ViewContext &vc, const Paint &paint, const Brush &brush, const float3 &location, const float scale_factor)
void blender::ed::sculpt_paint::SCULPT_OT_brush_stroke (wmOperatorType *ot)
void blender::ed::sculpt_paint::expand::SCULPT_OT_expand (wmOperatorType *ot)
void blender::ed::sculpt_paint::expand::modal_keymap (wmKeyConfig *keyconf)
void blender::ed::sculpt_paint::project::SCULPT_OT_project_line_gesture (wmOperatorType *ot)
void blender::ed::sculpt_paint::trim::SCULPT_OT_trim_lasso_gesture (wmOperatorType *ot)
void blender::ed::sculpt_paint::trim::SCULPT_OT_trim_box_gesture (wmOperatorType *ot)
void blender::ed::sculpt_paint::trim::SCULPT_OT_trim_line_gesture (wmOperatorType *ot)
void blender::ed::sculpt_paint::trim::SCULPT_OT_trim_polyline_gesture (wmOperatorType *ot)
void blender::ed::sculpt_paint::SCULPT_OT_set_pivot_position (wmOperatorType *ot)
void blender::ed::sculpt_paint::filter::SCULPT_OT_mesh_filter (wmOperatorType *ot)
wmKeyMapblender::ed::sculpt_paint::filter::modal_keymap (wmKeyConfig *keyconf)
void blender::ed::sculpt_paint::cloth::SCULPT_OT_cloth_filter (wmOperatorType *ot)
void blender::ed::sculpt_paint::color::SCULPT_OT_color_filter (wmOperatorType *ot)
void blender::ed::sculpt_paint::mask::SCULPT_OT_mask_filter (wmOperatorType *ot)
void blender::ed::sculpt_paint::mask::SCULPT_OT_mask_init (wmOperatorType *ot)
void blender::ed::sculpt_paint::dyntopo::SCULPT_OT_dynamic_topology_toggle (wmOperatorType *ot)
Sculpt Poll Functions
bool SCULPT_mode_poll (bContext *C)
bool SCULPT_mode_poll_view3d (bContext *C)
bool SCULPT_poll (bContext *C)
bool SCULPT_brush_cursor_poll (bContext *C)
Sculpt Update Functions
void SCULPT_tag_update_overlays (bContext *C)
Stroke Functions
void SCULPT_stroke_modifiers_check (const bContext *C, Object &ob, const Brush &brush)
ePaintSymmetryFlags SCULPT_mesh_symmetry_xyz_get (const Object &object)
bool SCULPT_stroke_is_main_symmetry_pass (const blender::ed::sculpt_paint::StrokeCache &cache)
bool SCULPT_stroke_is_first_brush_step (const blender::ed::sculpt_paint::StrokeCache &cache)
bool SCULPT_stroke_is_first_brush_step_of_symmetry_pass (const blender::ed::sculpt_paint::StrokeCache &cache)
void sculpt_project_v3_normal_align (const SculptSession &ss, float normal_weight, float grab_delta[3])
Brush Utilities.
ePaintSymmetryAreas SCULPT_get_vertex_symm_area (const float co[3])
bool SCULPT_check_vertex_pivot_symmetry (const float vco[3], const float pco[3], char symm)
bool SCULPT_is_vertex_inside_brush_radius_symm (const float vertex[3], const float br_co[3], float radius, char symm)
blender::float3 SCULPT_flip_v3_by_symm_area (const blender::float3 &vector, ePaintSymmetryFlags symm, ePaintSymmetryAreas symmarea, const blender::float3 &pivot)
void SCULPT_flip_quat_by_symm_area (float quat[4], ePaintSymmetryFlags symm, ePaintSymmetryAreas symmarea, const float pivot[3])
const floatSCULPT_brush_frontface_normal_from_falloff_shape (const SculptSession &ss, char falloff_shape)
void SCULPT_cube_tip_init (const Sculpt &sd, const Object &ob, const Brush &brush, float mat[4][4])
void sculpt_apply_texture (const SculptSession &ss, const Brush &brush, const float brush_point[3], int thread_id, float *r_value, float r_rgba[4])
void SCULPT_calc_vertex_displacement (const SculptSession &ss, const Brush &brush, float translation[3])
void SCULPT_cache_calc_brushdata_symm (blender::ed::sculpt_paint::StrokeCache &cache, ePaintSymmetryFlags symm, char axis, float angle)
Sculpt Mode Toggle Operator
void blender::ed::sculpt_paint::ensure_valid_pivot (const Object &ob, Paint &paint)
3D Texture Paint (Experimental)
bool SCULPT_paint_image_canvas_get (PaintModeSettings &paint_mode_settings, Object &ob, Image **r_image, ImageUser **r_image_user) ATTR_NONNULL()
 Get the image canvas for painting on the given object.
void SCULPT_do_paint_brush_image (const Depsgraph &depsgraph, PaintModeSettings &paint_mode_settings, const Sculpt &sd, Object &ob, const blender::IndexMask &node_mask)
bool SCULPT_use_image_paint_brush (PaintModeSettings &settings, Object &ob)
Global Mesh Operators

Operators that work on the mesh as a whole.

void blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_randomize_colors (wmOperatorType *ot)
void blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_change_visibility (wmOperatorType *ot)
void blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_init (wmOperatorType *ot)
void blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_create (wmOperatorType *ot)
void blender::ed::sculpt_paint::face_set::SCULPT_OT_face_sets_edit (wmOperatorType *ot)
Gesture Operators

Operators that modify face sets based on a selected area.

void blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_lasso_gesture (wmOperatorType *ot)
void blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_box_gesture (wmOperatorType *ot)
void blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_line_gesture (wmOperatorType *ot)
void blender::ed::sculpt_paint::face_set::SCULPT_OT_face_set_polyline_gesture (wmOperatorType *ot)
Detail Flood Fill
void blender::ed::sculpt_paint::dyntopo::SCULPT_OT_detail_flood_fill (wmOperatorType *ot)
Sample Detail Size
void blender::ed::sculpt_paint::dyntopo::SCULPT_OT_sample_detail_size (wmOperatorType *ot)
Dyntopo Detail Size Edit Operator
void blender::ed::sculpt_paint::dyntopo::SCULPT_OT_dyntopo_detail_size_edit (wmOperatorType *ot)

Variables

static constexpr int blender::ed::sculpt_paint::plane_brush_max_rolling_average_num = 20

Sculpt mesh accessor API

#define FAKE_NEIGHBOR_NONE   -1
int SCULPT_vertex_count_get (const Object &object)
blender::Span< int > SCULPT_fake_neighbors_ensure (const Depsgraph &depsgraph, Object &ob, float max_dist)
void SCULPT_fake_neighbors_free (Object &ob)

Macro Definition Documentation

◆ FAKE_NEIGHBOR_NONE

◆ SCULPT_RAKE_BRUSH_FACTOR

#define SCULPT_RAKE_BRUSH_FACTOR   0.25f

Definition at line 130 of file sculpt_intern.hh.

Referenced by blender::ed::sculpt_paint::brush_delta_update().

Function Documentation

◆ sculpt_apply_texture()

◆ SCULPT_brush_cursor_poll()

bool SCULPT_brush_cursor_poll ( bContext * C)

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

Definition at line 3734 of file sculpt.cc.

References C, is_brush_related_tool(), blender::ed::sculpt_paint::paint_brush_cursor_poll(), and SCULPT_mode_poll().

Referenced by blender::ed::sculpt_paint::object_sculpt_mode_enter().

◆ SCULPT_brush_frontface_normal_from_falloff_shape()

◆ SCULPT_cache_calc_brushdata_symm()

void SCULPT_cache_calc_brushdata_symm ( blender::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 3465 of file sculpt.cc.

References angle(), 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, mul_m4_v3(), mul_v3_fl(), PAINT_SYMMETRY_FEATHER, blender::ed::sculpt_paint::StrokeCache::plane_offset, printf, blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::ed::sculpt_paint::StrokeCache::rake_rotation, blender::ed::sculpt_paint::StrokeCache::rake_rotation_symm, 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, blender::ed::sculpt_paint::symmetry_flip(), blender::ed::sculpt_paint::StrokeCache::view_normal, blender::ed::sculpt_paint::StrokeCache::view_normal_symm, and zero_v3().

Referenced by blender::ed::sculpt_paint::do_radial_symmetry(), blender::ed::sculpt_paint::do_symmetrical_brush_actions(), vpaint_do_paint(), vpaint_do_symmetrical_brush_actions(), wpaint_do_paint(), and wpaint_do_symmetrical_brush_actions().

◆ SCULPT_calc_vertex_displacement()

◆ SCULPT_check_vertex_pivot_symmetry()

◆ SCULPT_cube_tip_init()

◆ SCULPT_do_paint_brush_image()

◆ SCULPT_fake_neighbors_ensure()

blender::Span< int > SCULPT_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 6098 of file sculpt.cc.

References SculptFakeNeighbors::current_max_distance, depsgraph, blender::ed::sculpt_paint::islands::ensure_cache(), SculptFakeNeighbors::fake_neighbor_index, blender::ed::sculpt_paint::fake_neighbor_init(), blender::ed::sculpt_paint::fake_neighbor_search(), SculptSession::fake_neighbors, Array< T, InlineBufferCapacity, Allocator >::is_empty(), and Object::sculpt.

Referenced by blender::ed::sculpt_paint::pose::ik_chain_init().

◆ SCULPT_fake_neighbors_free()

◆ SCULPT_flip_quat_by_symm_area()

void SCULPT_flip_quat_by_symm_area ( float quat[4],
ePaintSymmetryFlags symm,
ePaintSymmetryAreas symmarea,
const float pivot[3] )

◆ SCULPT_flip_v3_by_symm_area()

blender::float3 SCULPT_flip_v3_by_symm_area ( const blender::float3 & vector,
ePaintSymmetryFlags symm,
ePaintSymmetryAreas symmarea,
const blender::float3 & pivot )

References depsgraph.

◆ SCULPT_get_vertex_symm_area()

◆ SCULPT_is_vertex_inside_brush_radius_symm()

bool SCULPT_is_vertex_inside_brush_radius_symm ( const float vertex[3],
const float br_co[3],
float radius,
char symm )

◆ SCULPT_mesh_symmetry_xyz_get()

ePaintSymmetryFlags SCULPT_mesh_symmetry_xyz_get ( const Object & object)

Definition at line 184 of file sculpt.cc.

References Mesh::symmetry.

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::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::cursor_draw_point_with_symmetry(), blender::ed::sculpt_paint::pose::do_pose_brush(), blender::ed::sculpt_paint::do_symmetrical_brush_actions(), 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(), blender::ed::sculpt_paint::find_symm_verts_bmesh(), blender::ed::sculpt_paint::find_symm_verts_grids(), blender::ed::sculpt_paint::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(), blender::ed::sculpt_paint::expand::reposition_pivot(), blender::ed::sculpt_paint::sculpt_transform_all_vertices(), blender::ed::sculpt_paint::set_pivot_position_exec(), blender::ed::sculpt_paint::transform_node_bmesh(), blender::ed::sculpt_paint::transform_node_grids(), blender::ed::sculpt_paint::transform_node_mesh(), blender::ed::sculpt_paint::transform_radius_elastic(), vpaint_do_symmetrical_brush_actions(), and wpaint_do_symmetrical_brush_actions().

◆ SCULPT_mode_poll()

bool SCULPT_mode_poll ( bContext * C)

Definition at line 3677 of file sculpt.cc.

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

Referenced by ED_keymap_paint(), blender::ed::sculpt_paint::no_multires_poll(), blender::ed::sculpt_paint::mask::PAINT_OT_mask_flood_fill(), blender::ed::sculpt_paint::dyntopo::sculpt_and_constant_or_manual_detail_poll(), blender::ed::sculpt_paint::dyntopo::sculpt_and_dynamic_topology_poll(), SCULPT_brush_cursor_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(), blender::ed::sculpt_paint::SCULPT_OT_optimize(), blender::ed::sculpt_paint::SCULPT_OT_sample_color(), blender::ed::sculpt_paint::dyntopo::SCULPT_OT_sample_detail_size(), blender::ed::sculpt_paint::SCULPT_OT_set_persistent_base(), blender::ed::sculpt_paint::SCULPT_OT_set_pivot_position(), and SCULPT_poll().

◆ SCULPT_mode_poll_view3d()

bool SCULPT_mode_poll_view3d ( bContext * C)

Definition at line 3683 of file sculpt.cc.

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

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

bool SCULPT_paint_image_canvas_get ( PaintModeSettings & paint_mode_settings,
Object & ob,
Image ** r_image,
ImageUser ** r_image_user )

Get the image canvas for painting on the given object.

Returns
true if an image is found. The #r_image and #r_image_user fields are filled with the image and image user. Returns false when the image isn't found. In the later case the r_image and r_image_user are set to NULL.

Definition at line 466 of file sculpt_paint_image.cc.

References blender::ed::sculpt_paint::paint::image::ImageData::image, blender::ed::sculpt_paint::paint::image::ImageData::image_user, and blender::ed::sculpt_paint::paint::image::ImageData::init_active_image().

Referenced by sculpt_needs_pbvh_pixels(), and sculpt_pbvh_update_pixels().

◆ SCULPT_poll()

bool SCULPT_poll ( bContext * C)

Checks for a brush, not just sculpt mode.

Definition at line 3689 of file sculpt.cc.

References C, blender::ed::sculpt_paint::paint_brush_tool_poll(), and SCULPT_mode_poll().

Referenced by blender::ed::sculpt_paint::SCULPT_OT_brush_stroke().

◆ sculpt_project_v3_normal_align()

void sculpt_project_v3_normal_align ( const SculptSession & ss,
float normal_weight,
float grab_delta[3] )

◆ SCULPT_stroke_is_first_brush_step()

bool SCULPT_stroke_is_first_brush_step ( const blender::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 536 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, and blender::ed::sculpt_paint::StrokeCache::tile_pass.

Referenced by blender::ed::sculpt_paint::brushes::do_surface_smooth_brush().

◆ SCULPT_stroke_is_first_brush_step_of_symmetry_pass()

◆ SCULPT_stroke_is_main_symmetry_pass()

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

◆ SCULPT_stroke_modifiers_check()

◆ SCULPT_tag_update_overlays()

◆ SCULPT_use_image_paint_brush()

◆ SCULPT_vertex_count_get()

int SCULPT_vertex_count_get ( const Object & object)

Definition at line 151 of file sculpt.cc.

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

Referenced by blender::ed::sculpt_paint::expand::boundary_from_enabled(), 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(), blender::ed::sculpt_paint::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(), and blender::ed::sculpt_paint::hide::visibility_filter_exec().