diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-12-17 13:47:55 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-12-17 13:47:55 +0300 |
commit | e3a1d044d68000a2e81b662c0cf15bbe17698aa4 (patch) | |
tree | b9f12ad7ca22073cc00f3420114d2d53f7300a55 /source/blender/editors/include/UI_interface.h | |
parent | 6c006b2ebbaa2d56f7dba0a036910138d864305e (diff) |
RNA/UI - Reset Settings to Default Values
Added a new operator for properties which resets RNA-based settings to their 'default' values, as defined in RNA. This currently only works for floats, ints, enums, and booleans (strings and pointers still need to be implemented).
The current extensions to the RNA API that I've made here seem a bit excessive, and can be toned down if necessary. In short, I've just added accessor functions for the default-values of the property definitions.
For this to be really useful, many properties in RNA will need to get defaults defined, since the current defaults for quite a few properties tested were less than ideal.
Diffstat (limited to 'source/blender/editors/include/UI_interface.h')
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 5b512da55c9..f0e52a13d3f 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -688,6 +688,9 @@ void uiItemMenuF(uiLayout *layout, char *name, int icon, uiMenuCreateFunc func, void uiItemMenuEnumO(uiLayout *layout, char *name, int icon, char *opname, char *propname); void uiItemMenuEnumR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname); +/* UI Operators */ +void ui_buttons_operatortypes(void); + /* Helpers for Operators */ void uiAnimContextProperty(const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop, int *index); void uiFileBrowseContextProperty(const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop); |