121 const CurvesSculpt &curves_sculpt = *scene.toolsettings->curves_sculpt;
158 const float mouse[2],
196 op_data->
operation->on_stroke_extended(*C, stroke_extension);
210 if (brush ==
nullptr) {
225 int return_value = op->
type->
modal(C, op, event);
262 ot->
name =
"Stroke Curves Sculpt";
263 ot->
idname =
"SCULPT_CURVES_OT_brush_stroke";
288 CurvesSculpt *curves_sculpt = scene->toolsettings->curves_sculpt;
346 ot->
name =
"Curve Sculpt Mode Toggle";
347 ot->
idname =
"CURVES_OT_sculptmode_toggle";
358namespace select_random {
371 const auto next_partial_random_value = [&]() {
372 return rng.get_float() * (1.0f - min_value) + min_value;
374 const auto next_bool_random_value = [&]() {
return rng.get_float() <= probability; };
376 for (
Curves *curves_id : unique_curves) {
382 if (!was_anything_selected) {
383 selection.
fill(1.0f);
385 const OffsetIndices points_by_curve = curves.points_by_curve();
389 if (constant_per_curve) {
390 for (
const int curve_i : curves.curves_range()) {
391 const float random_value = next_partial_random_value();
392 const IndexRange points = points_by_curve[curve_i];
393 for (
const int point_i : points) {
394 selection[point_i] *= random_value;
399 for (
const int point_i : selection.index_range()) {
400 const float random_value = next_partial_random_value();
401 selection[point_i] *= random_value;
406 if (constant_per_curve) {
407 for (
const int curve_i : curves.curves_range()) {
408 const bool random_value = next_bool_random_value();
409 const IndexRange points = points_by_curve[curve_i];
411 selection.
slice(points).fill(0.0f);
416 for (
const int point_i : selection.index_range()) {
417 const bool random_value = next_bool_random_value();
419 selection[point_i] = 0.0f;
428 for (
const int curve_i : curves.curves_range()) {
429 const float random_value = next_partial_random_value();
430 selection[curve_i] *= random_value;
434 for (
const int curve_i : curves.curves_range()) {
435 const bool random_value = next_bool_random_value();
437 selection[curve_i] = 0.0f;
478 ot->
name =
"Select Random";
480 ot->
description =
"Randomizes existing selection or create new random selection";
494 "Source of randomness",
498 ot->
srna,
"partial",
false,
"Partial",
"Allow points or curves to be selected partially");
505 "Chance of every point or curve being included in the selection",
514 "Minimum value for the random selection",
518 "constant_per_curve",
520 "Constant per Curve",
521 "The generated random number is the same for every control point of a curve");
523namespace select_grow {
544 const float distance,
547 if (distance > 0.0f) {
548 data.unselected_points.foreach_index(
549 GrainSize(256), [&](
const int point_i,
const int index_pos) {
550 const float distance_to_selected = data.distances_to_selected[index_pos];
551 const float selection = distance_to_selected <= distance ? 1.0f : 0.0f;
554 data.selected_points.foreach_index(
555 GrainSize(512), [&](
const int point_i) { points_selection[point_i] = 1.0f; });
558 data.selected_points.foreach_index(
559 GrainSize(256), [&](
const int point_i,
const int index_pos) {
560 const float distance_to_unselected = data.distances_to_unselected[index_pos];
561 const float selection = distance_to_unselected <= -distance ? 0.0f : 1.0f;
564 data.unselected_points.foreach_index(
565 GrainSize(512), [&](
const int point_i) { points_selection[point_i] = 0.0f; });
573 for (std::unique_ptr<GrowOperatorDataPerCurve> &curve_op_data : op_data.
per_curve) {
574 Curves &curves_id = *curve_op_data->curves_id;
576 const float distance = curve_op_data->pixel_to_distance_factor * mouse_diff_x;
579 const OffsetIndices points_by_curve = curves.points_by_curve();
582 switch (selection.domain) {
592 for (
const int curve_i : curves.curves_range()) {
593 const IndexRange points = points_by_curve[curve_i];
595 const float max_selection = *std::max_element(points_selection.
begin(),
596 points_selection.
end());
597 curves_selection[curve_i] = max_selection;
628 original_selection.varray.size());
642 KDTree_3d *kdtree = BLI_kdtree_3d_new(curve_op_data.selected_points.size());
643 BLI_SCOPED_DEFER([&]() { BLI_kdtree_3d_free(kdtree); });
645 const float3 &position = positions[point_i];
646 BLI_kdtree_3d_insert(kdtree, point_i, position);
648 BLI_kdtree_3d_balance(kdtree);
654 for (const int i : range) {
655 const int point_i = curve_op_data.unselected_points[i];
656 const float3 &position = positions[point_i];
657 KDTreeNearest_3d nearest;
658 BLI_kdtree_3d_find_nearest(kdtree, position, &nearest);
659 curve_op_data.distances_to_selected[i] = nearest.dist;
665 KDTree_3d *kdtree = BLI_kdtree_3d_new(curve_op_data.unselected_points.size());
667 curve_op_data.unselected_points.foreach_index([&](
const int point_i) {
668 const float3 &position = positions[point_i];
669 BLI_kdtree_3d_insert(kdtree, point_i, position);
671 BLI_kdtree_3d_balance(kdtree);
674 curve_op_data.distances_to_unselected.reinitialize(curve_op_data.selected_points.size());
676 curve_op_data.selected_points.index_range(), 256, [&](
const IndexRange range) {
677 for (const int i : range) {
678 const int point_i = curve_op_data.selected_points[i];
679 const float3 &position = positions[point_i];
680 KDTreeNearest_3d nearest;
681 BLI_kdtree_3d_find_nearest(kdtree, position, &nearest);
682 curve_op_data.distances_to_unselected[i] = nearest.dist;
687 const float4x4 &curves_to_world_mat = curves_ob.object_to_world();
694 curve_op_data.pixel_to_distance_factor = threading::parallel_reduce(
695 curve_op_data.selected_points.index_range(),
698 [&](
const IndexRange range,
float pixel_to_distance_factor) {
699 for (const int i : range) {
700 const int point_i = curve_op_data.selected_points[i];
701 const float3 &pos_cu = positions[point_i];
703 const float2 pos_re = ED_view3d_project_float_v2_m4(®ion, pos_cu, projection);
704 if (pos_re.x < 0 || pos_re.y < 0 || pos_re.x > region.winx || pos_re.y > region.winy) {
709 const float2 pos_offset_re = pos_re + float2(1, 0);
710 float3 pos_offset_wo;
711 ED_view3d_win_to_3d(&v3d,
713 math::transform_point(curves_to_world_mat, pos_cu),
716 const float3 pos_offset_cu = math::transform_point(world_to_curves_mat, pos_offset_wo);
717 const float dist_cu = math::distance(pos_cu, pos_offset_cu);
718 const float dist_re = math::distance(pos_re, pos_offset_re);
719 const float factor = dist_cu / dist_re;
720 math::min_inplace(pixel_to_distance_factor, factor);
722 return pixel_to_distance_factor;
724 [](
const float a,
const float b) {
return std::min(a,
b); });
740 auto curve_op_data = std::make_unique<GrowOperatorDataPerCurve>();
741 curve_op_data->curves_id = &curves_id;
743 op_data->
per_curve.append(std::move(curve_op_data));
752 const int mouse_x =
event->xy[0];
754 switch (event->
type) {
760 MEM_delete(&op_data);
766 for (std::unique_ptr<GrowOperatorDataPerCurve> &curve_op_data : op_data.
per_curve) {
767 Curves &curves_id = *curve_op_data->curves_id;
771 attributes.
remove(
".selection");
772 if (!curve_op_data->original_selection.is_empty()) {
776 bke::cpp_type_to_custom_data_type(curve_op_data->original_selection.type()),
785 MEM_delete(&op_data);
798 ot->
description =
"Select curves which are close to curves that are selected already";
800 ot->
invoke = select_grow::select_grow_invoke;
801 ot->
modal = select_grow::select_grow_modal;
802 ot->
poll = curves::editable_curves_poll;
813 "By how much to grow the selection",
819namespace min_distance_edit {
823 if (!curves::curves_with_surface_poll(C)) {
828 if (brush ==
nullptr) {
875 points_wo.
append(op_data.
pos_cu + min_distance * tangent_x_cu);
876 points_wo.
append(op_data.
pos_cu + min_distance * tangent_y_cu);
877 points_wo.
append(op_data.
pos_cu - min_distance * tangent_x_cu);
878 points_wo.
append(op_data.
pos_cu - min_distance * tangent_y_cu);
881 for (
const float3 &pos_wo : points_wo) {
890 int needed_points = 0;
891 for (
const float2 &pos_re : points_re) {
892 const float distance =
math::length(pos_re - origin_re);
893 const int needed_points_iter = (brush_radius * 2.0f) / distance;
895 if (needed_points_iter > needed_points) {
896 needed_points = needed_points_iter;
901 return std::min(300, needed_points);
919 const int points_per_axis_num = 2 * points_per_side + 1;
922 for (
const int x_i :
IndexRange(points_per_axis_num)) {
923 for (
const int y_i :
IndexRange(points_per_axis_num)) {
924 const float x_iter = min_distance * (x_i - (points_per_axis_num - 1) / 2.0f);
925 const float y_iter = min_distance * (y_i - (points_per_axis_num - 1) / 2.0f);
928 x_iter * tangent_x_cu + y_iter * tangent_y_cu;
930 points_wo.
append(point_pos_wo);
967 const int alpha_border_re = 20;
968 const float dist_to_inner_border_re = brush_radius_re - alpha_border_re;
970 for (
const float3 &pos_wo : points_wo) {
974 const float dist_to_point_re =
math::distance(pos_re, brush_origin_re);
975 const float alpha = 1.0f - ((dist_to_point_re - dist_to_inner_border_re) / alpha_border_re);
978 immAttr4f(col3d, 0.9f, 0.9f, 0.9f, alpha);
992 GPU_scissor(scissor[0], scissor[1], scissor[2], scissor[3]);
1020 if (surface_ob_eval ==
nullptr) {
1024 if (surface_me_eval ==
nullptr) {
1032 const int2 mouse_pos_int_re{
event->mval};
1033 const float2 mouse_pos_re{mouse_pos_int_re};
1035 float3 ray_start_wo, ray_end_wo;
1037 depsgraph, region, v3d, mouse_pos_re, ray_start_wo, ray_end_wo,
true);
1055 if (ray_hit.
index == -1) {
1060 const float3 hit_pos_su = ray_hit.
co;
1061 const float3 hit_normal_su = ray_hit.
no;
1070 op_data->
pos_cu = hit_pos_cu;
1103 auto finish = [&]() {
1112 MEM_delete(&op_data);
1115 switch (event->
type) {
1117 const int2 mouse_pos_int_re{
event->
xy};
1118 const float2 mouse_pos_re{mouse_pos_int_re};
1120 const float mouse_diff_x = mouse_pos_int_re.x - op_data.
initial_mouse.x;
1121 const float factor =
powf(2, mouse_diff_x /
UI_UNIT_X / 10.0f);
1153 ot->
name =
"Edit Minimum Distance";
1155 ot->
description =
"Change the minimum distance used by the density brush";
1157 ot->
poll = min_distance_edit::min_distance_edit_poll;
1158 ot->
invoke = min_distance_edit::min_distance_edit_invoke;
1159 ot->
modal = min_distance_edit::min_distance_edit_modal;
bool BKE_brush_use_alpha_pressure(const Brush *brush)
int BKE_brush_size_get(const Scene *scene, const Brush *brush)
bool BKE_brush_use_size_pressure(const Brush *brush)
float BKE_brush_alpha_get(const Scene *scene, const Brush *brush)
void BKE_brush_tag_unsaved_changes(Brush *brush)
void free_bvhtree_from_mesh(BVHTreeFromMesh *data)
BVHTree * BKE_bvhtree_from_mesh_get(BVHTreeFromMesh *data, const Mesh *mesh, BVHCacheType bvh_cache_type, int tree_type)
@ BVHTREE_FROM_CORNER_TRIS
wmWindow * CTX_wm_window(const bContext *C)
Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
RegionView3D * CTX_wm_region_view3d(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
wmMsgBus * CTX_wm_message_bus(const bContext *C)
View3D * CTX_wm_view3d(const bContext *C)
Low-level operations for curves.
General operations, lookup, etc. for blender objects.
Mesh * BKE_object_get_evaluated_mesh(const Object *object_eval)
void BKE_paint_brushes_ensure(Main *bmain, Paint *paint)
const Brush * BKE_paint_brush_for_read(const Paint *paint)
Paint * BKE_paint_get_active_from_paintmode(Scene *sce, PaintMode mode)
bool BKE_paint_ensure(ToolSettings *ts, Paint **r_paint)
Brush * BKE_paint_brush(Paint *paint)
const uchar PAINT_CURSOR_SCULPT_CURVES[3]
#define BLI_assert_unreachable()
int BLI_bvhtree_ray_cast(const 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)
MINLINE void copy_v3_v3_uchar(unsigned char r[3], const unsigned char a[3])
#define BLI_SCOPED_DEFER(function_to_defer)
void DEG_id_tag_update(ID *id, unsigned int flags)
Object * DEG_get_evaluated_object(const Depsgraph *depsgraph, Object *object)
@ CURVES_SCULPT_BRUSH_TYPE_SMOOTH
@ CURVES_SCULPT_BRUSH_TYPE_PUFF
@ CURVES_SCULPT_BRUSH_TYPE_GROW_SHRINK
@ CURVES_SCULPT_BRUSH_TYPE_PINCH
@ CURVES_SCULPT_BRUSH_TYPE_SNAKE_HOOK
@ CURVES_SCULPT_BRUSH_TYPE_ADD
@ CURVES_SCULPT_BRUSH_TYPE_COMB
@ CURVES_SCULPT_BRUSH_TYPE_DENSITY
@ CURVES_SCULPT_BRUSH_TYPE_DELETE
@ CURVES_SCULPT_BRUSH_TYPE_SLIDE
@ CURVES_SCULPT_BRUSH_TYPE_SELECTION_PAINT
void ED_paint_cursor_start(Paint *paint, bool(*poll)(bContext *C))
void ED_region_tag_redraw(ARegion *region)
void ED_view3d_project_v2(const ARegion *region, const float world[3], float r_region_co[2])
blender::float4x4 ED_view3d_ob_project_mat_get(const RegionView3D *rv3d, const Object *ob)
bool ED_view3d_win_to_segment_clipped(const Depsgraph *depsgraph, const ARegion *region, const View3D *v3d, const float mval[2], float r_ray_start[3], float r_ray_end[3], bool do_clip_planes)
#define GPU_matrix_set(x)
void GPU_matrix_push_projection()
void GPU_matrix_pop_projection()
#define GPU_matrix_projection_set(x)
void GPU_matrix_translate_2f(float x, float y)
@ GPU_SHADER_3D_POINT_VARYING_SIZE_VARYING_COLOR
@ GPU_SHADER_3D_UNIFORM_COLOR
void GPU_program_point_size(bool enable)
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])
void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, eUI_Item_Flag flag, const char *name, int icon)
@ OPTYPE_DEPENDS_ON_CURSOR
static unsigned long seed
Span< T > as_span() const
void reinitialize(const int64_t new_size)
const void * data() const
constexpr void fill(const T &value) const
constexpr const T * end() const
constexpr const T * begin() const
void append(const T &value)
bool remove(const StringRef attribute_id)
IndexRange index_range() const
IndexMask complement(const IndexMask &universe, IndexMaskMemory &memory) const
void foreach_index(Fn &&fn) const
OffsetIndices slice(const IndexRange range) const
local_group_size(16, 16) .push_constant(Type b
void ED_operatortypes_sculpt_curves()
const Depsgraph * depsgraph
static bool has_anything_selected(const Span< Curves * > curves_ids)
VectorSet< Curves * > get_unique_editable_curves(const bContext &C)
bool editable_curves_poll(bContext *C)
bool curves_poll(bContext *C)
IndexMask retrieve_selected_points(const bke::CurvesGeometry &curves, IndexMaskMemory &memory)
bool mode_compat_set(bContext *C, Object *ob, eObjectMode mode, ReportList *reports)
static void min_distance_edit_draw(bContext *C, int, int, 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 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(const Curves &curves_id, const 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 *, wmOperator *op)
static int select_random_exec(bContext *C, wmOperator *op)
bool curves_sculpt_poll(bContext *C)
static bool stroke_test_start(bContext *C, wmOperator *op, const float mouse[2])
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 stroke_update_step(bContext *C, wmOperator *op, PaintStroke *, PointerRNA *stroke_element)
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 bool stroke_get_location(bContext *C, float out[3], const float mouse[2], bool)
void paint_stroke_cancel(bContext *C, wmOperator *op, PaintStroke *stroke)
static void SCULPT_CURVES_OT_select_grow(wmOperatorType *ot)
bke::SpanAttributeWriter< float > float_selection_ensure(Curves &curves_id)
static std::unique_ptr< CurvesSculptStrokeOperation > start_brush_operation(bContext &C, wmOperator &op, const StrokeExtension &stroke_start)
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)
bool curves_sculpt_poll_view3d(bContext *C)
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)
int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event, PaintStroke **stroke_p)
float brush_strength_get(const Scene &scene, const Brush &brush, const StrokeExtension &stroke_extension)
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)
void paint_stroke_free(bContext *C, wmOperator *op, PaintStroke *stroke)
PaintStroke * paint_stroke_new(bContext *C, wmOperator *op, StrokeGetLocation get_location, StrokeTestStart test_start, StrokeUpdateStep update_step, StrokeRedraw redraw, StrokeDone done, int event_type)
std::unique_ptr< CurvesSculptStrokeOperation > new_slide_operation()
std::unique_ptr< CurvesSculptStrokeOperation > new_puff_operation()
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(wmOperatorType *ot)
T distance(const T &a, const T &b)
T length(const VecBase< T, Size > &a)
CartesianBasis invert(const CartesianBasis &basis)
AxisSigned cross(const AxisSigned a, const AxisSigned b)
MatBase< T, NumCol, NumRow > normalize(const MatBase< T, NumCol, NumRow > &a)
VecBase< T, 3 > transform_direction(const MatBase< T, 3, 3 > &mat, const VecBase< T, 3 > &direction)
VecBase< T, 3 > transform_point(const CartesianBasis &basis, const VecBase< T, 3 > &v)
void parallel_invoke(Functions &&...functions)
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
MatBase< float, 4, 4 > float4x4
GPU_SHADER_INTERFACE_INFO(overlay_edit_curve_handle_iface, "vert").flat(Type pos vertex_in(1, Type::UINT, "data") .vertex_out(overlay_edit_curve_handle_iface) .geometry_layout(PrimitiveIn Frequency::GEOMETRY storage_buf(1, Qualifier::READ, "uint", "data[]", Frequency::GEOMETRY) .push_constant(Type Frequency::GEOMETRY selection[]
void paint_init_pivot(Object *ob, Scene *scene)
void paint_stroke_operator_properties(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, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_subtype(PropertyRNA *prop, PropertySubType subtype)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
BVHTree_RayCastCallback raycast_callback
struct BrushCurvesSculptSettings * curves_sculpt_settings
char curves_sculpt_brush_type
unsigned char paint_cursor_col[4]
VecBase< T, 2 > xy() const
std::unique_ptr< CurvesSculptStrokeOperation > operation
float4x4 curves_to_world_mat
ListBase orig_paintcursors
float initial_minimum_distance
Array< float > distances_to_unselected
IndexMask unselected_points
IndexMaskMemory unselected_points_memory
IndexMask selected_points
Array< float > distances_to_selected
float pixel_to_distance_factor
IndexMaskMemory selected_points_memory
GArray original_selection
Vector< std::unique_ptr< GrowOperatorDataPerCurve > > per_curve
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* modal)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(* ui)(bContext *C, wmOperator *op)
void(* cancel)(bContext *C, wmOperator *op)
struct ReportList * reports
struct wmOperatorType * type
void WM_report(eReportType type, const char *message)
void WM_main_add_notifier(uint type, void *reference)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
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(const wmWindow *win)