Blender V4.3
sculpt_intern.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2006 by Nicholas Bishop. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include <optional>
12#include <queue>
13
14#include "BKE_attribute.hh"
15#include "BKE_paint.hh"
16#include "BKE_pbvh_api.hh"
17#include "BKE_subdiv_ccg.hh"
18
19#include "BLI_array.hh"
20#include "BLI_generic_array.hh"
24#include "BLI_set.hh"
25#include "BLI_span.hh"
26#include "BLI_vector.hh"
27
28#include "DNA_brush_enums.h"
29
30#include "ED_view3d.hh"
31
33namespace auto_mask {
34struct Cache;
35}
36namespace boundary {
37struct SculptBoundary;
38}
39namespace cloth {
40struct SimulationData;
41}
42namespace pose {
43struct IKChain;
44}
45namespace undo {
46struct Node;
47enum class Type : int8_t;
48} // namespace undo
49} // namespace blender::ed::sculpt_paint
50struct BMLog;
51struct Dial;
53struct Image;
54struct ImageUser;
55struct Key;
56struct KeyBlock;
57struct Object;
58struct bContext;
60struct wmKeyConfig;
61struct wmKeyMap;
62struct wmOperatorType;
63
64/* -------------------------------------------------------------------- */
69
75 public:
82
83 private:
89 std::optional<MutableSpan<float3>> eval_mut_;
90
95 std::optional<Span<float3x3>> deform_imats_;
96
101
102 Key *keys_;
103 KeyBlock *active_key_;
104 bool basis_active_;
105 std::optional<Array<bool>> dependent_keys_;
106
107 public:
108 PositionDeformData(const Depsgraph &depsgraph, Object &object_orig);
109 void deform(MutableSpan<float3> translations, Span<int> verts) const;
110};
111
112enum class UpdateType {
113 Position,
114 Mask,
116 Color,
117 Image,
118 FaceSet,
119};
120
121} // namespace blender::ed::sculpt_paint
122
128
129/* Factor of brush to have rake point following behind
130 * (could be configurable but this is reasonable default). */
131#define SCULPT_RAKE_BRUSH_FACTOR 0.25f
132
138
141 /* Displaces the elements from their original coordinates. */
142 Original = 0,
143 /* Displaces the elements incrementally from their previous position. */
144 Incremental = 1,
145};
146}
147/* Defines how transform tools are going to apply its displacement. */
148
150
156 /* Invariants */
159 struct {
166
167 /* Variants */
168 float radius;
175
176 /* Used for alternating between deformation in brushes that need to apply different ones to
177 * achieve certain effects. */
179
180 /* Original pixel radius with the pressure curve applied for dyntopo detail size */
182
184
186
193 bool invert;
194 float pressure;
195 float hardness;
203 float normal_weight; /* from brush (with optional override) */
205
206 /* Position of the mouse corresponding to the stroke location, modified by the paint_stroke
207 * operator according to the stroke type. */
209 /* Position of the mouse event in screen space, not modified by the stroke type. */
211
212 struct {
216
217 /* The rest is temporary storage that isn't saved as a property */
218
219 bool first_time; /* Beginning of stroke may do some things special */
220
221 /* from ED_view3d_ob_project_mat_get() */
223
224 /* Clean this up! */
226 const Brush *brush;
227
231
232 /* screen-space rotation defined by mouse motion */
233 std::optional<math::Quaternion> rake_rotation;
234 std::optional<math::Quaternion> rake_rotation_symm;
236
237 /* Face Sets */
239
240 /* Symmetry index between 0 and 7 bit combo 0 is Brush only;
241 * 1 is X mirror; 2 is Y mirror; 3 is XY; 4 is Z; 5 is XZ; 6 is YZ; 7 is XYZ */
243 /* The symmetry pass we are currently on between 0 and 7. */
247
248 /* sculpt_normal gets calculated by calc_sculpt_normal(), then the
249 * sculpt_normal_symm gets updated quickly with the usual symmetry
250 * transforms */
253
254 /* Used for area texture mode, local_mat gets calculated by
255 * calc_brush_local_mat() and used in sculpt_apply_texture().
256 * Transforms from model-space coords to local area coords.
257 */
259 /* The matrix from local area coords to model-space coords is used to calculate the vector
260 * displacement in area plane mode. */
262
263 float3 plane_offset; /* used to shift the plane around when doing tiled strokes */
265
270
275 bool accum;
276
277 /* Paint Brush. */
278 struct {
279 float flow;
280
282 float wet_mix;
284
286 float density;
287
295
296 /* Pose brush */
297 std::unique_ptr<pose::IKChain> pose_ik_chain;
298
299 /* Enhance Details. */
301
302 /* Clay Thumb brush */
303 struct {
304 /* Angle of the front tilting plane of the brush to simulate clay accumulation. */
306 /* Stores the last 10 pressure samples to get an stabilized strength and radius variation. */
307 std::array<float, 10> pressure_stabilizer;
309
311
312 /* Cloth brush */
313 std::unique_ptr<cloth::SimulationData> cloth_sim;
318
319 /* Boundary brush */
320 std::array<std::unique_ptr<boundary::SculptBoundary>, PAINT_SYMM_AREAS> boundaries;
321
322 /* Surface Smooth Brush */
323 /* Stores the displacement produced by the laplacian step of HC smooth. */
325
326 /* Layer brush */
328
329 float vertex_rotation; /* amount to rotate the vertices when using rotate brush */
331
334 int saved_smooth_size; /* smooth tool copies the size of the current tool */
335
343
345
349
350 std::unique_ptr<auto_mask::Cache> automasking;
351
354
355 rcti previous_r; /* previous redraw rectangle */
356 rcti current_r; /* current redraw rectangle */
357
358 ~StrokeCache();
359};
360
361} // namespace blender::ed::sculpt_paint
362
365/* -------------------------------------------------------------------- */
374bool SCULPT_poll(bContext *C);
375
380
391bool SCULPT_handles_colors_report(const Object &object, ReportList *reports);
392
395/* -------------------------------------------------------------------- */
400
404void flush_update_step(bContext *C, UpdateType update_type);
408void flush_update_done(const bContext *C, Object &ob, UpdateType update_type);
409
410} // namespace blender::ed::sculpt_paint
411
418/* -------------------------------------------------------------------- */
432 float out[3],
433 const float mval[2],
434 bool force_original,
435 bool check_closest,
436 bool limit_closest_radius);
437
439 float out[3],
440 const float mouse[2],
441 bool force_original);
448 const float mouse[2],
449 bool use_sampled_normal);
450
452
454 Object &object,
455 SculptSession &ss,
456 float radius);
457
458}
459
460void SCULPT_stroke_modifiers_check(const bContext *C, Object &ob, const Brush &brush);
462 const float mval[2],
463 float ray_start[3],
464 float ray_end[3],
465 float ray_normal[3],
466 bool original);
467
468/* Symmetry */
470
489
496 float normal_weight,
497 float grab_delta[3]);
498
501/* -------------------------------------------------------------------- */
507
508int SCULPT_vertex_count_get(const Object &object);
509
511 const Object &object,
512 const blender::float3 &position,
513 bool original);
514
516
520Span<float3> vert_positions_for_grab_active_get(const Depsgraph &depsgraph, const Object &object);
521
522Span<BMVert *> vert_neighbors_get_bmesh(BMVert &vert, Vector<BMVert *, 64> &r_neighbors);
523Span<BMVert *> vert_neighbors_get_interior_bmesh(BMVert &vert, Vector<BMVert *, 64> &r_neighbors);
524
525Span<int> vert_neighbors_get_mesh(OffsetIndices<int> faces,
526 Span<int> corner_verts,
527 GroupedSpan<int> vert_to_face,
528 Span<bool> hide_poly,
529 int vert,
530 Vector<int> &r_neighbors);
531} // namespace blender::ed::sculpt_paint
532
533/* Fake Neighbors */
534
535#define FAKE_NEIGHBOR_NONE -1
536
543 Object &ob,
544 float max_dist);
546
549/* -------------------------------------------------------------------- */
554
556
557void calc_brush_plane(const Depsgraph &depsgraph,
558 const Brush &brush,
559 Object &ob,
560 const IndexMask &node_mask,
561 float3 &r_area_no,
562 float3 &r_area_co);
563
564std::optional<float3> calc_area_normal(const Depsgraph &depsgraph,
565 const Brush &brush,
566 const Object &ob,
567 const IndexMask &node_mask);
568
573void calc_area_normal_and_center(const Depsgraph &depsgraph,
574 const Brush &brush,
575 const Object &ob,
576 const IndexMask &node_mask,
577 float r_area_no[3],
578 float r_area_co[3]);
579void calc_area_center(const Depsgraph &depsgraph,
580 const Brush &brush,
581 const Object &ob,
582 const IndexMask &node_mask,
583 float r_area_co[3]);
584
585std::optional<int> nearest_vert_calc_mesh(const bke::pbvh::Tree &pbvh,
586 Span<float3> vert_positions,
587 Span<bool> hide_vert,
588 const float3 &location,
589 float max_distance,
590 bool use_original);
591std::optional<SubdivCCGCoord> nearest_vert_calc_grids(const bke::pbvh::Tree &pbvh,
592 const SubdivCCG &subdiv_ccg,
593 const float3 &location,
594 float max_distance,
595 bool use_original);
596std::optional<BMVert *> nearest_vert_calc_bmesh(const bke::pbvh::Tree &pbvh,
597 const float3 &location,
598 float max_distance,
599 bool use_original);
600} // namespace blender::ed::sculpt_paint
601
602float SCULPT_brush_plane_offset_get(const Sculpt &sd, const SculptSession &ss);
603
605bool SCULPT_check_vertex_pivot_symmetry(const float vco[3], const float pco[3], char symm);
609bool SCULPT_is_vertex_inside_brush_radius_symm(const float vertex[3],
610 const float br_co[3],
611 float radius,
612 char symm);
613bool SCULPT_is_symmetry_iteration_valid(char i, char symm);
616 ePaintSymmetryAreas symmarea,
617 const blender::float3 &pivot);
618void SCULPT_flip_quat_by_symm_area(float quat[4],
620 ePaintSymmetryAreas symmarea,
621 const float pivot[3]);
622
624
629Vector<int> find_symm_verts_mesh(const Depsgraph &depsgraph,
630 const Object &object,
631 int original_vert,
632 float max_distance = std::numeric_limits<float>::max());
633Vector<int> find_symm_verts_grids(const Object &object,
634 int original_vert,
635 float max_distance = std::numeric_limits<float>::max());
636Vector<int> find_symm_verts_bmesh(const Object &object,
637 int original_vert,
638 float max_distance = std::numeric_limits<float>::max());
639Vector<int> find_symm_verts(const Depsgraph &depsgraph,
640 const Object &object,
641 int original_vert,
642 float max_distance = std::numeric_limits<float>::max());
643
644bool node_fully_masked_or_hidden(const bke::pbvh::Node &node);
645bool node_in_sphere(const bke::pbvh::Node &node,
646 const float3 &location,
647 float radius_sq,
648 bool original);
649bool node_in_cylinder(const DistRayAABB_Precalc &dist_ray_precalc,
650 const bke::pbvh::Node &node,
651 float radius_sq,
652 bool original);
653
654} // namespace blender::ed::sculpt_paint
655
657 char falloff_shape);
658void SCULPT_cube_tip_init(const Sculpt &sd, const Object &ob, const Brush &brush, float mat[4][4]);
659
662 const Brush &brush,
663 const float brush_point[3],
664 int thread_id,
665 float *r_value,
666 float r_rgba[4]);
667
673 const Brush &brush,
674 float rgba[3],
675 float r_offset[3]);
676
680void SCULPT_tilt_apply_to_normal(float r_normal[3],
682 float tilt_strength);
683
687void SCULPT_tilt_effective_normal_get(const SculptSession &ss, const Brush &brush, float r_no[3]);
688
698void calc_smooth_translations(const Depsgraph &depsgraph,
699 const Object &object,
700 const IndexMask &node_mask,
701 MutableSpan<float3> translations);
702
703} // namespace blender::ed::sculpt_paint
704
711 char axis,
712 float angle);
713
715
724std::optional<OrigPositionData> orig_position_data_lookup_mesh_all_verts(
725 const Object &object, const bke::pbvh::MeshNode &node);
726std::optional<OrigPositionData> orig_position_data_lookup_mesh(const Object &object,
727 const bke::pbvh::MeshNode &node);
729 const bke::pbvh::MeshNode &node)
730{
731 const std::optional<OrigPositionData> result = orig_position_data_lookup_mesh(object, node);
732 BLI_assert(result.has_value());
733 return *result;
734}
735
736std::optional<OrigPositionData> orig_position_data_lookup_grids(const Object &object,
737 const bke::pbvh::GridsNode &node);
739 const bke::pbvh::GridsNode &node)
740{
741 const std::optional<OrigPositionData> result = orig_position_data_lookup_grids(object, node);
742 BLI_assert(result.has_value());
743 return *result;
744}
745
746void orig_position_data_gather_bmesh(const BMLog &bm_log,
747 const Set<BMVert *, 0> &verts,
748 MutableSpan<float3> positions,
749 MutableSpan<float3> normals);
750
751std::optional<Span<float4>> orig_color_data_lookup_mesh(const Object &object,
752 const bke::pbvh::MeshNode &node);
754{
755 return *orig_color_data_lookup_mesh(object, node);
756}
757
758std::optional<Span<int>> orig_face_set_data_lookup_mesh(const Object &object,
759 const bke::pbvh::MeshNode &node);
760
761std::optional<Span<int>> orig_face_set_data_lookup_grids(const Object &object,
762 const bke::pbvh::GridsNode &node);
763
764std::optional<Span<float>> orig_mask_data_lookup_mesh(const Object &object,
765 const bke::pbvh::MeshNode &node);
766
767std::optional<Span<float>> orig_mask_data_lookup_grids(const Object &object,
768 const bke::pbvh::GridsNode &node);
769
770} // namespace blender::ed::sculpt_paint
771
777bool SCULPT_get_redraw_rect(const ARegion &region,
778 const RegionView3D &rv3d,
779 const Object &ob,
780 rcti &rect);
781
782/* Operators. */
783
784/* -------------------------------------------------------------------- */
789
791void modal_keymap(wmKeyConfig *keyconf);
792
793} // namespace blender::ed::sculpt_paint::expand
794
800
807
810/* -------------------------------------------------------------------- */
815
821
826
827} // namespace blender::ed::sculpt_paint::face_set
828
831/* -------------------------------------------------------------------- */
836
838
839}
840
843/* -------------------------------------------------------------------- */
848
851
852} // namespace blender::ed::sculpt_paint::filter
853
856}
857
860}
861
864/* -------------------------------------------------------------------- */
869
872
873} // namespace blender::ed::sculpt_paint::mask
874
877/* Detail size. */
878
879/* -------------------------------------------------------------------- */
884
889
890} // namespace blender::ed::sculpt_paint::dyntopo
891
894/* sculpt_brush_types.cc */
895
896/* -------------------------------------------------------------------- */
901
903 const Brush &brush,
904 const SculptSession &ss,
905 const float outline_col[3],
906 float outline_alpha);
907
908}
916bool SCULPT_paint_image_canvas_get(PaintModeSettings &paint_mode_settings,
917 Object &ob,
918 Image **r_image,
919 ImageUser **r_image_user) ATTR_NONNULL();
920void SCULPT_do_paint_brush_image(const Scene &scene,
921 const Depsgraph &depsgraph,
922 PaintModeSettings &paint_mode_settings,
923 const Sculpt &sd,
924 Object &ob,
925 const blender::IndexMask &node_mask);
927
929
931
933
934} // namespace blender::ed::sculpt_paint
935
936inline bool SCULPT_brush_type_is_paint(int tool)
937{
939}
940
941inline bool SCULPT_brush_type_is_mask(int tool)
942{
943 return ELEM(tool, SCULPT_BRUSH_TYPE_MASK);
944}
945
951
953void ensure_valid_pivot(const Object &ob, Scene &scene);
954}
955
957float sculpt_calc_radius(const ViewContext &vc,
958 const Brush &brush,
959 const Scene &scene,
960 float3 location);
961}
#define PAINT_SYMM_AREAS
Definition BKE_paint.hh:151
ePaintSymmetryAreas
Definition BKE_paint.hh:144
A BVH for high poly meshes.
#define BLI_assert(a)
Definition BLI_assert.h:50
#define ATTR_NONNULL(...)
#define BLI_INLINE
unsigned int uint
#define ELEM(...)
@ SCULPT_BRUSH_TYPE_MASK
@ SCULPT_BRUSH_TYPE_DRAW_FACE_SETS
@ SCULPT_BRUSH_TYPE_SMEAR
@ SCULPT_BRUSH_TYPE_PAINT
ePaintSymmetryFlags
void deform(MutableSpan< float3 > translations, Span< int > verts) const
Definition sculpt.cc:7139
PositionDeformData(const Depsgraph &depsgraph, Object &object_orig)
Definition sculpt.cc:7103
const Depsgraph * depsgraph
static float verts[][3]
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 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)
Definition sculpt.cc:2326
bool node_in_cylinder(const DistRayAABB_Precalc &ray_dist_precalc, const bke::pbvh::Node &node, const float radius_sq, const bool original)
Definition sculpt.cc:2337
std::optional< Span< int > > orig_face_set_data_lookup_mesh(const Object &object, const bke::pbvh::MeshNode &node)
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)
Definition sculpt.cc:563
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)
Definition sculpt.cc:2315
std::optional< OrigPositionData > orig_position_data_lookup_grids(const Object &object, const bke::pbvh::GridsNode &node)
void flush_update_done(const bContext *C, Object &ob, UpdateType update_type)
Definition sculpt.cc:5055
void orig_position_data_gather_bmesh(const BMLog &bm_log, const Set< BMVert *, 0 > &verts, MutableSpan< float3 > positions, MutableSpan< float3 > normals)
void flush_update_step(bContext *C, UpdateType update_type)
Definition sculpt.cc:4960
float clay_thumb_get_stabilized_pressure(const StrokeCache &cache)
void ensure_valid_pivot(const Object &ob, Scene &scene)
Vector< int > find_symm_verts_mesh(const Depsgraph &depsgraph, const Object &object, const int original_vert, const float max_distance)
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)
void SCULPT_OT_brush_stroke(wmOperatorType *ot)
Definition sculpt.cc:5473
void calc_brush_plane(const Depsgraph &depsgraph, const Brush &brush, Object &ob, const IndexMask &node_mask, float3 &r_area_no, float3 &r_area_co)
Definition sculpt.cc:2789
std::optional< float3 > calc_area_normal(const Depsgraph &depsgraph, const Brush &brush, const Object &ob, const IndexMask &node_mask)
Definition sculpt.cc:1848
OrigPositionData orig_position_data_get_mesh(const Object &object, const bke::pbvh::MeshNode &node)
Span< BMVert * > vert_neighbors_get_bmesh(BMVert &vert, Vector< BMVert *, 64 > &r_neighbors)
Definition sculpt.cc:389
OrigPositionData orig_position_data_get_grids(const Object &object, const bke::pbvh::GridsNode &node)
void calc_area_center(const Depsgraph &depsgraph, const Brush &brush, const Object &ob, const IndexMask &node_mask, float r_area_co[3])
Definition sculpt.cc:1746
std::optional< BMVert * > nearest_vert_calc_bmesh(const bke::pbvh::Tree &pbvh, const float3 &location, const float max_distance, const bool use_original)
Definition sculpt.cc:664
float sculpt_calc_radius(const ViewContext &vc, const Brush &brush, const Scene &scene, const float3 location)
Definition sculpt.cc:115
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)
Definition sculpt.cc:610
std::optional< OrigPositionData > orig_position_data_lookup_mesh_all_verts(const Object &object, const bke::pbvh::MeshNode &node)
Span< BMVert * > vert_neighbors_get_interior_bmesh(BMVert &vert, Vector< BMVert *, 64 > &r_neighbors)
Definition sculpt.cc:404
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])
Definition sculpt.cc:1944
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)
Definition sculpt.cc:431
void multiplane_scrape_preview_draw(const uint gpuattr, const Brush &brush, const SculptSession &ss, const float outline_col[3], const float outline_alpha)
void SCULPT_OT_set_pivot_position(wmOperatorType *ot)
void geometry_preview_lines_update(Depsgraph &depsgraph, Object &object, SculptSession &ss, float radius)
Definition grab.cc:227
Span< float3 > vert_positions_for_grab_active_get(const Depsgraph &depsgraph, const Object &object)
Definition sculpt.cc:171
Vector< int > find_symm_verts_bmesh(const Object &object, const int original_vert, const float max_distance)
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])
Definition sculpt.cc:2219
bool SCULPT_stroke_is_first_brush_step_of_symmetry_pass(const blender::ed::sculpt_paint::StrokeCache &cache)
Definition sculpt.cc:513
bool SCULPT_get_redraw_rect(const ARegion &region, const RegionView3D &rv3d, const Object &ob, rcti &rect)
Definition sculpt.cc:1191
void SCULPT_flip_quat_by_symm_area(float quat[4], ePaintSymmetryFlags symm, ePaintSymmetryAreas symmarea, const float pivot[3])
Definition sculpt.cc:2735
bool SCULPT_brush_cursor_poll(bContext *C)
Definition sculpt.cc:3617
ePaintSymmetryFlags SCULPT_mesh_symmetry_xyz_get(const Object &object)
Definition sculpt.cc:186
void SCULPT_calc_vertex_displacement(const SculptSession &ss, const Brush &brush, float rgba[3], float r_offset[3])
Definition sculpt.cc:2285
bool SCULPT_cursor_geometry_info_update(bContext *C, SculptCursorGeometryInfo *out, const float mouse[2], bool use_sampled_normal)
Definition sculpt.cc:4580
const float * SCULPT_brush_frontface_normal_from_falloff_shape(const SculptSession &ss, char falloff_shape)
Definition sculpt.cc:1212
bool SCULPT_is_symmetry_iteration_valid(char i, char symm)
Definition sculpt.cc:713
bool SCULPT_brush_type_needs_all_pbvh_nodes(const Brush &brush)
Definition sculpt.cc:2754
void SCULPT_vertex_random_access_ensure(Object &object)
Definition sculpt.cc:144
void SCULPT_tilt_apply_to_normal(float r_normal[3], blender::ed::sculpt_paint::StrokeCache *cache, float tilt_strength)
Definition sculpt.cc:2550
void SCULPT_stroke_modifiers_check(const bContext *C, Object &ob, const Brush &brush)
Definition sculpt.cc:4358
bool SCULPT_stroke_get_location(bContext *C, float out[3], const float mouse[2], bool force_original)
Definition sculpt.cc:4732
void SCULPT_do_paint_brush_image(const Scene &scene, const Depsgraph &depsgraph, PaintModeSettings &paint_mode_settings, const Sculpt &sd, Object &ob, const blender::IndexMask &node_mask)
bool SCULPT_brush_type_is_mask(int tool)
blender::float3 SCULPT_flip_v3_by_symm_area(const blender::float3 &vector, ePaintSymmetryFlags symm, ePaintSymmetryAreas symmarea, const blender::float3 &pivot)
float SCULPT_raycast_init(ViewContext *vc, const float mval[2], float ray_start[3], float ray_end[3], float ray_normal[3], bool original)
Definition sculpt.cc:4536
bool SCULPT_check_vertex_pivot_symmetry(const float vco[3], const float pco[3], char symm)
Definition sculpt.cc:519
BLI_INLINE bool SCULPT_brush_type_is_attribute_only(int tool)
bool SCULPT_stroke_get_location_ex(bContext *C, float out[3], const float mval[2], bool force_original, bool check_closest, bool limit_closest_radius)
Definition sculpt.cc:4743
bool SCULPT_mode_poll_view3d(bContext *C)
Definition sculpt.cc:3566
bool SCULPT_mode_poll(bContext *C)
Definition sculpt.cc:3560
bool SCULPT_stroke_is_main_symmetry_pass(const blender::ed::sculpt_paint::StrokeCache &cache)
Definition sculpt.cc:501
int SCULPT_vertex_count_get(const Object &object)
Definition sculpt.cc:153
blender::Span< int > SCULPT_fake_neighbors_ensure(const Depsgraph &depsgraph, Object &ob, float max_dist)
Definition sculpt.cc:5795
bool SCULPT_brush_type_is_paint(int tool)
void SCULPT_fake_neighbors_free(Object &ob)
Definition sculpt.cc:5817
void SCULPT_cache_calc_brushdata_symm(blender::ed::sculpt_paint::StrokeCache &cache, ePaintSymmetryFlags symm, char axis, float angle)
Definition sculpt.cc:3346
bool SCULPT_is_vertex_inside_brush_radius_symm(const float vertex[3], const float br_co[3], float radius, char symm)
Definition sculpt.cc:718
bool SCULPT_use_image_paint_brush(PaintModeSettings &settings, Object &ob)
bool SCULPT_handles_colors_report(const Object &object, ReportList *reports)
Definition sculpt.cc:5177
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.
bool SCULPT_poll(bContext *C)
Definition sculpt.cc:3572
ePaintSymmetryAreas SCULPT_get_vertex_symm_area(const float co[3])
Definition sculpt.cc:2671
float SCULPT_brush_plane_offset_get(const Sculpt &sd, const SculptSession &ss)
Definition sculpt.cc:2883
void SCULPT_tilt_effective_normal_get(const SculptSession &ss, const Brush &brush, float r_no[3])
Definition sculpt.cc:2568
bool SCULPT_vertex_is_occluded(const Depsgraph &depsgraph, const Object &object, const blender::float3 &position, bool original)
void SCULPT_cube_tip_init(const Sculpt &sd, const Object &ob, const Brush &brush, float mat[4][4])
Definition sculpt.cc:6024
bool SCULPT_stroke_is_first_brush_step(const blender::ed::sculpt_paint::StrokeCache &cache)
Definition sculpt.cc:507
void sculpt_project_v3_normal_align(const SculptSession &ss, float normal_weight, float grab_delta[3])
Definition sculpt.cc:538
void SCULPT_tag_update_overlays(bContext *C)
Definition sculpt.cc:735
unsigned char uint8_t
Definition stdint.h:78
signed char int8_t
Definition stdint.h:75
blender::float3 active_vertex_co
blender::float3 follow_co
struct blender::ed::sculpt_paint::StrokeCache::@481 clay_thumb_brush
std::optional< math::Quaternion > rake_rotation
struct blender::ed::sculpt_paint::StrokeCache::@480 paint_brush
std::unique_ptr< pose::IKChain > pose_ik_chain
struct blender::ed::sculpt_paint::StrokeCache::@478 mirror_modifier_clip
struct blender::ed::sculpt_paint::StrokeCache::@479 displacement_smear
std::unique_ptr< auto_mask::Cache > automasking
std::optional< math::Quaternion > rake_rotation_symm
std::unique_ptr< cloth::SimulationData > cloth_sim
std::array< float, 10 > pressure_stabilizer
std::array< std::unique_ptr< boundary::SculptBoundary >, PAINT_SYMM_AREAS > boundaries
wmOperatorType * ot
Definition wm_files.cc:4125