165 const float mouse[2],
203 op_data->
operation->on_stroke_extended(*
C, stroke_extension);
219 if (brush ==
nullptr) {
275 ot->name =
"Stroke Curves Sculpt";
276 ot->idname =
"SCULPT_CURVES_OT_brush_stroke";
277 ot->description =
"Sculpt curves using a brush";
355 ot->name =
"Curve Sculpt Mode Toggle";
356 ot->idname =
"CURVES_OT_sculptmode_toggle";
357 ot->description =
"Enter/Exit sculpt mode for curves";
380 const auto next_partial_random_value = [&]() {
381 return rng.
get_float() * (1.0f - min_value) + min_value;
383 const auto next_bool_random_value = [&]() {
return rng.
get_float() <= probability; };
385 for (
Curves *curves_id : unique_curves) {
391 if (!was_anything_selected) {
392 selection.
fill(1.0f);
398 if (constant_per_curve) {
399 for (
const int curve_i :
curves.curves_range()) {
400 const float random_value = next_partial_random_value();
401 const IndexRange points = points_by_curve[curve_i];
402 for (
const int point_i : points) {
403 selection[point_i] *= random_value;
408 for (
const int point_i : selection.
index_range()) {
409 const float random_value = next_partial_random_value();
410 selection[point_i] *= random_value;
415 if (constant_per_curve) {
416 for (
const int curve_i :
curves.curves_range()) {
417 const bool random_value = next_bool_random_value();
418 const IndexRange points = points_by_curve[curve_i];
425 for (
const int point_i : selection.
index_range()) {
426 const bool random_value = next_bool_random_value();
428 selection[point_i] = 0.0f;
437 for (
const int curve_i :
curves.curves_range()) {
438 const float random_value = next_partial_random_value();
439 selection[curve_i] *= random_value;
443 for (
const int curve_i :
curves.curves_range()) {
444 const bool random_value = next_bool_random_value();
446 selection[curve_i] = 0.0f;
487 ot->name =
"Select Random";
488 ot->idname = __func__;
489 ot->description =
"Randomizes existing selection or create new random selection";
503 "Source of randomness",
507 ot->srna,
"partial",
false,
"Partial",
"Allow points or curves to be selected partially");
514 "Chance of every point or curve being included in the selection",
523 "Minimum value for the random selection",
527 "constant_per_curve",
529 "Constant per Curve",
530 "The generated random number is the same for every control point of a curve");
557 data.unselected_points.foreach_index(
558 GrainSize(256), [&](
const int point_i,
const int index_pos) {
559 const float distance_to_selected =
data.distances_to_selected[index_pos];
560 const float selection = distance_to_selected <=
distance ? 1.0f : 0.0f;
561 points_selection[point_i] = selection;
563 data.selected_points.foreach_index(
564 GrainSize(512), [&](
const int point_i) { points_selection[point_i] = 1.0f; });
567 data.selected_points.foreach_index(
568 GrainSize(256), [&](
const int point_i,
const int index_pos) {
569 const float distance_to_unselected =
data.distances_to_unselected[index_pos];
570 const float selection = distance_to_unselected <= -
distance ? 0.0f : 1.0f;
571 points_selection[point_i] = selection;
573 data.unselected_points.foreach_index(
574 GrainSize(512), [&](
const int point_i) { points_selection[point_i] = 0.0f; });
582 for (std::unique_ptr<GrowOperatorDataPerCurve> &curve_op_data : op_data.
per_curve) {
583 Curves &curves_id = *curve_op_data->curves_id;
585 const float distance = curve_op_data->pixel_to_distance_factor * mouse_diff_x;
591 switch (selection.
domain) {
601 for (
const int curve_i :
curves.curves_range()) {
602 const IndexRange points = points_by_curve[curve_i];
604 const float max_selection = *std::max_element(points_selection.
begin(),
605 points_selection.
end());
606 curves_selection[curve_i] = max_selection;
637 original_selection.varray.size());
651 KDTree_3d *kdtree = BLI_kdtree_3d_new(curve_op_data.selected_points.size());
652 BLI_SCOPED_DEFER([&]() { BLI_kdtree_3d_free(kdtree); });
654 const float3 &position = positions[point_i];
655 BLI_kdtree_3d_insert(kdtree, point_i, position);
657 BLI_kdtree_3d_balance(kdtree);
663 for (const int i : range) {
664 const int point_i = curve_op_data.unselected_points[i];
665 const float3 &position = positions[point_i];
666 KDTreeNearest_3d nearest;
667 BLI_kdtree_3d_find_nearest(kdtree, position, &nearest);
668 curve_op_data.distances_to_selected[i] = nearest.dist;
674 KDTree_3d *kdtree = BLI_kdtree_3d_new(curve_op_data.unselected_points.size());
676 curve_op_data.unselected_points.foreach_index([&](
const int point_i) {
677 const float3 &position = positions[point_i];
678 BLI_kdtree_3d_insert(kdtree, point_i, position);
680 BLI_kdtree_3d_balance(kdtree);
683 curve_op_data.distances_to_unselected.reinitialize(curve_op_data.selected_points.size());
685 curve_op_data.selected_points.index_range(), 256, [&](
const IndexRange range) {
686 for (const int i : range) {
687 const int point_i = curve_op_data.selected_points[i];
688 const float3 &position = positions[point_i];
689 KDTreeNearest_3d nearest;
690 BLI_kdtree_3d_find_nearest(kdtree, position, &nearest);
691 curve_op_data.distances_to_unselected[i] = nearest.dist;
696 const float4x4 &curves_to_world_mat = curves_ob.object_to_world();
703 curve_op_data.pixel_to_distance_factor = threading::parallel_reduce(
704 curve_op_data.selected_points.index_range(),
707 [&](
const IndexRange range,
float pixel_to_distance_factor) {
708 for (const int i : range) {
709 const int point_i = curve_op_data.selected_points[i];
710 const float3 &pos_cu = positions[point_i];
712 const float2 pos_re = ED_view3d_project_float_v2_m4(®ion, pos_cu, projection);
713 if (pos_re.x < 0 || pos_re.y < 0 || pos_re.x > region.winx || pos_re.y > region.winy) {
718 const float2 pos_offset_re = pos_re + float2(1, 0);
719 float3 pos_offset_wo;
720 ED_view3d_win_to_3d(&v3d,
722 math::transform_point(curves_to_world_mat, pos_cu),
725 const float3 pos_offset_cu = math::transform_point(world_to_curves_mat, pos_offset_wo);
726 const float dist_cu = math::distance(pos_cu, pos_offset_cu);
727 const float dist_re = math::distance(pos_re, pos_offset_re);
728 const float factor = dist_cu / dist_re;
729 math::min_inplace(pixel_to_distance_factor, factor);
731 return pixel_to_distance_factor;
733 [](
const float a,
const float b) {
return std::min(a,
b); });
749 auto curve_op_data = std::make_unique<GrowOperatorDataPerCurve>();
750 curve_op_data->curves_id = &curves_id;
752 op_data->
per_curve.append(std::move(curve_op_data));
761 const int mouse_x =
event->xy[0];
763 switch (event->
type) {
769 MEM_delete(&op_data);
775 for (std::unique_ptr<GrowOperatorDataPerCurve> &curve_op_data : op_data.
per_curve) {
776 Curves &curves_id = *curve_op_data->curves_id;
780 attributes.
remove(
".selection");
781 if (!curve_op_data->original_selection.is_empty()) {
794 MEM_delete(&op_data);
808 ot->name =
"Select Grow";
809 ot->idname = __func__;
810 ot->description =
"Select curves which are close to curves that are selected already";
825 "By how much to grow the selection",
840 if (brush ==
nullptr) {
887 points_wo.
append(op_data.
pos_cu + min_distance * tangent_x_cu);
888 points_wo.
append(op_data.
pos_cu + min_distance * tangent_y_cu);
889 points_wo.
append(op_data.
pos_cu - min_distance * tangent_x_cu);
890 points_wo.
append(op_data.
pos_cu - min_distance * tangent_y_cu);
893 for (
const float3 &pos_wo : points_wo) {
902 int needed_points = 0;
903 for (
const float2 &pos_re : points_re) {
905 const int needed_points_iter = (brush_radius * 2.0f) /
distance;
907 needed_points = std::max(needed_points_iter, needed_points);
911 return std::min(300, needed_points);
932 const int points_per_axis_num = 2 * points_per_side + 1;
935 for (
const int x_i :
IndexRange(points_per_axis_num)) {
936 for (
const int y_i :
IndexRange(points_per_axis_num)) {
937 const float x_iter = min_distance * (x_i - (points_per_axis_num - 1) / 2.0f);
938 const float y_iter = min_distance * (y_i - (points_per_axis_num - 1) / 2.0f);
941 x_iter * tangent_x_cu + y_iter * tangent_y_cu;
943 points_wo.
append(point_pos_wo);
968 format3d,
"pos", blender::gpu::VertAttrType::SFLOAT_32_32_32);
970 format3d,
"color", blender::gpu::VertAttrType::SFLOAT_32_32_32_32);
972 format3d,
"size", blender::gpu::VertAttrType::SFLOAT_32);
983 const int alpha_border_re = 20;
984 const float dist_to_inner_border_re = brush_radius_re - alpha_border_re;
986 for (
const float3 &pos_wo : points_wo) {
990 const float dist_to_point_re =
math::distance(pos_re, brush_origin_re);
991 const float alpha = 1.0f - ((dist_to_point_re - dist_to_inner_border_re) / alpha_border_re);
994 immAttr4f(col3d, 0.9f, 0.9f, 0.9f, alpha);
1008 GPU_scissor(scissor[0], scissor[1], scissor[2], scissor[3]);
1036 if (surface_ob_eval ==
nullptr) {
1040 if (surface_me_eval ==
nullptr) {
1046 const int2 mouse_pos_int_re{
event->mval};
1047 const float2 mouse_pos_re{mouse_pos_int_re};
1049 float3 ray_start_wo, ray_end_wo;
1051 depsgraph, region, v3d, mouse_pos_re, ray_start_wo, ray_end_wo,
true);
1069 if (ray_hit.
index == -1) {
1074 const float3 hit_pos_su = ray_hit.
co;
1075 const float3 hit_normal_su = ray_hit.
no;
1084 op_data->
pos_cu = hit_pos_cu;
1117 auto finish = [&]() {
1126 MEM_delete(&op_data);
1129 switch (event->
type) {
1131 const int2 mouse_pos_int_re{
event->xy};
1132 const float2 mouse_pos_re{mouse_pos_int_re};
1134 const float mouse_diff_x = mouse_pos_int_re.x - op_data.
initial_mouse.x;
1135 const float factor =
powf(2, mouse_diff_x /
UI_UNIT_X / 10.0f);
1170 ot->name =
"Edit Minimum Distance";
1171 ot->idname = __func__;
1172 ot->description =
"Change the minimum distance used by the density brush";
bool BKE_brush_use_alpha_pressure(const Brush *brush)
float BKE_brush_alpha_get(const Paint *paint, const Brush *brush)
bool BKE_brush_use_size_pressure(const Brush *brush)
float BKE_brush_radius_get(const Paint *paint, const Brush *brush)
void BKE_brush_tag_unsaved_changes(Brush *brush)
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)
Paint * BKE_paint_get_active_from_context(const bContext *C)
bool BKE_paint_ensure(ToolSettings *ts, Paint **r_paint)
Brush * BKE_paint_brush(Paint *paint)
#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(ListBase *lb)
#define BLI_SCOPED_DEFER(function_to_defer)
void DEG_id_tag_update(ID *id, unsigned int flags)
T * DEG_get_evaluated(const Depsgraph *depsgraph, T *id)
@ 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
#define OPERATOR_RETVAL_CHECK(ret)
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(GPUBlend 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])
@ OPTYPE_DEPENDS_ON_CURSOR
BMesh const char void * data
BPy_StructRNA * depsgraph
static unsigned long seed
void reinitialize(const int64_t new_size)
Span< T > as_span() const
const void * data() const
static GVArray from_span(GSpan span)
constexpr MutableSpan slice(const int64_t start, const int64_t size) const
constexpr void fill(const T &value) const
constexpr IndexRange index_range() const
NonCopyable(const NonCopyable &other)=delete
NonMovable(NonMovable &&other)=delete
constexpr const T * end() const
constexpr const T * begin() const
void append(const T &value)
bool add(const StringRef attribute_id, const AttrDomain domain, const AttrType data_type, const AttributeInit &initializer)
bool remove(const StringRef attribute_id)
IndexRange index_range() const
IndexMask complement(const IndexMask &universe, IndexMaskMemory &memory) const
void foreach_index(Fn &&fn) const
void ED_operatortypes_sculpt_curves()
float distance(VecOp< float, D >, VecOp< float, D >) RET
VecBase< float, 4 > float4
AttrType cpp_type_to_attribute_type(const CPPType &type)
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_with_surface_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 wmOperatorStatus min_distance_edit_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void min_distance_edit_draw(bContext *C, const blender::int2 &, const blender::float2 &, void *customdata)
static int calculate_points_per_side(bContext *C, MinDistanceEditData &op_data)
static wmOperatorStatus min_distance_edit_modal(bContext *C, wmOperator *op, const wmEvent *event)
static bool min_distance_edit_poll(bContext *C)
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 wmOperatorStatus select_grow_modal(bContext *C, wmOperator *op, const wmEvent *event)
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 wmOperatorStatus select_grow_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus select_random_exec(bContext *C, wmOperator *op)
static void select_random_ui(bContext *, 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 wmOperatorStatus sculpt_curves_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event)
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()
float brush_strength_get(const Paint &paint, 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 wmOperatorStatus curves_sculptmode_toggle_exec(bContext *C, wmOperator *op)
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)
bool curves_sculpt_poll_view3d(bContext *C)
wmOperatorStatus paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event, PaintStroke **stroke_p)
static wmOperatorStatus sculpt_curves_stroke_invoke(bContext *C, wmOperator *op, const wmEvent *event)
std::unique_ptr< CurvesSculptStrokeOperation > new_smooth_operation()
std::unique_ptr< CurvesSculptStrokeOperation > new_delete_operation()
float brush_radius_get(const Paint &paint, const Brush &brush, const StrokeExtension &stroke_extension)
std::unique_ptr< CurvesSculptStrokeOperation > new_selection_paint_operation(const BrushStrokeMode brush_mode, const bContext &C)
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))
VecBase< int32_t, 4 > int4
MatBase< float, 4, 4 > float4x4
VecBase< float, 4 > float4
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
VecBase< float, 3 > float3
void paint_init_pivot(Object *ob, Scene *scene, Paint *paint)
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)
struct BrushCurvesSculptSettings * curves_sculpt_settings
char curves_sculpt_brush_type
struct CurveMapping * curve_size
struct CurveMapping * curve_strength
struct ToolSettings * toolsettings
VecBase< T, 2 > xy() const
BVHTree_RayCastCallback raycast_callback
MutableVArraySpan< T > span
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
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(* modal)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type
void WM_global_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)