30#include "RNA_prototypes.hh"
45#define UNDOCUMENTED_OPERATOR_TIP N_("(undocumented operator)")
55 struct OperatorNameGetter {
61 static auto map = []() {
125 if (ot->
name ==
nullptr) {
161 opfunc(ot, userdata);
189 if (ot->
macro.first()) {
219 if (ot->
macro.first()) {
272 if (ot->last_properties) {
274 ot->last_properties =
nullptr;
291 visit_params.
text = idname_py;
292 visit_params.
info = ot->name;
293 visit_fn(visit_params);
350 opm.
flag |= op_inherited_flag;
352 opm.
flag &= ~op_inherited_flag;
377 for (; opm; opm = opm->
next) {
379 opm->
flag |= op_inherited_flag;
386 opm->
flag &= ~op_inherited_flag;
415 if (opm ==
nullptr) {
451 const rcti *wrap_region =
nullptr;
468 wrap_region = ®ion->
winrct;
493 const char *description,
497 const char *i18n_context;
504 ot = MEM_new<wmOperatorType>(__func__);
541 ot = MEM_new<wmOperatorType>(__func__);
557 opfunc(ot, userdata);
592 MEM_delete(otmacro.
ptr);
595 ot->
macro.free_no_destruct();
602 name = ot->
get_name(ot, properties);
612 if (!description.empty()) {
618 if (info && info[0]) {
631 if (!text_orig.empty()) {
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
#define CLOG_ERROR(clg_ref,...)
#define CLOG_WARN(clg_ref,...)
#define CLOG_INFO(clg_ref,...)
#define OPERATOR_RETVAL_CHECK(ret)
Read Blender memory allocation and freeing.
#define RNA_STRUCT_BEGIN(sptr, prop)
#define WM_operatortype_prop_tag(property, tags)
void reserve(const int64_t n)
BLI_INLINE Texture * wrap(MTLTexture *texture)
void * BLI_findptr(const ListBase *listbase, const void *ptr, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
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)
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)
@ OP_IS_MODAL_GRAB_CURSOR
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
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)
void WM_operatortype_remove_ptr(wmOperatorType *ot)
const EnumPropertyItem rna_enum_operator_property_tag_items[]
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)
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)
static wmOperatorType * wm_operatortype_append__begin()
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void RNA_def_struct_translation_context(StructRNA *srna, const char *context)
void IDP_FreeProperty(IDProperty *prop)
void WM_operatortype_props_advanced_begin(wmOperatorType *ot)
void BPY_free_srna_pytype(StructRNA *srna)
@ OPTYPE_DEPENDS_ON_CURSOR
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)
std::optional< std::string > info
ListBaseT< wmEventHandler > modalhandlers
struct IDProperty * properties
IDProperty * last_properties
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(*) cancel(bContext *C, wmOperator *op)
ListBaseT< wmOperatorTypeMacro > macro
const char * translation_context
bool(*) depends_on_cursor(bContext &C, wmOperatorType &ot, PointerRNA *ptr)
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) modal(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
std::string(*) get_description(bContext *C, wmOperatorType *ot, PointerRNA *ptr)
std::string(*) get_name(wmOperatorType *ot, PointerRNA *ptr)
ListBaseT< wmOperator > macro
struct ReportList * reports
struct wmOperatorType * type
bke::WindowRuntime * runtime
#define UNDOCUMENTED_OPERATOR_TIP