From 2e3e044d27e90dc87bdce6af9cef77d9543e4d89 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 10 Jul 2009 19:56:13 +0000 Subject: RNA * Enums can now be dynamically created in the _itemf callback, using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking for enum items now need to potentially free the items. * This callback now also gets context, this was added specifically for operators. This doesn't fit design well at all, needed to do some ugly hacks, but can't find a good solution at the moment. * All enums must have a default list of items too, even with an _itemf callback, for docs and fallback in case there is no context. * Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation. * Also changes some operator properties that were enums to booleas (unselected, deselect), to make them consistent with other ops. --- source/blender/editors/include/ED_transform.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/include/ED_transform.h') diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index adcf2cfc024..fde270040a9 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -38,6 +38,7 @@ struct wmEvent; struct bContext; struct Object; struct uiLayout; +struct EnumPropertyItem; void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *keymap, int spaceid); void transform_operatortypes(void); @@ -114,7 +115,7 @@ int BIF_menuselectTransformOrientation(void); void BIF_selectTransformOrientation(struct bContext *C, struct TransformOrientation *ts); void BIF_selectTransformOrientationValue(struct bContext *C, int orientation); -void BIF_menuTransformOrientation(struct bContext *C, struct uiLayout *layout, void *arg); +struct EnumPropertyItem *BIF_enumTransformOrientation(struct bContext *C); char * BIF_menustringTransformOrientation(const struct bContext *C, char *title); /* the returned value was allocated and needs to be freed after use */ int BIF_countTransformOrientation(const struct bContext *C); -- cgit v1.2.3