155 const float mouse[2],
156 bool UNUSED(force_original))
193 op_data->
operation->on_stroke_extended(*
C, stroke_extension);
206 if (brush ==
nullptr) {
221 int return_value = op->
type->
modal(
C, op, event);
258 ot->
name =
"Stroke Curves Sculpt";
259 ot->
idname =
"SCULPT_CURVES_OT_brush_stroke";
333 ot->
name =
"Curve Sculpt Mode Toggle";
334 ot->
idname =
"CURVES_OT_sculptmode_toggle";
345 namespace select_random {
358 const auto next_partial_random_value = [&]() {
359 return rng.get_float() * (1.0f - min_value) + min_value;
361 const auto next_bool_random_value = [&]() {
return rng.get_float() <= probability; };
363 for (
Curves *curves_id : unique_curves) {
366 switch (curves_id->selection_domain) {
369 if (!was_anything_selected) {
370 selection.
fill(1.0f);
373 if (constant_per_curve) {
374 for (
const int curve_i :
curves.curves_range()) {
375 const float random_value = next_partial_random_value();
377 for (
const int point_i : points) {
378 selection[point_i] *= random_value;
383 for (
const int point_i : selection.
index_range()) {
384 const float random_value = next_partial_random_value();
385 selection[point_i] *= random_value;
390 if (constant_per_curve) {
391 for (
const int curve_i :
curves.curves_range()) {
392 const bool random_value = next_bool_random_value();
400 for (
const int point_i : selection.
index_range()) {
401 const bool random_value = next_bool_random_value();
403 selection[point_i] = 0.0f;
412 if (!was_anything_selected) {
413 selection.
fill(1.0f);
416 for (
const int curve_i :
curves.curves_range()) {
417 const float random_value = next_partial_random_value();
418 selection[curve_i] *= random_value;
422 for (
const int curve_i :
curves.curves_range()) {
423 const bool random_value = next_bool_random_value();
425 selection[curve_i] = 0.0f;
433 curves.selection_point_float_for_write() :
434 curves.selection_curve_float_for_write();
435 const bool was_any_selected = std::any_of(
436 selection.
begin(), selection.
end(), [](
const float v) { return v > 0.0f; });
437 if (was_any_selected) {
438 for (
float &
v : selection) {
439 v *= rng.get_float();
443 for (
float &
v : selection) {
460 uiItemR(layout, op->
ptr,
"seed", 0,
nullptr, ICON_NONE);
461 uiItemR(layout, op->
ptr,
"constant_per_curve", 0,
nullptr, ICON_NONE);
462 uiItemR(layout, op->
ptr,
"partial", 0,
nullptr, ICON_NONE);
476 ot->
name =
"Select Random";
478 ot->
description =
"Randomizes existing selection or create new random selection";
492 "Source of randomness",
496 ot->
srna,
"partial",
false,
"Partial",
"Allow points or curves to be selected partially");
503 "Chance of every point or curve being included in the selection",
512 "Minimum value for the random selection",
516 "constant_per_curve",
518 "Constant per Curve",
519 "The generated random number is the same for every control point of a curve");
522 namespace select_end {
542 for (
Curves *curves_id : unique_curves) {
546 if (!was_anything_selected) {
547 selection.
fill(1.0f);
550 for (const int curve_i : range) {
551 const IndexRange points = curves.points_for_curve(curve_i);
553 selection.slice(points.drop_back(amount)).fill(0.0f);
556 selection.slice(points.drop_front(amount)).fill(0.0f);
586 "Select points at the end of the curve as opposed to the beginning");
591 namespace select_grow {
615 data.unselected_point_indices.index_range(), 256, [&](
const IndexRange range) {
616 for (const int i : range) {
617 const int point_i = data.unselected_point_indices[i];
618 const float distance_to_selected = data.distances_to_selected[i];
619 const float selection = distance_to_selected <= distance ? 1.0f : 0.0f;
620 points_selection[point_i] = selection;
624 data.selected_point_indices.index_range(), 512, [&](
const IndexRange range) {
625 for (const int point_i : data.selected_point_indices.as_span().slice(range)) {
626 points_selection[point_i] = 1.0f;
632 data.selected_point_indices.index_range(), 256, [&](
const IndexRange range) {
633 for (const int i : range) {
634 const int point_i = data.selected_point_indices[i];
635 const float distance_to_unselected = data.distances_to_unselected[i];
636 const float selection = distance_to_unselected <= -distance ? 0.0f : 1.0f;
637 points_selection[point_i] = selection;
641 data.unselected_point_indices.index_range(), 512, [&](
const IndexRange range) {
642 for (const int point_i : data.unselected_point_indices.as_span().slice(range)) {
643 points_selection[point_i] = 0.0f;
653 for (std::unique_ptr<GrowOperatorDataPerCurve> &curve_op_data : op_data.
per_curve) {
654 Curves &curves_id = *curve_op_data->curves_id;
656 const float distance = curve_op_data->pixel_to_distance_factor * mouse_diff_x;
670 for (
const int curve_i :
curves.curves_range()) {
673 const float max_selection = *std::max_element(points_selection.
begin(),
674 points_selection.
end());
675 curves_selection[curve_i] = max_selection;
707 for (
const int point_i : points_selection.
index_range()) {
708 const float point_selection = points_selection[point_i];
709 if (point_selection > 0.0f) {
723 for (
const int curve_i : curves_selection.
index_range()) {
724 const float curve_selection = curves_selection[curve_i];
726 if (curve_selection > 0.0f) {
727 for (
const int point_i : points) {
732 for (
const int point_i : points) {
746 KDTree_3d *kdtree = BLI_kdtree_3d_new(curve_op_data.selected_point_indices.size());
747 BLI_SCOPED_DEFER([&]() { BLI_kdtree_3d_free(kdtree); });
750 BLI_kdtree_3d_insert(kdtree, point_i, position);
752 BLI_kdtree_3d_balance(kdtree);
760 for (const int i : range) {
761 const int point_i = curve_op_data.unselected_point_indices[i];
762 const float3 &position = positions[point_i];
763 KDTreeNearest_3d nearest;
764 BLI_kdtree_3d_find_nearest(kdtree, position, &nearest);
765 curve_op_data.distances_to_selected[i] = nearest.dist;
771 KDTree_3d *kdtree = BLI_kdtree_3d_new(curve_op_data.unselected_point_indices.size());
773 for (
const int point_i : curve_op_data.unselected_point_indices) {
775 BLI_kdtree_3d_insert(kdtree, point_i, position);
777 BLI_kdtree_3d_balance(kdtree);
780 curve_op_data.distances_to_unselected.reinitialize(
781 curve_op_data.selected_point_indices.size());
783 curve_op_data.selected_point_indices.index_range(), 256, [&](
const IndexRange range) {
784 for (const int i : range) {
785 const int point_i = curve_op_data.selected_point_indices[i];
786 const float3 &position = positions[point_i];
787 KDTreeNearest_3d nearest;
788 BLI_kdtree_3d_find_nearest(kdtree, position, &nearest);
789 curve_op_data.distances_to_unselected[i] = nearest.dist;
794 float4x4 curves_to_world_mat = curves_ob.obmat;
795 float4x4 world_to_curves_mat = curves_to_world_mat.inverted();
803 curve_op_data.selected_point_indices.index_range(),
806 [&](
const IndexRange range,
float pixel_to_distance_factor) {
807 for (const int i : range) {
808 const int point_i = curve_op_data.selected_point_indices[i];
809 const float3 &pos_cu = positions[point_i];
812 ED_view3d_project_float_v2_m4(®ion, pos_cu, pos_re, projection.values);
813 if (pos_re.x < 0 || pos_re.y < 0 || pos_re.x > region.winx || pos_re.y > region.winy) {
818 const float2 pos_offset_re = pos_re + float2(1, 0);
819 float3 pos_offset_wo;
821 &v3d, ®ion, curves_to_world_mat * pos_cu, pos_offset_re, pos_offset_wo);
822 const float3 pos_offset_cu = world_to_curves_mat * pos_offset_wo;
823 const float dist_cu = math::distance(pos_cu, pos_offset_cu);
824 const float dist_re = math::distance(pos_re, pos_offset_re);
825 const float factor = dist_cu / dist_re;
826 math::min_inplace(pixel_to_distance_factor, factor);
828 return pixel_to_distance_factor;
830 [](
const float a,
const float b) {
return std::min(
a,
b); });
846 auto curve_op_data = std::make_unique<GrowOperatorDataPerCurve>();
848 op_data->
per_curve.append(std::move(curve_op_data));
857 const int mouse_x =
event->xy[0];
859 switch (event->
type) {
865 MEM_delete(&op_data);
871 for (std::unique_ptr<GrowOperatorDataPerCurve> &curve_op_data : op_data.
per_curve) {
872 Curves &curves_id = *curve_op_data->curves_id;
877 points_selection.
copy_from(curve_op_data->original_selection);
882 curves_seletion.
copy_from(curve_op_data->original_selection);
892 MEM_delete(&op_data);
905 ot->
description =
"Select curves which are close to curves that are selected already";
920 "By how much to grow the selection",
926 namespace min_distance_edit {
935 if (brush ==
nullptr) {
982 points_wo.
append(op_data.
pos_cu + min_distance * tangent_x_cu);
983 points_wo.
append(op_data.
pos_cu + min_distance * tangent_y_cu);
984 points_wo.
append(op_data.
pos_cu - min_distance * tangent_x_cu);
985 points_wo.
append(op_data.
pos_cu - min_distance * tangent_y_cu);
988 for (
const float3 &pos_wo : points_wo) {
997 int needed_points = 0;
998 for (
const float2 &pos_re : points_re) {
1000 const int needed_points_iter = (brush_radius * 2.0f) /
distance;
1002 if (needed_points_iter > needed_points) {
1003 needed_points = needed_points_iter;
1008 return std::min(300, needed_points);
1026 const int points_per_axis_num = 2 * points_per_side + 1;
1029 for (
const int x_i :
IndexRange(points_per_axis_num)) {
1030 for (
const int y_i :
IndexRange(points_per_axis_num)) {
1031 const float x_iter = min_distance * (x_i - (points_per_axis_num - 1) / 2.0f);
1032 const float y_iter = min_distance * (y_i - (points_per_axis_num - 1) / 2.0f);
1035 x_iter * tangent_x_cu + y_iter * tangent_y_cu;
1037 points_wo.
append(point_pos_wo);
1074 const int alpha_border_re = 20;
1075 const float dist_to_inner_border_re = brush_radius_re - alpha_border_re;
1077 for (
const float3 &pos_wo : points_wo) {
1081 const float dist_to_point_re =
math::distance(pos_re, brush_origin_re);
1082 const float alpha = 1.0f - ((dist_to_point_re - dist_to_inner_border_re) / alpha_border_re);
1084 immAttr4f(col3d, 0.9f, 0.9f, 0.9f, alpha);
1098 GPU_scissor(scissor[0], scissor[1], scissor[2], scissor[3]);
1126 if (surface_ob_eval ==
nullptr) {
1130 if (surface_me_eval ==
nullptr) {
1138 const int2 mouse_pos_int_re{
event->mval};
1139 const float2 mouse_pos_re{mouse_pos_int_re};
1141 float3 ray_start_wo, ray_end_wo;
1143 depsgraph, region, v3d, mouse_pos_re, ray_start_wo, ray_end_wo,
true);
1147 const float3 ray_start_su = transforms.world_to_surface * ray_start_wo;
1148 const float3 ray_end_su = transforms.world_to_surface * ray_end_wo;
1152 ray_hit.
dist = FLT_MAX;
1161 if (ray_hit.
index == -1) {
1166 const float3 hit_pos_su = ray_hit.
co;
1167 const float3 hit_normal_su = ray_hit.
no;
1169 const float3 hit_pos_cu = transforms.surface_to_curves * hit_pos_su;
1176 op_data->
pos_cu = hit_pos_cu;
1209 auto finish = [&]() {
1221 switch (event->
type) {
1223 const int2 mouse_pos_int_re{
event->xy};
1224 const float2 mouse_pos_re{mouse_pos_int_re};
1226 const float mouse_diff_x = mouse_pos_int_re.x - op_data.
initial_mouse.x;
1227 const float factor =
powf(2, mouse_diff_x /
UI_UNIT_X / 10.0f);
1258 ot->
name =
"Edit Minimum Distance";
1260 ot->
description =
"Change the minimum distance used by the density brush";
bool BKE_brush_use_size_pressure(const struct Brush *brush)
float BKE_brush_alpha_get(const struct Scene *scene, const struct Brush *brush)
int BKE_brush_size_get(const struct Scene *scene, const struct Brush *brush)
bool BKE_brush_use_alpha_pressure(const struct Brush *brush)
void free_bvhtree_from_mesh(struct BVHTreeFromMesh *data)
BVHTree * BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data, const struct Mesh *mesh, BVHCacheType bvh_cache_type, int tree_type)
struct Scene * CTX_data_scene(const bContext *C)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct Object * CTX_data_active_object(const bContext *C)
struct View3D * CTX_wm_view3d(const bContext *C)
struct wmMsgBus * CTX_wm_message_bus(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
void CTX_wm_operator_poll_msg_set(struct bContext *C, const char *msg)
struct RegionView3D * CTX_wm_region_view3d(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
Low-level operations for curves.
General operations, lookup, etc. for blender objects.
struct Mesh * BKE_object_get_evaluated_mesh(const struct Object *object)
struct Brush * BKE_paint_brush(struct Paint *paint)
bool BKE_paint_ensure(struct ToolSettings *ts, struct Paint **r_paint)
struct Paint * BKE_paint_get_active_from_context(const struct bContext *C)
const struct Brush * BKE_paint_brush_for_read(const struct Paint *p)
#define BLI_assert_unreachable()
int BLI_bvhtree_ray_cast(BVHTree *tree, const float co[3], const float dir[3], float radius, BVHTreeRayHit *hit, BVHTree_RayCastCallback callback, void *userdata)
A KD-tree for nearest neighbor search.
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
#define BLI_SCOPED_DEFER(function_to_defer)
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
@ ID_RECALC_COPY_ON_WRITE
@ CURVES_SCULPT_TOOL_SMOOTH
@ CURVES_SCULPT_TOOL_SELECTION_PAINT
@ CURVES_SCULPT_TOOL_DENSITY
@ CURVES_SCULPT_TOOL_GROW_SHRINK
@ CURVES_SCULPT_TOOL_DELETE
@ CURVES_SCULPT_TOOL_PINCH
@ CURVES_SCULPT_TOOL_SNAKE_HOOK
@ CURVES_SCULPT_TOOL_COMB
@ CURVES_SCULPT_TOOL_PUFF
@ CURVES_SCULPT_TOOL_SLIDE
struct CurvesGeometry CurvesGeometry
void ED_paint_cursor_start(struct Paint *p, bool(*poll)(struct bContext *C))
bool ED_object_mode_compat_set(struct bContext *C, struct Object *ob, eObjectMode mode, struct ReportList *reports)
void ED_region_tag_redraw(struct ARegion *region)
bool ED_view3d_win_to_segment_clipped(const struct Depsgraph *depsgraph, const struct ARegion *region, const struct View3D *v3d, const float mval[2], float r_ray_start[3], float r_ray_end[3], bool do_clip_planes)
void ED_view3d_ob_project_mat_get(const struct RegionView3D *v3d, const struct Object *ob, float r_pmat[4][4])
void ED_view3d_project_v2(const struct ARegion *region, const float world[3], float r_region_co[2])
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
void GPU_matrix_pop(void)
void GPU_matrix_pop_projection(void)
#define GPU_matrix_set(x)
void GPU_matrix_push(void)
#define GPU_matrix_projection_set(x)
void GPU_matrix_translate_2f(float x, float y)
void GPU_matrix_push_projection(void)
@ GPU_SHADER_2D_UNIFORM_COLOR
@ GPU_SHADER_3D_POINT_FIXED_SIZE_VARYING_COLOR
void GPU_blend(eGPUBlend blend)
void GPU_scissor(int x, int y, int width, int height)
void GPU_point_size(float size)
void GPU_scissor_get(int coords[4])
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to curves
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
@ OPTYPE_DEPENDS_ON_CURSOR
ATTR_WARN_UNUSED_RESULT const BMVert * v
static unsigned long seed
Span< T > as_span() const
void reinitialize(const int64_t new_size)
constexpr T * end() const
constexpr void fill(const T &value)
constexpr MutableSpan slice(const int64_t start, const int64_t size) const
constexpr void copy_from(Span< T > values)
constexpr T * begin() const
constexpr IndexRange index_range() const
constexpr Span slice(int64_t start, int64_t size) const
constexpr const T * end() const
constexpr const T * begin() const
IndexRange index_range() const
void materialize(MutableSpan< T > r_span) const
void append(const T &value)
IndexRange index_range() const
static CurvesGeometry & wrap(::CurvesGeometry &dna_struct)
bool CURVES_SCULPT_mode_poll_view3d(bContext *C)
bool CURVES_SCULPT_mode_poll(bContext *C)
void ED_operatortypes_sculpt_curves()
const Depsgraph * depsgraph
void(* MEM_freeN)(void *vmemh)
static struct PartialUpdateUser * wrap(PartialUpdateUserImpl *user)
bool editable_curves_poll(bContext *C)
bool has_anything_selected(const Curves &curves_id)
VectorSet< Curves * > get_unique_editable_curves(const bContext &C)
bool curves_with_surface_poll(bContext *C)
bool curves_poll(bContext *C)
static void min_distance_edit_draw(bContext *C, int UNUSED(x), int UNUSED(y), void *customdata)
static int min_distance_edit_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int min_distance_edit_modal(bContext *C, wmOperator *op, const wmEvent *event)
static int calculate_points_per_side(bContext *C, MinDistanceEditData &op_data)
static bool min_distance_edit_poll(bContext *C)
static bool select_end_poll(bContext *C)
static int select_end_exec(bContext *C, wmOperator *op)
static int select_grow_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int select_grow_update(bContext *C, wmOperator *op, const float mouse_diff_x)
static void update_points_selection(const GrowOperatorDataPerCurve &data, const float distance, MutableSpan< float > points_selection)
static void select_grow_invoke_per_curve(Curves &curves_id, Object &curves_ob, const ARegion ®ion, const View3D &v3d, const RegionView3D &rv3d, GrowOperatorDataPerCurve &curve_op_data)
static int select_grow_modal(bContext *C, wmOperator *op, const wmEvent *event)
static void select_random_ui(bContext *UNUSED(C), wmOperator *op)
static int select_random_exec(bContext *C, wmOperator *op)
std::unique_ptr< CurvesSculptStrokeOperation > new_add_operation()
static void curves_sculptmode_exit(bContext *C)
std::unique_ptr< CurvesSculptStrokeOperation > new_pinch_operation(const BrushStrokeMode brush_mode, const bContext &C)
static void SCULPT_CURVES_OT_select_end(wmOperatorType *ot)
std::unique_ptr< CurvesSculptStrokeOperation > new_comb_operation()
static int sculpt_curves_stroke_invoke(bContext *C, wmOperator *op, const wmEvent *event)
float brush_radius_get(const Scene &scene, const Brush &brush, const StrokeExtension &stroke_extension)
static void SCULPT_CURVES_OT_select_grow(wmOperatorType *ot)
static void stroke_done(const bContext *C, PaintStroke *stroke)
static void CURVES_OT_sculptmode_toggle(wmOperatorType *ot)
static void curves_sculptmode_enter(bContext *C)
std::unique_ptr< CurvesSculptStrokeOperation > new_snake_hook_operation()
std::unique_ptr< CurvesSculptStrokeOperation > new_grow_shrink_operation(const BrushStrokeMode brush_mode, const bContext &C)
static int curves_sculptmode_toggle_exec(bContext *C, wmOperator *op)
static bool stroke_test_start(bContext *C, struct wmOperator *op, const float mouse[2])
static std::unique_ptr< CurvesSculptStrokeOperation > start_brush_operation(bContext &C, wmOperator &op, const StrokeExtension &stroke_start)
std::unique_ptr< CurvesSculptStrokeOperation > new_smooth_operation()
std::unique_ptr< CurvesSculptStrokeOperation > new_delete_operation()
std::unique_ptr< CurvesSculptStrokeOperation > new_selection_paint_operation(const BrushStrokeMode brush_mode, const bContext &C)
float brush_strength_get(const Scene &scene, const Brush &brush, const StrokeExtension &stroke_extension)
static bool stroke_get_location(bContext *C, float out[3], const float mouse[2], bool UNUSED(force_original))
static int sculpt_curves_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event)
static void SCULPT_CURVES_OT_select_random(wmOperatorType *ot)
static void SCULPT_CURVES_OT_min_distance_edit(wmOperatorType *ot)
static void sculpt_curves_stroke_cancel(bContext *C, wmOperator *op)
std::unique_ptr< CurvesSculptStrokeOperation > new_slide_operation()
std::unique_ptr< CurvesSculptStrokeOperation > new_puff_operation()
static void stroke_update_step(bContext *C, wmOperator *op, PaintStroke *UNUSED(stroke), PointerRNA *stroke_element)
float brush_strength_factor(const Brush &brush, const StrokeExtension &stroke_extension)
float brush_radius_factor(const Brush &brush, const StrokeExtension &stroke_extension)
std::unique_ptr< CurvesSculptStrokeOperation > new_density_operation(const BrushStrokeMode brush_mode, const bContext &C, const StrokeExtension &stroke_start)
static void SCULPT_CURVES_OT_brush_stroke(struct wmOperatorType *ot)
vec_base< T, 3 > cross(const vec_base< T, 3 > &a, const vec_base< T, 3 > &b)
T length(const vec_base< T, Size > &a)
T distance(const T &a, const T &b)
vec_base< T, Size > normalize(const vec_base< T, Size > &v)
void parallel_for(IndexRange range, int64_t grain_size, const Function &function)
void parallel_invoke(Functions &&...functions)
Value parallel_reduce(IndexRange range, int64_t grain_size, const Value &identity, const Function &function, const Reduction &reduction)
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
MutableSpan< float3 > positions
void paint_stroke_cancel(struct bContext *C, struct wmOperator *op, struct PaintStroke *stroke)
int paint_stroke_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event, struct PaintStroke **stroke_p)
struct PaintStroke * paint_stroke_new(struct bContext *C, struct wmOperator *op, StrokeGetLocation get_location, StrokeTestStart test_start, StrokeUpdateStep update_step, StrokeRedraw redraw, StrokeDone done, int event_type)
void paint_stroke_free(struct bContext *C, struct wmOperator *op, struct PaintStroke *stroke)
void paint_stroke_operator_properties(struct wmOperatorType *ot)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
int RNA_int_get(PointerRNA *ptr, const char *name)
float RNA_float_get(PointerRNA *ptr, const char *name)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
void RNA_def_property_subtype(PropertyRNA *prop, PropertySubType subtype)
BVHTree_RayCastCallback raycast_callback
struct BrushCurvesSculptSettings * curves_sculpt_settings
struct ToolSettings * toolsettings
std::unique_ptr< CurvesSculptStrokeOperation > operation
float4x4 curves_to_world_mat
ListBase orig_paintcursors
float initial_minimum_distance
Array< float > distances_to_unselected
Vector< int > unselected_point_indices
Vector< int > selected_point_indices
Array< float > distances_to_selected
float pixel_to_distance_factor
Array< float > original_selection
Vector< std::unique_ptr< GrowOperatorDataPerCurve > > per_curve
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
void(* ui)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_report(eReportType type, const char *message)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
#define WM_msg_publish_rna_prop(mbus, id_, data_, type_, prop_)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
bool WM_paint_cursor_end(wmPaintCursor *handle)
wmPaintCursor * WM_paint_cursor_activate(short space_type, short region_type, bool(*poll)(bContext *C), wmPaintCursorDraw draw, void *customdata)
void wmViewport(const rcti *winrct)
void wmWindowViewport(wmWindow *win)