77namespace ed::sculpt_paint {
107 std::optional<MutableSpan<float3>> eval_mut_;
113 std::optional<Span<float3x3>> deform_imats_;
120 std::optional<ShapeKeyData> shape_key_data_;
139#define SCULPT_RAKE_BRUSH_FACTOR 0.25f
507 bool force_original);
513 bool force_original);
538 bool use_sampled_normal);
545 bool use_sampled_normal);
616#define FAKE_NEIGHBOR_NONE -1
642 const float3 &motion_normal_local,
643 const float3 &tip_location,
645 float local_mat[4][4],
646 float local_mat_inv[4][4]);
652 const float3 &tip_location,
666 const IndexMask &node_mask,
673 const IndexMask &node_mask);
682 const IndexMask &node_mask,
688 const IndexMask &node_mask,
698 const SubdivCCG &subdiv_ccg,
713 const float br_co[3],
723 const float pivot[3]);
732 float max_distance = std::numeric_limits<float>::max());
735 float max_distance = std::numeric_limits<float>::max());
738 float max_distance = std::numeric_limits<float>::max());
742 float max_distance = std::numeric_limits<float>::max());
750 const Depsgraph &depsgraph,
753 float max_distance = std::numeric_limits<float>::max());
757 float max_distance = std::numeric_limits<float>::max());
761 float max_distance = std::numeric_limits<float>::max());
763 const Depsgraph &depsgraph,
766 float max_distance = std::numeric_limits<float>::max());
774 const bke::pbvh::Node &
node,
785 const Bounds<float3> &
bounds,
787 const float3 &brush_half_lengths =
float3(1.0f, 1.0f, 1.0f),
788 const bool test_z_axis =
true);
803 const std::optional<float3> &ray_direction,
804 IndexMaskMemory &memory);
812 const SculptSession &ss,
814 const float brush_point[3],
832 float tilt_strength);
848 const IndexMask &node_mask,
849 MutableSpan<float3> translations);
942 float scale_factor = 1.0);
957namespace ed::sculpt_paint::expand {
1009namespace ed::sculpt_paint::cloth {
A BVH for high poly meshes.
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
void SCULPT_OT_cloth_filter(wmOperatorType *ot)
void SCULPT_OT_color_filter(wmOperatorType *ot)
void SCULPT_OT_detail_flood_fill(wmOperatorType *ot)
void SCULPT_OT_sample_detail_size(wmOperatorType *ot)
void SCULPT_OT_dynamic_topology_toggle(wmOperatorType *ot)
void SCULPT_OT_dyntopo_detail_size_edit(wmOperatorType *ot)
void modal_keymap(wmKeyConfig *keyconf)
void SCULPT_OT_expand(wmOperatorType *ot)
void SCULPT_OT_face_set_lasso_gesture(wmOperatorType *ot)
void SCULPT_OT_face_set_line_gesture(wmOperatorType *ot)
void SCULPT_OT_face_set_polyline_gesture(wmOperatorType *ot)
void SCULPT_OT_face_sets_init(wmOperatorType *ot)
void SCULPT_OT_face_sets_create(wmOperatorType *ot)
void SCULPT_OT_face_set_change_visibility(wmOperatorType *ot)
void SCULPT_OT_face_sets_randomize_colors(wmOperatorType *ot)
void SCULPT_OT_face_sets_edit(wmOperatorType *ot)
void SCULPT_OT_face_set_box_gesture(wmOperatorType *ot)
void SCULPT_OT_mesh_filter(wmOperatorType *ot)
wmKeyMap * modal_keymap(wmKeyConfig *keyconf)
void SCULPT_OT_mask_filter(wmOperatorType *ot)
void SCULPT_OT_mask_init(wmOperatorType *ot)
void SCULPT_OT_project_line_gesture(wmOperatorType *ot)
void SCULPT_OT_trim_lasso_gesture(wmOperatorType *ot)
void SCULPT_OT_trim_box_gesture(wmOperatorType *ot)
void SCULPT_OT_trim_line_gesture(wmOperatorType *ot)
void SCULPT_OT_trim_polyline_gesture(wmOperatorType *ot)
std::optional< Span< float > > orig_mask_data_lookup_grids(const Object &object, const bke::pbvh::GridsNode &node)
void SCULPT_OT_paint_mask_slice(wmOperatorType *ot)
std::array< int, PAINT_SYMM_AREAS > find_all_symm_verts_bmesh(const Object &object, const int original_vert, const float max_distance)
void face_set_overlay_check(bContext &C, wmOperator &op)
void calc_smooth_translations(const Depsgraph &depsgraph, const Object &object, const IndexMask &node_mask, const MutableSpan< float3 > translations)
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)
float4x4 cube_tip_init(const Object &ob, const Brush &brush)
bool brush_cursor_poll(bContext *C)
bool check_vertex_pivot_symmetry(const float vco[3], const float pco[3], const char symm)
std::optional< Span< int > > orig_face_set_data_lookup_mesh(const Object &object, const bke::pbvh::MeshNode &node)
void vert_random_access_ensure(Object &object)
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)
Vector< int > find_symm_verts_grids(const Object &object, const int original_vert, const float max_distance)
bool node_fully_masked_or_hidden(const bke::pbvh::Node &node)
float3 tilt_effective_normal_get(const SculptSession &ss, const Brush &brush)
Vector< BMVert *, 64 > BMeshNeighborVerts
int vertex_count_get(const Object &object)
std::optional< OrigPositionData > orig_position_data_lookup_grids(const Object &object, const bke::pbvh::GridsNode &node)
ePaintSymmetryAreas get_vertex_symm_area(const float co[3])
void stroke_modifiers_check(Depsgraph &depsgraph, Object &ob, const Brush *brush)
bool node_in_box_positive_z(const float4x4 &mat, const Bounds< float3 > &bounds)
bool stroke_is_first_brush_step_of_symmetry_pass(const StrokeCache &cache)
void orig_position_data_gather_bmesh(const BMLog &bm_log, const Set< BMVert *, 0 > &verts, MutableSpan< float3 > positions, MutableSpan< float3 > normals)
bool stroke_is_first_brush_step(const StrokeCache &cache)
ePaintSymmetryFlags mesh_symmetry_xyz_get(const Object &object)
Vector< int > find_symm_verts_mesh(const Depsgraph &depsgraph, const Object &object, const int original_vert, const float max_distance)
bool sculpt_mode_poll(bContext *C)
static constexpr int face_set_none_id
void calc_vertex_displacement(const SculptSession &ss, const Brush &brush, float translation[3])
void fake_neighbors_free(Object &ob)
float3 calc_motion_normal_from_angle(const ViewContext &vc, const float3 &tip_location, const float angle)
bool color_supported_check(const Scene &scene, Object &object, ReportList *reports)
float raycast_init(ViewContext *vc, const float2 &mval, float3 &r_ray_start, float3 &r_ray_end, float3 &r_ray_normal, bool original)
float3 flip_v3_by_symm_area(const float3 &vector, const ePaintSymmetryFlags symm, const ePaintSymmetryAreas symmarea, const float3 &pivot)
bool brush_type_is_paint(const int tool)
std::array< int, PAINT_SYMM_AREAS > find_all_symm_verts_grids(const Object &object, const int original_vert, const float max_distance)
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)
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< 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)
bool sculpt_mode_poll_view3d(bContext *C)
void SCULPT_OT_brush_stroke(wmOperatorType *ot)
std::optional< ActiveElementInfo > active_element_info_get(ViewContext &vc, const float2 &mval)
void calc_brush_plane(const Depsgraph &depsgraph, const Brush &brush, Object &ob, const IndexMask &node_mask, float3 &r_area_no, float3 &r_area_co)
Span< BMVert * > vert_neighbors_get_interior_bmesh(BMVert &vert, BMeshNeighborVerts &r_neighbors)
std::optional< float3 > calc_area_normal(const Depsgraph &depsgraph, const Brush &brush, const Object &ob, const IndexMask &node_mask)
Span< BMVert * > vert_neighbors_get_bmesh(BMVert &vert, BMeshNeighborVerts &r_neighbors)
OrigPositionData orig_position_data_get_mesh(const Object &object, const bke::pbvh::MeshNode &node)
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)
const float * brush_frontface_normal_from_falloff_shape(const SculptSession &ss, char falloff_shape)
bool vertex_is_occluded(const Depsgraph &depsgraph, const Object &object, const float3 &position, bool original)
void flush_update_step(bContext *C, const UpdateType update_type)
OrigPositionData orig_position_data_get_grids(const Object &object, const bke::pbvh::GridsNode &node)
void flush_update_done(bContext *C, Object &ob, const UpdateType update_type)
void calc_area_center(const Depsgraph &depsgraph, const Brush &brush, const Object &ob, const IndexMask &node_mask, float r_area_co[3])
float object_space_radius_get(const ViewContext &vc, const Paint &paint, const Brush &brush, const float3 &location, const float scale_factor)
BLI_INLINE bool brush_type_is_attribute_only(const int tool)
static constexpr int plane_brush_max_rolling_average_num
float brush_plane_offset_get(const Brush &brush, const SculptSession &ss)
bool stroke_is_main_symmetry_pass(const StrokeCache &cache)
float3 grab_delta_get(const Brush &brush, const StrokeCache &cache)
bool is_vertex_inside_brush_radius_symm(const float vertex[3], const float br_co[3], float radius, char symm)
std::optional< BMVert * > nearest_vert_calc_bmesh(const bke::pbvh::Tree &pbvh, const float3 &location, const float max_distance, const bool use_original)
bool sculpt_mode_and_brush_poll(bContext *C)
Span< int > fake_neighbors_ensure(const Depsgraph &depsgraph, Object &ob, const float max_dist)
std::optional< CursorGeometryInfo > cursor_geometry_info_update(bContext *C, const float2 &mval, const bool use_sampled_normal)
void flip_quat_by_symm_area(float quat[4], const ePaintSymmetryFlags symm, const ePaintSymmetryAreas symmarea, const float pivot[3])
std::optional< Span< float > > orig_mask_data_lookup_mesh(const Object &object, const bke::pbvh::MeshNode &node)
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< OrigPositionData > orig_position_data_lookup_mesh_all_verts(const Object &object, const bke::pbvh::MeshNode &node)
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])
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_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])
TransformDisplacementMode
std::optional< OrigPositionData > orig_position_data_lookup_mesh(const Object &object, const bke::pbvh::MeshNode &node)
Vector< int > find_symm_verts(const Depsgraph &depsgraph, const Object &object, const int original_vert, const float max_distance)
std::optional< Span< int > > orig_face_set_data_lookup_grids(const Object &object, const bke::pbvh::GridsNode &node)
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 SCULPT_OT_paint_mask_extract(wmOperatorType *ot)
void mask_overlay_check(bContext &C, wmOperator &op)
bool brush_uses_vector_displacement(const Brush &brush)
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)
void SCULPT_OT_face_set_extract(wmOperatorType *ot)
void cache_calc_brushdata_symm(StrokeCache &cache, const ePaintSymmetryFlags symm, const char axis, const float angle)
bool brush_type_is_mask(const int tool)
void SCULPT_OT_set_pivot_position(wmOperatorType *ot)
void tag_update_overlays(bContext *C)
void geometry_preview_lines_update(Depsgraph &depsgraph, Object &object, SculptSession &ss, float radius)
Span< float3 > vert_positions_for_grab_active_get(const Depsgraph &depsgraph, const Object &object)
float3 tilt_apply_to_normal(const Object &object, const float4x4 &view_inverse, const float3 &normal, const float2 &tilt, const float tilt_strength)
std::array< int, PAINT_SYMM_AREAS > find_all_symm_verts(const Depsgraph &depsgraph, 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)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
std::variant< std::monostate, int, BMVert * > ActiveVert
@ BRUSH_USE_COLOR_AS_DISPLACEMENT
MatBase< float, 4, 4 > float4x4
@ SCULPT_BRUSH_TYPE_SMEAR
@ SCULPT_BRUSH_TYPE_DRAW_FACE_SETS
@ SCULPT_BRUSH_TYPE_PAINT
VecBase< float, 4 > float4
VecBase< float, 2 > float2
VecBase< float, 3 > float3
static MatBase identity()
const bke::bvh::Tree * tree_data
float4x4 active_to_target_matrix
static std::optional< ShapeKeyData > from_object(Object &object)
Vector< MutableSpan< float3 > > dependent_keys
MutableSpan< float3 > active_key_data
std::array< float, 10 > pressure_stabilizer
Array< float3 > limit_surface_co
Array< float3 > prev_displacement
float4 wet_mix_prev_color
Array< float4 > mix_colors
Array< float4 > prev_colors
std::optional< float > density_seed
std::optional< float3 > last_center
std::optional< float3 > last_normal
StrokeToggleSettings toggle_settings
Array< float3 > detail_directions
std::optional< math::Quaternion > rake_rotation
struct blender::ed::sculpt_paint::StrokeCache::@152245166116023055361007250031254315334135310141 mirror_modifier_clip
std::unique_ptr< pose::IKChain > pose_ik_chain
float3 initial_normal_symm
Array< float > layer_displacement_factor
Vector< ProjectBrushTarget > project_targets
float3 gravity_direction_symm
float base_brush_strength
std::optional< float3 > initial_hsv_jitter
float4x4 brush_local_mat_inv
float3 sculpt_normal_symm
struct blender::ed::sculpt_paint::StrokeCache::@225223164012065274011166026353012314236244015262 plane_brush
std::unique_ptr< auto_mask::Cache > automasking
struct blender::ed::sculpt_paint::StrokeCache::@210266372035032112040136174225236171214246130144 displacement_smear
float dyntopo_pixel_radius
float multiplane_scrape_angle
float3 initial_location_symm
struct blender::ed::sculpt_paint::StrokeCache::@211256062006232337057366306324060315203271114371 clay_thumb_brush
float4x4 stroke_local_mat
float4x4 symm_rot_mat_inv
struct blender::ed::sculpt_paint::StrokeCache::@346250254335162214324031351310170235363204044376 paint_brush
std::optional< math::Quaternion > rake_rotation_symm
float3 last_location_symm
ePaintSymmetryFlags mirror_symmetry_pass
float3 tip_motion_normal_symm
Array< float3 > surface_smooth_laplacian_disp
std::unique_ptr< cloth::SimulationData > cloth_sim
std::array< std::unique_ptr< boundary::SculptBoundary >, PAINT_SYMM_AREAS > boundaries
float3 orig_grab_location
bool initial_direction_flipped
Brush * original_active_brush
BrushMaskTool original_brush_mask_tool