diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-30 17:50:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-30 17:50:59 +0400 |
commit | eab50148e23955ab38dca74b964f33eaacf42d27 (patch) | |
tree | f5779b4309cbaac681b21bf76deaf59ba3d11c92 /source/blender/makesrna/intern/rna_action.c | |
parent | ec8848d03a8d37cf41881a535416051fb7ffbeb0 (diff) |
- keymap import/export works again (broke with own api changes)
- function renames, move WM functions into collections wm.add_keymap() --> wm.keymaps.new()
note: new is used for named items in a collection, which return the result.
- Action.get_frame_range() is now a readonly property 'frame_range', floats rather then ints.
Diffstat (limited to 'source/blender/makesrna/intern/rna_action.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_action.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c index fe47d764fac..42ddf340f12 100644 --- a/source/blender/makesrna/intern/rna_action.c +++ b/source/blender/makesrna/intern/rna_action.c @@ -59,7 +59,7 @@ static void rna_ActionGroup_channels_next(CollectionPropertyIterator *iter) iter->valid= (internal->link != NULL); } -static bActionGroup *rna_Action_groups_add(bAction *act, char name[]) +static bActionGroup *rna_Action_groups_new(bAction *act, char name[]) { return action_groups_add_new(act, name); } @@ -149,6 +149,11 @@ static void rna_Action_pose_markers_remove(bAction *act, ReportList *reports, Ti MEM_freeN(marker); } +static void rna_Action_frame_range_get(PointerRNA *ptr,float *values) +{ + calc_action_range(ptr->id.data, values, values+1, 1); +} + #else static void rna_def_dopesheet(BlenderRNA *brna) @@ -361,7 +366,7 @@ static void rna_def_action_groups(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_struct_sdna(srna, "bAction"); RNA_def_struct_ui_text(srna, "Action Groups", "Collection of action groups"); - func= RNA_def_function(srna, "add", "rna_Action_groups_add"); + func= RNA_def_function(srna, "new", "rna_Action_groups_new"); RNA_def_function_ui_description(func, "Add a keyframe to the curve."); parm= RNA_def_string(func, "name", "Group", 0, "", "New name for the action group."); RNA_def_property_flag(parm, PROP_REQUIRED); @@ -464,6 +469,10 @@ static void rna_def_action(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Pose Markers", "Markers specific to this Action, for labeling poses"); rna_def_action_pose_markers(brna, prop); + prop= RNA_def_float_vector(srna, "frame_range" , 2 , NULL , 0, 0, "Frame Range" , "The final frame range of all fcurves within this action" , 0 , 0); + RNA_def_property_float_funcs(prop, "rna_Action_frame_range_get" , NULL, NULL); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_api_action(srna); } |