Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-09-23 12:15:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-09-23 12:15:53 +0400
commit1c3f2354f83b3e79dee31d837ca4d7c08d2c3f26 (patch)
tree6b5f515f152d4dc31132db13476c1800e9598e84 /source/blender/makesrna/intern/rna_animation.c
parentdab69c01a1fc22efa13c55918c541e7f948f7fdf (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_animation.c')
-rw-r--r--source/blender/makesrna/intern/rna_animation.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 42cd6fd5911..cee6b7f854a 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -394,21 +394,18 @@ static void rna_KeyingSet_paths_clear(KeyingSet *keyingset, ReportList *reports)
static void rna_def_common_keying_flags(StructRNA *srna, short reg)
{
PropertyRNA *prop;
-
- prop= RNA_def_property(srna, "use_insertkey_needed", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "keyingflag", INSERTKEY_NEEDED);
- RNA_def_property_ui_text(prop, "Insert Keyframes - Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves");
- if (reg) RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
-
- prop= RNA_def_property(srna, "use_insertkey_visual", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "keyingflag", INSERTKEY_MATRIX);
- RNA_def_property_ui_text(prop, "Insert Keyframes - Visual", "Insert keyframes based on 'visual transforms'");
- if (reg) RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
-
- prop= RNA_def_property(srna, "use_insertkey_xyz_to_rgb", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "keyingflag", INSERTKEY_XYZ2RGB);
- RNA_def_property_ui_text(prop, "F-Curve Colors - XYZ to RGB", "Color for newly added transformation F-Curves (Location, Rotation, Scale) and also Color is based on the transform axis");
- if (reg) RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
+
+ static EnumPropertyItem keying_flag_items[] = {
+ {INSERTKEY_NEEDED, "INSERTKEY_NEEDED", 0, "Insert Keyframes - Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves"},
+ {INSERTKEY_MATRIX, "INSERTKEY_VISUAL", 0, "Insert Keyframes - Visual", "Insert keyframes based on 'visual transforms'"},
+ {INSERTKEY_XYZ2RGB, "INSERTKEY_XYZ_TO_RGB", 0, "F-Curve Colors - XYZ to RGB", "Color for newly added transformation F-Curves (Location, Rotation, Scale) and also Color is based on the transform axis"},
+ {0, NULL, 0, NULL, NULL}};
+
+ prop= RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "keyingflag");
+ RNA_def_property_enum_items(prop, keying_flag_items);
+ RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL|PROP_ENUM_FLAG);
+ RNA_def_property_ui_text(prop, "Options", "Keying set options");
}
/* --- */