diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-01-03 08:36:52 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-01-03 08:36:52 +0300 |
commit | ca0b5434fa0f729df57557ff1ec369c9118e2f63 (patch) | |
tree | 4b0de0c5e7f3469d81d267d3a8a3253f8baabcb3 /source/blender/editors/include | |
parent | 1ba9dde22d07633d41eea6db10320a14422a2448 (diff) |
Keyframing Operator Code Cleanup:
Keyframing operators now use a dynamically-generated enum for their
"type" property, which determines the Keying Set to use for keyframing
instead of the obscure "index" values which were determined
internally. Internally though, these same indices are still being used
:)
Notes:
- I've kept the menu-building function and the special "menu" operator
for now, since it's better to not "pollute" the actual insert
keyframes operator with hardcoded menu-showing logic. Instead, the
menu operator does that, so that if you like, you could write another
such wrapper that works differently.
- The 'type' properties could have the PROP_HIDDEN flags removed,
though I think it's cleaner to leave these without this option for
now.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_keyframing.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index 6dc2fe04227..72e87e2c9bc 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -51,6 +51,7 @@ struct ReportList; struct PointerRNA; struct PropertyRNA; +struct EnumPropertyItem; #include "RNA_types.h" @@ -204,6 +205,9 @@ struct KeyingSet *ANIM_get_keyingset_for_autokeying(struct Scene *scene, const c /* Create (and show) a menu containing all the Keying Sets which can be used in the current context */ void ANIM_keying_sets_menu_setup(struct bContext *C, const char title[], const char op_name[]); +/* Dynamically populate an enum of Keying Sets */ +struct EnumPropertyItem *ANIM_keying_sets_enum_itemf(struct bContext *C, struct PointerRNA *ptr, int *free); + /* Check if KeyingSet can be used in the current context */ short ANIM_keyingset_context_ok_poll(struct bContext *C, struct KeyingSet *ks); |