diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-05-08 14:50:32 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-05-08 14:50:32 +0400 |
commit | 7e29e97c218068a979a417e4fc9aca156a0ccd7d (patch) | |
tree | 12c2898e3fdc8bd38e6db91aafbb880babee26e0 /source/blender/editors/space_action/action_edit.c | |
parent | 171969213f2cad3a76028bc3e273007ee6287cf1 (diff) |
2.5 - Assorted animation code cleanups
* Replaced a few duplicated enums that were also defined for some RNA properties already with the RNA ones.
* Start of cleanup of markers code in preparation for getting the rest of the editing code involving markers working again
Diffstat (limited to 'source/blender/editors/space_action/action_edit.c')
-rw-r--r-- | source/blender/editors/space_action/action_edit.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 9e679a5b722..a486e9067ae 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -60,6 +60,7 @@ #include "RNA_access.h" #include "RNA_define.h" +#include "RNA_enum_types.h" #include "BKE_action.h" #include "BKE_depsgraph.h" @@ -872,14 +873,6 @@ void ACT_OT_keyframes_extrapolation_type_set (wmOperatorType *ot) /* ******************** Set Interpolation-Type Operator *********************** */ -/* defines for set ipo-type for selected keyframes tool */ -EnumPropertyItem prop_actkeys_ipo_types[] = { - {BEZT_IPO_CONST, "CONSTANT", "Constant Interpolation", ""}, - {BEZT_IPO_LIN, "LINEAR", "Linear Interpolation", ""}, - {BEZT_IPO_BEZ, "BEZIER", "Bezier Interpolation", ""}, - {0, NULL, NULL, NULL} -}; - /* this function is responsible for setting interpolation mode for keyframes */ static void setipo_action_keys(bAnimContext *ac, short mode) { @@ -945,21 +938,11 @@ void ACT_OT_keyframes_interpolation_type (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_enum(ot->srna, "type", prop_actkeys_ipo_types, 0, "Type", ""); + RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, "Type", ""); } /* ******************** Set Handle-Type Operator *********************** */ -/* defines for set handle-type for selected keyframes tool */ -EnumPropertyItem prop_actkeys_handletype_types[] = { - {HD_AUTO, "AUTO", "Auto Handles", ""}, - {HD_VECT, "VECTOR", "Vector Handles", ""}, - {HD_FREE, "FREE", "Free Handles", ""}, - {HD_ALIGN, "ALIGN", "Aligned Handles", ""}, -// {-1, "TOGGLE", "Toggle between Free and Aligned Handles", ""}, - {0, NULL, NULL, NULL} -}; - /* this function is responsible for setting handle-type of selected keyframes */ static void sethandles_action_keys(bAnimContext *ac, short mode) { @@ -1043,7 +1026,7 @@ void ACT_OT_keyframes_handle_type_set (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* id-props */ - RNA_def_enum(ot->srna, "type", prop_actkeys_handletype_types, 0, "Type", ""); + RNA_def_enum(ot->srna, "type", beztriple_handle_type_items, 0, "Type", ""); } /* ************************************************************************** */ |