[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37686] branches/soc-2011-pepper/source/ blender/makesrna/intern/rna_scene.c: Bugfix: Fix for autokey menu in Timeline
Joshua Leung
aligorith at gmail.com
Tue Jun 21 04:31:13 CEST 2011
Revision: 37686
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37686
Author: aligorith
Date: 2011-06-21 02:31:12 +0000 (Tue, 21 Jun 2011)
Log Message:
-----------
Bugfix: Fix for autokey menu in Timeline
The mode items were only enabled correctly when auto-keyframing was
enabled.
Modified Paths:
--------------
branches/soc-2011-pepper/source/blender/makesrna/intern/rna_scene.c
Modified: branches/soc-2011-pepper/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- branches/soc-2011-pepper/source/blender/makesrna/intern/rna_scene.c 2011-06-21 02:16:22 UTC (rev 37685)
+++ branches/soc-2011-pepper/source/blender/makesrna/intern/rna_scene.c 2011-06-21 02:31:12 UTC (rev 37686)
@@ -1047,10 +1047,14 @@
{UV_SELECT_FACE, "FACE", ICON_UV_FACESEL, "Face", "Face selection mode"},
{UV_SELECT_ISLAND, "ISLAND", ICON_UV_ISLANDSEL, "Island", "Island selection mode"},
{0, NULL, 0, NULL, NULL}};
-
+
+ /* the construction of this enum is quite special - everything is stored as bitflags,
+ * with 1st position only for for on/off (and exposed as boolean), while others are mutually
+ * exclusive options but which will only have any effect when autokey is enabled
+ */
static EnumPropertyItem auto_key_items[] = {
- {AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add & Replace", ""},
- {AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""},
+ {AUTOKEY_MODE_NORMAL & ~AUTOKEY_ON, "ADD_REPLACE_KEYS", 0, "Add & Replace", ""},
+ {AUTOKEY_MODE_EDITKEYS & ~AUTOKEY_ON, "REPLACE_KEYS", 0, "Replace", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem retarget_roll_items[] = {
@@ -1193,7 +1197,7 @@
RNA_def_property_ui_icon(prop, ICON_REC, 0);
prop= RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "autokey_mode");
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "autokey_mode");
RNA_def_property_enum_items(prop, auto_key_items);
RNA_def_property_ui_text(prop, "Auto-Keying Mode", "Mode of automatic keyframe insertion for Objects and Bones");
More information about the Bf-blender-cvs
mailing list