diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-09-04 06:44:56 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-09-04 06:44:56 +0400 |
commit | fa01703ac3caf08c42509e17be94559efd69bd2b (patch) | |
tree | 4223b41fcb09043543ffcdae93baf8330d4eea4d /source/blender/makesrna | |
parent | 640e39206b25bcd433223d85298961a860fc5cd7 (diff) |
2.5 - Keyframe Types for DopeSheet
It is now possible to tag certain keyframes as being 'breakdowns' in the DopeSheet. Breakdown keyframes are drawn as slightly smaller blue diamonds.
Simply select the relevant keyframes and use the RKEY hotkey (or from the menus, Key->Keyframe Type) to choose between tagging the keyframe as a 'proper' keyframe and a 'breakdown' keyframe.
Notes:
* Please note that this feature does not currently imply anything about breakdowns moving around keyframes or behaving any differently from any other type of keyframe
* In future, if there is any such need, more keyframe types could be added, though this is not really likely at all
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/RNA_enum_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_curve.c | 19 |
2 files changed, 17 insertions, 3 deletions
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h index 3bba474677f..a59fc8716ec 100644 --- a/source/blender/makesrna/RNA_enum_types.h +++ b/source/blender/makesrna/RNA_enum_types.h @@ -38,6 +38,7 @@ extern EnumPropertyItem modifier_type_items[]; extern EnumPropertyItem constraint_type_items[]; extern EnumPropertyItem boidrule_type_items[]; +extern EnumPropertyItem beztriple_keyframe_type_items[]; extern EnumPropertyItem beztriple_handle_type_items[]; extern EnumPropertyItem beztriple_interpolation_mode_items[]; diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index bb094eef962..503ca031fb6 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -48,6 +48,11 @@ EnumPropertyItem beztriple_interpolation_mode_items[] = { {BEZT_IPO_LIN, "LINEAR", 0, "Linear", ""}, {BEZT_IPO_BEZ, "BEZIER", 0, "Bezier", ""}, {0, NULL, 0, NULL, NULL}}; + +EnumPropertyItem beztriple_keyframe_type_items[] = { + {BEZT_KEYTYPE_KEYFRAME, "KEYFRAME", 0, "Keyframe", ""}, + {BEZT_KEYTYPE_BREAKDOWN, "BREAKDOWN", 0, "Breakdown", ""}, + {0, NULL, 0, NULL, NULL}}; #ifdef RNA_RUNTIME @@ -155,7 +160,10 @@ static void rna_Curve_update_data(bContext *C, PointerRNA *ptr) Scene *scene= CTX_data_scene(C); Curve *cu= ptr->id.data; Object *ob; - + + if (cu == NULL) + return; + for(ob=bmain->object.first; ob; ob= ob->id.next) { if(ob->data == cu) { /* XXX this will loop over all objects again (slow) */ @@ -259,10 +267,15 @@ static void rna_def_beztriple(BlenderRNA *brna) prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "ipo"); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_items(prop, beztriple_interpolation_mode_items); RNA_def_property_ui_text(prop, "Interpolation", "(For F-Curves Only) Interpolation to use for segment of curve starting from current BezTriple."); - RNA_def_property_update(prop, 0, "rna_Curve_update_data"); + //RNA_def_property_update(prop, 0, "rna_Curve_update_data"); // this should be an F-Curve update call instead... + + prop= RNA_def_property(srna, "keyframe_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "hide"); + RNA_def_property_enum_items(prop, beztriple_keyframe_type_items); + RNA_def_property_ui_text(prop, "Keyframe Type", "(For F-Curves only) The type of keyframe this control point defines."); + //RNA_def_property_update(prop, 0, "rna_Curve_update_data"); // this should be an F-Curve update call instead... /* Vector values */ prop= RNA_def_property(srna, "handle1", PROP_FLOAT, PROP_TRANSLATION); |