30#include "RNA_prototypes.hh"
43#define UNDOCUMENTED_OPERATOR_TIP N_("(undocumented operator)")
55 struct OperatorNameGetter {
61 static auto map = []() {
123 if (
ot->name ==
nullptr) {
159 opfunc(
ot, userdata);
179 if (
ot->last_properties) {
183 if (
ot->macro.first) {
209 if (
ot->last_properties) {
213 if (
ot->macro.first) {
217 if (
ot->rna_ext.srna) {
267 if (
ot->last_properties) {
269 ot->last_properties =
nullptr;
286 visit_params.
text = idname_py;
287 visit_params.
info =
ot->name;
288 visit_fn(visit_params);
340 if (opm->type->exec ==
nullptr) {
345 opm->flag |= op_inherited_flag;
346 retval = opm->type->exec(
C, opm);
347 opm->flag &= ~op_inherited_flag;
372 for (; opm; opm = opm->
next) {
374 opm->
flag |= op_inherited_flag;
381 opm->
flag &= ~op_inherited_flag;
410 if (opm ==
nullptr) {
446 const rcti *wrap_region =
nullptr;
463 wrap_region = ®ion->
winrct;
488 const char *description,
492 const char *i18n_context;
504 ot->description = description;
523 ot->translation_context = i18n_context;
552 opfunc(
ot, userdata);
587 MEM_delete(otmacro->ptr);
596 if (
ot->get_name && properties) {
597 name =
ot->get_name(
ot, properties);
605 if (
ot->get_description && properties) {
606 std::string description =
ot->get_description(
C,
ot, properties);
607 if (!description.empty()) {
613 if (info && info[0]) {
626 if (!text_orig.empty()) {
638 if (
ot.depends_on_cursor) {
639 return ot.depends_on_cursor(
C,
ot, properties);
wmWindow * CTX_wm_window(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
void IDP_FreeProperty(IDProperty *prop)
void void void BLI_movelisttolist(ListBase *dst, ListBase *src) ATTR_NONNULL(1
#define LISTBASE_FOREACH(type, var, list)
void void BLI_freelistN(ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void * BLI_findptr(const struct ListBase *listbase, const void *ptr, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
char * STRNCPY(char(&dst)[N], const char *src)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
void BPY_free_srna_pytype(StructRNA *srna)
#define CLOG_ERROR(clg_ref,...)
#define CLOG_WARN(clg_ref,...)
#define CLOG_INFO(clg_ref,...)
@ OP_IS_MODAL_GRAB_CURSOR
#define OPERATOR_RETVAL_CHECK(ret)
Read Guarded memory(de)allocation.
#define RNA_STRUCT_BEGIN(sptr, prop)
#define WM_operatortype_prop_tag(property, tags)
CLG_LogRef * WM_LOG_OPERATORS
@ OPTYPE_DEPENDS_ON_CURSOR
#define OP_PROP_TAG_ADVANCED
void reserve(const int64_t n)
void * MEM_callocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
VectorSet< T, InlineBufferCapacity, DefaultProbingStrategy, CustomIDHash< T, GetIDFn >, CustomIDEqual< T, GetIDFn > > CustomIDVectorSet
float wrap(float value, float max, float min)
const char * RNA_struct_ui_description(const StructRNA *type)
const char * RNA_struct_ui_name(const StructRNA *type)
uint RNA_struct_count_properties(StructRNA *srna)
const char * RNA_struct_translation_context(const StructRNA *type)
PropertyRNA * RNA_def_pointer_runtime(StructOrFunctionRNA *cont_, const char *identifier, StructRNA *type, const char *ui_name, const char *ui_description)
void RNA_def_struct_property_tags(StructRNA *srna, const EnumPropertyItem *prop_tag_defines)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_struct_identifier(BlenderRNA *brna, StructRNA *srna, const char *identifier)
StructRNA * RNA_def_struct_ptr(BlenderRNA *brna, const char *identifier, StructRNA *srnafrom)
void RNA_struct_free(BlenderRNA *brna, StructRNA *srna)
void RNA_def_struct_translation_context(StructRNA *srna, const char *context)
const EnumPropertyItem rna_enum_operator_property_tag_items[]
std::optional< std::string > info
struct IDProperty * properties
wmOperatorStatus(* exec)(bContext *C, wmOperator *op) 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
void(* cancel)(bContext *C, wmOperator *op)
struct ReportList * reports
struct wmOperatorType * type
void WM_cursor_grab_enable(wmWindow *win, const eWM_CursorWrapAxis wrap, const rcti *wrap_region, const bool hide)
void wm_event_free_handler(wmEventHandler *handler)
void WM_keyconfig_update_operatortype_tag()
void WM_operatortype_append_macro_ptr(void(*opfunc)(wmOperatorType *ot, void *userdata), void *userdata)
void WM_operatortype_idname_visit_for_search(const bContext *, PointerRNA *, PropertyRNA *, const char *, blender::FunctionRef< void(StringPropertySearchVisitParams)> visit_fn)
static wmOperatorType * wm_operatortype_append__begin()
static void wm_operatortype_free_macro(wmOperatorType *ot)
static int ot_prop_basic_count
static auto & get_operators_map()
void WM_operatortype_props_advanced_begin(wmOperatorType *ot)
blender::Span< wmOperatorType * > WM_operatortypes_registered_get()
static void wm_macro_start(wmOperator *op)
wmOperatorTypeMacro * WM_operatortype_macro_define(wmOperatorType *ot, const char *idname)
static wmOperatorStatus wm_macro_modal(bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus wm_macro_end(wmOperator *op, wmOperatorStatus retval)
void wm_operatortype_free()
std::string WM_operatortype_name(wmOperatorType *ot, PointerRNA *properties)
static wmOperatorStatus wm_macro_invoke(bContext *C, wmOperator *op, const wmEvent *event)
bool WM_operator_depends_on_cursor(bContext &C, wmOperatorType &ot, PointerRNA *properties)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
static wmOperatorStatus wm_macro_invoke_internal(bContext *C, wmOperator *op, const wmEvent *event, wmOperator *opm)
std::string WM_operatortype_description_or_name(bContext *C, wmOperatorType *ot, PointerRNA *properties)
std::string WM_operatortype_description(bContext *C, wmOperatorType *ot, PointerRNA *properties)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
void WM_operatortype_last_properties_clear_all()
void WM_operatortype_append_ptr(void(*opfunc)(wmOperatorType *, void *), void *userdata)
static void wm_operatortype_append__end(wmOperatorType *ot)
#define UNDOCUMENTED_OPERATOR_TIP
static wmOperatorStatus wm_macro_exec(bContext *C, wmOperator *op)
wmOperatorType * WM_operatortype_append_macro(const char *idname, const char *name, const char *description, int flag)
static void operatortype_ghash_free_cb(wmOperatorType *ot)
void WM_operatortype_remove_ptr(wmOperatorType *ot)
void WM_operatortype_props_advanced_end(wmOperatorType *ot)
bool WM_operatortype_remove(const char *idname)
static void wm_macro_cancel(bContext *C, wmOperator *op)
size_t WM_operator_py_idname(char *dst, const char *src)
size_t WM_operator_bl_idname(char *dst, const char *src)
void WM_operator_properties_alloc(PointerRNA **ptr, IDProperty **properties, const char *opstring)
bool WM_operator_bl_idname_is_valid(const char *idname)
void WM_operator_properties_create_ptr(PointerRNA *ptr, wmOperatorType *ot)
void WM_operator_properties_clear(PointerRNA *ptr)
void WM_operator_properties_free(PointerRNA *ptr)
void WM_operator_properties_sanitize(PointerRNA *ptr, const bool no_context)