Merge branch 'master' into blender2.8
This commit is contained in:
commit
4705682151
|
@ -307,27 +307,6 @@ void WM_operator_type_set(struct wmOperator *op, struct wmOperatorType *ot);
|
|||
void WM_operator_stack_clear(struct wmWindowManager *wm);
|
||||
void WM_operator_handlers_clear(wmWindowManager *wm, struct wmOperatorType *ot);
|
||||
|
||||
struct wmOperatorType *WM_operatortype_find(const char *idname, bool quiet);
|
||||
void WM_operatortype_iter(struct GHashIterator *ghi);
|
||||
void WM_operatortype_append(void (*opfunc)(struct wmOperatorType *));
|
||||
void WM_operatortype_append_ptr(void (*opfunc)(struct wmOperatorType *, void *), void *userdata);
|
||||
void WM_operatortype_append_macro_ptr(void (*opfunc)(struct wmOperatorType *, void *), void *userdata);
|
||||
void WM_operatortype_remove_ptr(struct wmOperatorType *ot);
|
||||
bool WM_operatortype_remove(const char *idname);
|
||||
void WM_operatortype_last_properties_clear_all(void);
|
||||
void WM_operatortype_props_advanced_begin(struct wmOperatorType *ot);
|
||||
void WM_operatortype_props_advanced_end(struct wmOperatorType *ot);
|
||||
|
||||
#define WM_operatortype_prop_tag(property, tags) \
|
||||
{ \
|
||||
CHECK_TYPE(tags, eOperatorPropTags); \
|
||||
RNA_def_property_tags(prop, tags); \
|
||||
} (void)0
|
||||
|
||||
struct wmOperatorType *WM_operatortype_append_macro(const char *idname, const char *name, const char *description, int flag);
|
||||
struct wmOperatorTypeMacro *WM_operatortype_macro_define(struct wmOperatorType *ot, const char *idname);
|
||||
|
||||
|
||||
bool WM_operator_poll (struct bContext *C, struct wmOperatorType *ot);
|
||||
bool WM_operator_poll_context(struct bContext *C, struct wmOperatorType *ot, short context);
|
||||
int WM_operator_call_ex(struct bContext *C, struct wmOperator *op, const bool store);
|
||||
|
@ -426,14 +405,35 @@ void WM_operator_py_idname(char *to, const char *from);
|
|||
bool WM_operator_py_idname_ok_or_report(struct ReportList *reports, const char *classname, const char *idname);
|
||||
const char *WM_context_member_from_ptr(struct bContext *C, const struct PointerRNA *ptr);
|
||||
|
||||
/* *************** uilist types ******************** */
|
||||
/* wm_operator_type.c */
|
||||
struct wmOperatorType *WM_operatortype_find(const char *idname, bool quiet);
|
||||
void WM_operatortype_iter(struct GHashIterator *ghi);
|
||||
void WM_operatortype_append(void (*opfunc)(struct wmOperatorType *));
|
||||
void WM_operatortype_append_ptr(void (*opfunc)(struct wmOperatorType *, void *), void *userdata);
|
||||
void WM_operatortype_append_macro_ptr(void (*opfunc)(struct wmOperatorType *, void *), void *userdata);
|
||||
void WM_operatortype_remove_ptr(struct wmOperatorType *ot);
|
||||
bool WM_operatortype_remove(const char *idname);
|
||||
void WM_operatortype_last_properties_clear_all(void);
|
||||
void WM_operatortype_props_advanced_begin(struct wmOperatorType *ot);
|
||||
void WM_operatortype_props_advanced_end(struct wmOperatorType *ot);
|
||||
|
||||
#define WM_operatortype_prop_tag(property, tags) \
|
||||
{ \
|
||||
CHECK_TYPE(tags, eOperatorPropTags); \
|
||||
RNA_def_property_tags(prop, tags); \
|
||||
} (void)0
|
||||
|
||||
struct wmOperatorType *WM_operatortype_append_macro(const char *idname, const char *name, const char *description, int flag);
|
||||
struct wmOperatorTypeMacro *WM_operatortype_macro_define(struct wmOperatorType *ot, const char *idname);
|
||||
|
||||
/* wm_uilist_type.c */
|
||||
void WM_uilisttype_init(void);
|
||||
struct uiListType *WM_uilisttype_find(const char *idname, bool quiet);
|
||||
bool WM_uilisttype_add(struct uiListType *ult);
|
||||
void WM_uilisttype_freelink(struct uiListType *ult);
|
||||
void WM_uilisttype_free(void);
|
||||
|
||||
/* *************** menu types ******************** */
|
||||
/* wm_menu_type.c */
|
||||
void WM_menutype_init(void);
|
||||
struct MenuType *WM_menutype_find(const char *idname, bool quiet);
|
||||
bool WM_menutype_add(struct MenuType *mt);
|
||||
|
|
|
@ -262,6 +262,27 @@ void WM_operatortype_props_advanced_end(wmOperatorType *ot)
|
|||
ot_prop_basic_count = -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove memory of all previously executed tools.
|
||||
*/
|
||||
void WM_operatortype_last_properties_clear_all(void)
|
||||
{
|
||||
GHashIterator iter;
|
||||
|
||||
for (WM_operatortype_iter(&iter);
|
||||
(!BLI_ghashIterator_done(&iter));
|
||||
(BLI_ghashIterator_step(&iter)))
|
||||
{
|
||||
wmOperatorType *ot = BLI_ghashIterator_getValue(&iter);
|
||||
|
||||
if (ot->last_properties) {
|
||||
IDP_FreeProperty(ot->last_properties);
|
||||
MEM_freeN(ot->last_properties);
|
||||
ot->last_properties = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
|
|
@ -123,26 +123,6 @@
|
|||
#define UNDOCUMENTED_OPERATOR_TIP N_("(undocumented operator)")
|
||||
|
||||
/* ************ operator API, exported ********** */
|
||||
/**
|
||||
* Remove memory of all previously executed tools.
|
||||
*/
|
||||
void WM_operatortype_last_properties_clear_all(void)
|
||||
{
|
||||
GHashIterator iter;
|
||||
|
||||
for (WM_operatortype_iter(&iter);
|
||||
(!BLI_ghashIterator_done(&iter));
|
||||
(BLI_ghashIterator_step(&iter)))
|
||||
{
|
||||
wmOperatorType *ot = BLI_ghashIterator_getValue(&iter);
|
||||
|
||||
if (ot->last_properties) {
|
||||
IDP_FreeProperty(ot->last_properties);
|
||||
MEM_freeN(ot->last_properties);
|
||||
ot->last_properties = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* SOME_OT_op -> some.op */
|
||||
void WM_operator_py_idname(char *to, const char *from)
|
||||
|
|
Loading…
Reference in New Issue