diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-09-23 12:15:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-09-23 12:15:53 +0400 |
commit | 1c3f2354f83b3e79dee31d837ca4d7c08d2c3f26 (patch) | |
tree | 6b5f515f152d4dc31132db13476c1800e9598e84 /source/blender/makesrna/intern/rna_scene.c | |
parent | dab69c01a1fc22efa13c55918c541e7f948f7fdf (diff) |
bugfix [#23795] Insert Visual Loc/Rot Keyframe of Armature Bones Broken
- converted 3 options in keying sets to use bl_options like panels & operators
- removed function arguments for new keying sets, better adjust these after to avoid duplicating properties in function arguments (they were not used).
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index eba441ad82f..1bcaf490c8d 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -939,22 +939,12 @@ static void rna_TimeLine_remove(Scene *scene, ReportList *reports, TimeMarker *m MEM_freeN(marker); } -static KeyingSet *rna_Scene_keying_set_new(Scene *sce, ReportList *reports, - char name[], int absolute, int insertkey_needed, int insertkey_visual) +static KeyingSet *rna_Scene_keying_set_new(Scene *sce, ReportList *reports, char name[]) { KeyingSet *ks= NULL; - short flag=0, keyingflag=0; - - /* validate flags */ - if (absolute) - flag |= KEYINGSET_ABSOLUTE; - if (insertkey_needed) - keyingflag |= INSERTKEY_NEEDED; - if (insertkey_visual) - keyingflag |= INSERTKEY_MATRIX; - + /* call the API func, and set the active keyingset index */ - ks= BKE_keyingset_add(&sce->keyingsets, name, flag, keyingflag); + ks= BKE_keyingset_add(&sce->keyingsets, name, KEYINGSET_ABSOLUTE, 0); if (ks) { sce->active_keyingset= BLI_countlist(&sce->keyingsets); @@ -3010,17 +3000,13 @@ static void rna_def_scene_keying_sets(BlenderRNA *brna, PropertyRNA *cprop) func= RNA_def_function(srna, "new", "rna_Scene_keying_set_new"); RNA_def_function_ui_description(func, "Add a new Keying Set to Scene."); RNA_def_function_flag(func, FUNC_USE_REPORTS); + /* name */ + RNA_def_string(func, "name", "KeyingSet", 64, "Name", "Name of Keying Set"); + /* returns the new KeyingSet */ parm= RNA_def_pointer(func, "keyingset", "KeyingSet", "", "Newly created Keying Set."); RNA_def_function_return(func, parm); - /* name */ - RNA_def_string(func, "name", "KeyingSet", 64, "Name", "Name of Keying Set"); - /* flags */ - RNA_def_boolean(func, "absolute", 1, "Absolute", "Keying Set defines specific paths/settings to be keyframed (i.e. is not reliant on context info)"); - /* keying flags */ - RNA_def_boolean(func, "insertkey_needed", 0, "Insert Keyframes - Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves."); - RNA_def_boolean(func, "insertkey_visual", 0, "Insert Keyframes - Visual", "Insert keyframes based on 'visual transforms'."); - + prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "KeyingSet"); RNA_def_property_flag(prop, PROP_EDITABLE); |