Blender V5.3
wm_operator_type.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10
11#include "MEM_guardedalloc.h"
12
13#include "CLG_log.h"
14
15#include "DNA_screen_types.h"
17
18#include "BLT_translation.hh"
19
20#include "BLI_listbase.hh"
21#include "BLI_string.hh"
22#include "BLI_vector_set.hh"
23
24#include "BKE_context.hh"
25#include "BKE_idprop.hh"
26
27#include "RNA_access.hh"
28#include "RNA_define.hh"
29#include "RNA_enum_types.hh"
30#include "RNA_prototypes.hh"
31
32#ifdef WITH_PYTHON
33# include "BPY_extern.hh"
34#endif
35
36#include "WM_api.hh"
37#include "WM_keymap.hh"
38#include "WM_types.hh"
39
40#include "wm.hh"
41#include "wm_event_system.hh"
42
43namespace blender {
44
45#define UNDOCUMENTED_OPERATOR_TIP N_("(undocumented operator)")
46
47static void wm_operatortype_free_macro(wmOperatorType *ot);
48
49/* -------------------------------------------------------------------- */
52
53static auto &get_operators_map()
54{
55 struct OperatorNameGetter {
56 StringRef operator()(const wmOperatorType *value) const
57 {
58 return StringRef(value->idname);
59 }
60 };
61 static auto map = []() {
63 /* Reserve size is set based on blender default setup. */
64 map.reserve(2048);
65 return map;
66 }();
67 return map;
68}
69
74
76static int ot_prop_basic_count = -1;
77
78wmOperatorType *WM_operatortype_find(const char *idname, bool quiet)
79{
80 if (idname[0]) {
81 /* Needed to support python style names without the `_OT_` syntax. */
82 char idname_bl[OP_MAX_TYPENAME];
83 WM_operator_bl_idname(idname_bl, idname);
84
85 if (wmOperatorType *const *ot = get_operators_map().lookup_key_ptr_as(StringRef(idname_bl))) {
86 return *ot;
87 }
88
89 if (!quiet) {
90 CLOG_INFO(WM_LOG_OPERATORS, "Search for unknown operator '%s', '%s'", idname_bl, idname);
91 }
92 }
93 else {
94 if (!quiet) {
95 CLOG_INFO(WM_LOG_OPERATORS, "Search for empty operator");
96 }
97 }
98
99 return nullptr;
100}
101
103
104/* -------------------------------------------------------------------- */
107
109{
110 wmOperatorType *ot = MEM_new<wmOperatorType>(__func__);
111
113
114 ot->srna = RNA_def_struct_ptr(&RNA_blender_rna_get(), "", RNA_OperatorProperties);
116 /* Set the default i18n context now, so that opfunc can redefine it if needed! */
120
121 return ot;
122}
124{
125 if (ot->name == nullptr) {
126 CLOG_ERROR(WM_LOG_OPERATORS, "Operator '%s' has no name property", ot->idname);
127 }
128 BLI_assert((ot->description == nullptr) || (ot->description[0]));
129
130 /* Allow calling _begin without _end in operatortype creation. */
132
133 /* XXX All ops should have a description but for now allow them not to. */
137
139 get_operators_map().add_new(ot);
140
141 /* Needed so any operators registered after startup will have their shortcuts set,
142 * in "register" scripts for example, see: #143838.
143 *
144 * This only has run-time implications when run after startup,
145 * it's a no-op when run beforehand, see: #WM_keyconfig_update_on_startup. */
147}
148
149/* All ops in 1 list (for time being... needs evaluation later). */
150
152{
154 opfunc(ot);
156}
157
158void WM_operatortype_append_ptr(void (*opfunc)(wmOperatorType *, void *), void *userdata)
159{
161 opfunc(ot, userdata);
163}
164
166
167/* -------------------------------------------------------------------- */
170
172{
173 BLI_assert(ot == WM_operatortype_find(ot->idname, false));
174
175#ifdef WITH_PYTHON
176 /* The 'unexposed' type (inherited from #RNA_OperatorProperties) created for this operator type's
177 * properties may have had a python type representation created. This needs to be dereferenced
178 * manually here, as other #bpy_class_free (which is part of the unregistering code for runtime
179 * operators) will not be able to handle it. */
181#endif
182
184
185 if (ot->last_properties) {
187 }
188
189 if (ot->macro.first()) {
191 }
192
193 get_operators_map().remove(ot);
194
196
197 MEM_delete(ot);
198}
199
200bool WM_operatortype_remove(const char *idname)
201{
202 wmOperatorType *ot = WM_operatortype_find(idname, false);
203
204 if (ot == nullptr) {
205 return false;
206 }
207
209
210 return true;
211}
212
214{
215 if (ot->last_properties) {
217 }
218
219 if (ot->macro.first()) {
221 }
222
223 if (ot->rna_ext.srna) {
224 /* A Python operator, allocates its own string. */
225 MEM_delete(ot->idname);
226 }
227
228 MEM_delete(ot);
229}
230
232{
233 for (wmOperatorType *ot : get_operators_map()) {
235 }
236 get_operators_map().clear();
237}
238
240{
241 if (ot_prop_basic_count == -1) {
242 /* Don't do anything if _begin was called before, but not _end. */
244 }
245}
246
248{
249 int counter = 0;
250
251 if (ot_prop_basic_count == -1) {
252 /* WM_operatortype_props_advanced_begin was not called. Don't do anything. */
253 return;
254 }
255
257
258 RNA_STRUCT_BEGIN (&struct_ptr, prop) {
259 counter++;
260 if (counter > ot_prop_basic_count) {
262 }
263 }
265
267}
268
270{
271 for (wmOperatorType *ot : get_operators_map()) {
272 if (ot->last_properties) {
273 IDP_FreeProperty(ot->last_properties);
274 ot->last_properties = nullptr;
275 }
276 }
277}
278
280 const bContext * /*C*/,
281 PointerRNA * /*ptr*/,
282 PropertyRNA * /*prop*/,
283 const char * /*edit_text*/,
285{
286 for (wmOperatorType *ot : get_operators_map()) {
287 char idname_py[OP_MAX_TYPENAME];
288 WM_operator_py_idname(idname_py, ot->idname);
289
290 StringPropertySearchVisitParams visit_params{};
291 visit_params.text = idname_py;
292 visit_params.info = ot->name;
293 visit_fn(visit_params);
294 }
295}
296
298
299/* -------------------------------------------------------------------- */
302
306
308{
309 if (op->customdata == nullptr) {
310 op->customdata = MEM_new_zeroed<MacroData>("MacroData");
311 }
312}
313
315{
316 MacroData *md = static_cast<MacroData *>(op->customdata);
317
318 if (retval & (OPERATOR_CANCELLED | OPERATOR_INTERFACE)) {
319 if (md && (md->retval & OPERATOR_FINISHED)) {
320 retval |= OPERATOR_FINISHED;
322 }
323 }
324
325 /* If modal is ending, free custom data. */
326 if (retval & (OPERATOR_FINISHED | OPERATOR_CANCELLED)) {
327 if (md) {
328 MEM_delete(md);
329 op->customdata = nullptr;
330 }
331 }
332
333 return retval;
334}
335
336/* Macro exec only runs exec calls. */
338{
340 const eOperator_Flag op_inherited_flag = op->flag & (OP_IS_REPEAT | OP_IS_REPEAT_LAST);
341
342 wm_macro_start(op);
343
344 for (wmOperator &opm : op->macro) {
345 if (opm.type->exec == nullptr) {
346 CLOG_WARN(WM_LOG_OPERATORS, "'%s' can't exec macro", opm.type->idname);
347 continue;
348 }
349
350 opm.flag |= op_inherited_flag;
351 retval = opm.type->exec(C, &opm);
352 opm.flag &= ~op_inherited_flag;
353
354 OPERATOR_RETVAL_CHECK(retval);
355
356 if (retval & OPERATOR_FINISHED) {
357 MacroData *md = static_cast<MacroData *>(op->customdata);
358 md->retval = OPERATOR_FINISHED; /* Keep in mind that at least one operator finished. */
359 }
360 else {
361 break; /* Operator didn't finish, end macro. */
362 }
363 }
364
365 return wm_macro_end(op, retval);
366}
367
369 wmOperator *op,
370 const wmEvent *event,
371 wmOperator *opm)
372{
374 const eOperator_Flag op_inherited_flag = op->flag & (OP_IS_REPEAT | OP_IS_REPEAT_LAST);
375
376 /* Start from operator received as argument. */
377 for (; opm; opm = opm->next) {
378
379 opm->flag |= op_inherited_flag;
380 if (opm->type->invoke) {
381 retval = opm->type->invoke(C, opm, event);
382 }
383 else if (opm->type->exec) {
384 retval = opm->type->exec(C, opm);
385 }
386 opm->flag &= ~op_inherited_flag;
387
388 OPERATOR_RETVAL_CHECK(retval);
389
391
392 if (retval & OPERATOR_FINISHED) {
393 MacroData *md = static_cast<MacroData *>(op->customdata);
394 md->retval = OPERATOR_FINISHED; /* Keep in mind that at least one operator finished. */
395 }
396 else {
397 break; /* Operator didn't finish, end macro. */
398 }
399 }
400
401 return wm_macro_end(op, retval);
402}
403
405{
406 wm_macro_start(op);
407 return wm_macro_invoke_internal(C, op, event, op->macro.first());
408}
409
411{
412 wmOperator *opm = op->opm;
414
415 if (opm == nullptr) {
416 CLOG_ERROR(WM_LOG_OPERATORS, "macro error, calling nullptr modal()");
417 }
418 else {
419 retval = opm->type->modal(C, opm, event);
420 OPERATOR_RETVAL_CHECK(retval);
421
422 /* If we're halfway through using a tool and cancel it, clear the options, see: #37149. */
423 if (retval & OPERATOR_CANCELLED) {
425 }
426
427 /* If this one is done but it's not the last operator in the macro. */
428 if ((retval & OPERATOR_FINISHED) && opm->next) {
429 MacroData *md = static_cast<MacroData *>(op->customdata);
430
431 md->retval = OPERATOR_FINISHED; /* Keep in mind that at least one operator finished. */
432
433 retval = wm_macro_invoke_internal(C, op, event, opm->next);
434
435 /* If new operator is modal and also added its own handler. */
436 if (retval & OPERATOR_RUNNING_MODAL && op->opm != opm) {
437 wmWindow *win = CTX_wm_window(C);
438 wmEventHandler_Op *handler;
439
440 handler = static_cast<wmEventHandler_Op *>(
442 if (handler) {
443 BLI_remlink(&win->runtime->modalhandlers, handler);
444 wm_event_free_handler(&handler->head);
445 }
446
447 /* If operator is blocking, grab cursor.
448 * This may end up grabbing twice, but we don't care. */
449 if (op->opm->type->flag & OPTYPE_BLOCKING) {
451 const rcti *wrap_region = nullptr;
452
453 if ((op->opm->flag & OP_IS_MODAL_GRAB_CURSOR) ||
455 {
457 }
458 else if (op->opm->type->flag & OPTYPE_GRAB_CURSOR_X) {
460 }
461 else if (op->opm->type->flag & OPTYPE_GRAB_CURSOR_Y) {
463 }
464
465 if (wrap) {
466 ARegion *region = CTX_wm_region(C);
467 if (region) {
468 wrap_region = &region->winrct;
469 }
470 }
471
472 WM_cursor_grab_enable(win, eWM_CursorWrapAxis(wrap), wrap_region, false);
473 }
474 }
475 }
476 }
477
478 return wm_macro_end(op, retval);
479}
480
482{
483 /* Call cancel on the current modal operator, if any. */
484 if (op->opm && op->opm->type->cancel) {
485 op->opm->type->cancel(C, op->opm);
486 }
487
489}
490
492 const char *name,
493 const char *description,
494 int flag)
495{
496 wmOperatorType *ot;
497 const char *i18n_context;
498
499 if (WM_operatortype_find(idname, true)) {
500 CLOG_ERROR(WM_LOG_OPERATORS, "operator %s exists, cannot create macro", idname);
501 return nullptr;
502 }
503
504 ot = MEM_new<wmOperatorType>(__func__);
505 ot->srna = RNA_def_struct_ptr(&RNA_blender_rna_get(), "", RNA_OperatorProperties);
506
507 ot->idname = idname;
508 ot->name = name;
509 ot->description = description;
510 ot->flag = OPTYPE_MACRO | flag;
511
512 ot->exec = wm_macro_exec;
514 ot->modal = wm_macro_modal;
516 ot->poll = nullptr;
517
518 /* XXX All ops should have a description but for now allow them not to. */
519 BLI_assert((ot->description == nullptr) || (ot->description[0]));
520
524 /* Use i18n context from rna_ext.srna if possible (py operators). */
525 i18n_context = ot->rna_ext.srna ? RNA_struct_translation_context(ot->rna_ext.srna) :
527 RNA_def_struct_translation_context(ot->srna, i18n_context);
528 ot->translation_context = i18n_context;
529
531 get_operators_map().add_new(ot);
532
533 return ot;
534}
535
536void WM_operatortype_append_macro_ptr(void (*opfunc)(wmOperatorType *ot, void *userdata),
537 void *userdata)
538{
539 wmOperatorType *ot;
540
541 ot = MEM_new<wmOperatorType>(__func__);
542 ot->srna = RNA_def_struct_ptr(&RNA_blender_rna_get(), "", RNA_OperatorProperties);
543
544 ot->flag = OPTYPE_MACRO;
545 ot->exec = wm_macro_exec;
547 ot->modal = wm_macro_modal;
549 ot->poll = nullptr;
550
551 /* XXX All ops should have a description but for now allow them not to. */
552 BLI_assert((ot->description == nullptr) || (ot->description[0]));
553
554 /* Set the default i18n context now, so that opfunc can redefine it if needed! */
557 opfunc(ot, userdata);
558
562
564 get_operators_map().add_new(ot);
565}
566
568{
569 wmOperatorTypeMacro *otmacro = MEM_new<wmOperatorTypeMacro>("wmOperatorTypeMacro");
570
571 STRNCPY(otmacro->idname, idname);
572
573 /* Do this on first use, since operator definitions might have been not done yet. */
574 WM_operator_properties_alloc(&(otmacro->ptr), &(otmacro->properties), idname);
575 WM_operator_properties_sanitize(otmacro->ptr, true);
576
577 BLI_addtail(&ot->macro, otmacro);
578
579 /* Operator should always be found but in the event its not. don't segfault. */
580 if (wmOperatorType *otsub = WM_operatortype_find(idname, false)) {
581 RNA_def_pointer_runtime(ot->srna, otsub->idname, otsub->srna, otsub->name, otsub->description);
582 }
583
584 return otmacro;
585}
586
588{
589 for (wmOperatorTypeMacro &otmacro : ot->macro) {
590 if (otmacro.ptr) {
592 MEM_delete(otmacro.ptr);
593 }
594 }
595 ot->macro.free_no_destruct();
596}
597
598std::string WM_operatortype_name(wmOperatorType *ot, PointerRNA *properties)
599{
600 std::string name;
601 if (ot->get_name && properties) {
602 name = ot->get_name(ot, properties);
603 }
604
605 return name.empty() ? std::string(RNA_struct_ui_name(ot->srna)) : name;
606}
607
609{
610 if (ot->get_description && properties) {
611 std::string description = ot->get_description(C, ot, properties);
612 if (!description.empty()) {
613 return description;
614 }
615 }
616
617 const char *info = RNA_struct_ui_description(ot->srna);
618 if (info && info[0]) {
619 return info;
620 }
621 return "";
622}
623
625 wmOperatorType *ot,
626 PointerRNA *properties)
627{
628 std::string text = WM_operatortype_description(C, ot, properties);
629 if (text.empty()) {
630 std::string text_orig = WM_operatortype_name(ot, properties);
631 if (!text_orig.empty()) {
632 return text_orig;
633 }
634 }
635 return text;
636}
637
639{
641 return true;
642 }
643 if (ot.depends_on_cursor) {
644 return ot.depends_on_cursor(C, ot, properties);
645 }
646 return false;
647}
648
650
651} // namespace blender
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
#define CLOG_ERROR(clg_ref,...)
Definition CLG_log.h:188
#define CLOG_WARN(clg_ref,...)
Definition CLG_log.h:189
#define CLOG_INFO(clg_ref,...)
Definition CLG_log.h:190
#define OPERATOR_RETVAL_CHECK(ret)
#define OP_MAX_TYPENAME
Read Blender memory allocation and freeing.
#define RNA_STRUCT_BEGIN(sptr, prop)
#define RNA_STRUCT_END
#define C
Definition RandGen.cpp:29
#define WM_operatortype_prop_tag(property, tags)
Definition WM_api.hh:1594
SIMD_FORCE_INLINE btVector3 operator()(const btVector3 &x) const
Return the transform of the vector.
Definition btTransform.h:90
constexpr StringRef()
void reserve(const int64_t n)
#define offsetof(t, d)
BLI_INLINE Texture * wrap(MTLTexture *texture)
BMesh Iterators.
void * BLI_findptr(const ListBase *listbase, const void *ptr, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Definition listbase.cc:710
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
static wmOperatorStatus wm_macro_invoke(bContext *C, wmOperator *op, const wmEvent *event)
char * STRNCPY(char(&dst)[N], const char *src)
static wmOperatorStatus wm_macro_end(wmOperator *op, wmOperatorStatus retval)
void WM_operatortype_props_advanced_end(wmOperatorType *ot)
void RNA_def_struct_identifier(BlenderRNA *brna, StructRNA *srna, const char *identifier)
void WM_operator_properties_alloc(PointerRNA **ptr, IDProperty **properties, const char *opstring)
std::string WM_operatortype_name(wmOperatorType *ot, PointerRNA *properties)
void WM_operator_properties_sanitize(PointerRNA *ptr, const bool no_context)
eWM_CursorWrapAxis
Definition WM_types.hh:238
@ WM_CURSOR_WRAP_Y
Definition WM_types.hh:241
@ WM_CURSOR_WRAP_X
Definition WM_types.hh:240
@ WM_CURSOR_WRAP_NONE
Definition WM_types.hh:239
@ WM_CURSOR_WRAP_XY
Definition WM_types.hh:242
static wmOperatorStatus wm_macro_exec(bContext *C, wmOperator *op)
void WM_operator_properties_free(PointerRNA *ptr)
uint RNA_struct_count_properties(StructRNA *srna)
bool WM_operator_bl_idname_is_valid(const char *idname)
void WM_operator_properties_clear(PointerRNA *ptr)
PointerRNA WM_operator_properties_create_ptr(wmOperatorType *ot)
void WM_keyconfig_update_operatortype_tag()
wmOperatorTypeMacro * WM_operatortype_macro_define(wmOperatorType *ot, const char *idname)
void void void BLI_movelisttolist(ListBase *dst, ListBase *src) ATTR_NONNULL(1
Definition listbase.cc:32
size_t WM_operator_bl_idname(char *dst, const char *src)
wmWindow * CTX_wm_window(const bContext *C)
void WM_operatortype_append_ptr(void(*opfunc)(wmOperatorType *, void *), void *userdata)
const char * RNA_struct_ui_name(const StructRNA *type)
void WM_operatortype_append_macro_ptr(void(*opfunc)(wmOperatorType *ot, void *userdata), void *userdata)
bool WM_operatortype_remove(const char *idname)
static wmOperatorStatus wm_macro_modal(bContext *C, wmOperator *op, const wmEvent *event)
std::string WM_operatortype_description_or_name(bContext *C, wmOperatorType *ot, PointerRNA *properties)
void WM_operatortype_last_properties_clear_all()
PropertyRNA * RNA_def_pointer_runtime(StructOrFunctionRNA *cont, const char *identifier, StructRNA *type, const char *ui_name, const char *ui_description)
static void wm_operatortype_free_macro(wmOperatorType *ot)
Span< wmOperatorType * > WM_operatortypes_registered_get()
void RNA_struct_free(BlenderRNA *brna, StructRNA *srna)
bool WM_operator_depends_on_cursor(bContext &C, wmOperatorType &ot, PointerRNA *properties)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void WM_cursor_grab_enable(wmWindow *win, const eWM_CursorWrapAxis wrap, const rcti *wrap_region, const bool hide)
static void wm_macro_start(wmOperator *op)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:138
void WM_operatortype_remove_ptr(wmOperatorType *ot)
const EnumPropertyItem rna_enum_operator_property_tag_items[]
Definition rna_wm.cc:617
static auto & get_operators_map()
VectorSet< T, InlineBufferCapacity, DefaultProbingStrategy, CustomIDHash< T, GetIDFn >, CustomIDEqual< T, GetIDFn > > CustomIDVectorSet
void WM_operatortype_idname_visit_for_search(const bContext *, PointerRNA *, PropertyRNA *, const char *, FunctionRef< void(StringPropertySearchVisitParams)> visit_fn)
static int ot_prop_basic_count
void RNA_def_struct_property_tags(StructRNA *srna, const EnumPropertyItem *prop_tag_defines)
@ OP_PROP_TAG_ADVANCED
Definition WM_types.hh:277
CLG_LogRef * WM_LOG_OPERATORS
static wmOperatorStatus wm_macro_invoke_internal(bContext *C, wmOperator *op, const wmEvent *event, wmOperator *opm)
static void wm_macro_cancel(bContext *C, wmOperator *op)
const char * RNA_struct_ui_description(const StructRNA *type)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
static void wm_operatortype_append__end(wmOperatorType *ot)
wmOperatorType * WM_operatortype_append_macro(const char *idname, const char *name, const char *description, int flag)
@ WM_CURSOR_PICK_AREA
Definition wm_cursors.hh:64
static wmOperatorType * wm_operatortype_append__begin()
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:118
void RNA_def_struct_translation_context(StructRNA *srna, const char *context)
void IDP_FreeProperty(IDProperty *prop)
Definition idprop.cc:1403
void WM_operatortype_props_advanced_begin(wmOperatorType *ot)
void BPY_free_srna_pytype(StructRNA *srna)
Definition bpy_rna.cc:10480
@ OPTYPE_GRAB_CURSOR_Y
Definition WM_types.hh:200
@ OPTYPE_BLOCKING
Definition WM_types.hh:192
@ OPTYPE_MACRO
Definition WM_types.hh:193
@ OPTYPE_GRAB_CURSOR_XY
Definition WM_types.hh:196
@ OPTYPE_DEPENDS_ON_CURSOR
Definition WM_types.hh:228
@ OPTYPE_GRAB_CURSOR_X
Definition WM_types.hh:198
static void operatortype_ghash_free_cb(wmOperatorType *ot)
void wm_operatortype_free()
std::string WM_operatortype_description(bContext *C, wmOperatorType *ot, PointerRNA *properties)
size_t WM_operator_py_idname(char *dst, const char *src)
ARegion * CTX_wm_region(const bContext *C)
void wm_event_free_handler(wmEventHandler *handler)
const char * RNA_struct_translation_context(const StructRNA *type)
BlenderRNA RNA_blender_rna_get()
StructRNA * RNA_def_struct_ptr(BlenderRNA *brna, const char *identifier, StructRNA *srnafrom)
wmOperatorStatus retval
ListBaseT< Report > list
Definition BKE_report.hh:79
std::optional< std::string > info
Definition RNA_types.hh:864
ListBaseT< wmEventHandler > modalhandlers
IDProperty * last_properties
Definition WM_types.hh:1206
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1125
const char * description
Definition WM_types.hh:1115
void(*) cancel(bContext *C, wmOperator *op)
Definition WM_types.hh:1149
ListBaseT< wmOperatorTypeMacro > macro
Definition WM_types.hh:1218
const char * translation_context
Definition WM_types.hh:1113
bool(*) depends_on_cursor(bContext &C, wmOperatorType &ot, PointerRNA *ptr)
Definition WM_types.hh:1200
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1165
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1141
wmOperatorStatus(*) modal(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1157
std::string(*) get_description(bContext *C, wmOperatorType *ot, PointerRNA *ptr)
Definition WM_types.hh:1197
std::string(*) get_name(wmOperatorType *ot, PointerRNA *ptr)
Definition WM_types.hh:1191
ListBaseT< wmOperator > macro
struct ReportList * reports
struct wmOperatorType * type
bke::WindowRuntime * runtime
#define UNDOCUMENTED_OPERATOR_TIP