[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51198] trunk/blender: Made the autokeying warning optional by adding a user pref for this

Joshua Leung aligorith at gmail.com
Tue Oct 9 02:59:42 CEST 2012


Revision: 51198
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51198
Author:   aligorith
Date:     2012-10-09 00:59:40 +0000 (Tue, 09 Oct 2012)
Log Message:
-----------
Made the autokeying warning optional by adding a user pref for this

By default, this is enabled, so that newbie users who are most likely to be
caught short by this will get the benefits of this option, while seasoned
animators are likely to know where to go to turn things off (i.e. the scratch-
an-itch urge is quite a powerful motivating force...)

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/space_userpref.py
    trunk/blender/source/blender/editors/transform/transform.c
    trunk/blender/source/blender/makesdna/DNA_userdef_types.h
    trunk/blender/source/blender/makesrna/intern/rna_userdef.c

Modified: trunk/blender/release/scripts/startup/bl_ui/space_userpref.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_userpref.py	2012-10-08 21:48:56 UTC (rev 51197)
+++ trunk/blender/release/scripts/startup/bl_ui/space_userpref.py	2012-10-09 00:59:40 UTC (rev 51198)
@@ -324,6 +324,7 @@
         col.separator()
 
         col.prop(edit, "use_auto_keying", text="Auto Keyframing:")
+        col.prop(edit, "use_auto_keying_warning")
 
         sub = col.column()
 

Modified: trunk/blender/source/blender/editors/transform/transform.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform.c	2012-10-08 21:48:56 UTC (rev 51197)
+++ trunk/blender/source/blender/editors/transform/transform.c	2012-10-09 00:59:40 UTC (rev 51198)
@@ -1617,9 +1617,11 @@
 	Object *ob = OBACT;
 	
 	/* draw autokeyframing hint in the corner */
-	if (ob && autokeyframe_cfra_can_key(scene, &ob->id)) {
-		drawAutoKeyWarning(t, ar);
-	}	
+	if ((U.autokey_flag & AUTOKEY_FLAG_NOWARNING) == 0) {
+		if (ob && autokeyframe_cfra_can_key(scene, &ob->id)) {
+			drawAutoKeyWarning(t, ar);
+		}
+	}
 }
 
 void saveTransform(bContext *C, TransInfo *t, wmOperator *op)

Modified: trunk/blender/source/blender/makesdna/DNA_userdef_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_userdef_types.h	2012-10-08 21:48:56 UTC (rev 51197)
+++ trunk/blender/source/blender/makesdna/DNA_userdef_types.h	2012-10-09 00:59:40 UTC (rev 51198)
@@ -544,6 +544,7 @@
 
 /* toolsettings->autokey_flag */
 #define 	AUTOKEY_FLAG_ONLYKEYINGSET	(1<<6)
+#define 	AUTOKEY_FLAG_NOWARNING		(1<<7)
 #define 	ANIMRECORD_FLAG_WITHNLA		(1<<10)
 
 /* transopts */

Modified: trunk/blender/source/blender/makesrna/intern/rna_userdef.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_userdef.c	2012-10-08 21:48:56 UTC (rev 51197)
+++ trunk/blender/source/blender/makesrna/intern/rna_userdef.c	2012-10-09 00:59:40 UTC (rev 51198)
@@ -2745,6 +2745,11 @@
 	RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_INSERTAVAIL);
 	RNA_def_property_ui_text(prop, "Auto Keyframe Insert Available",
 	                         "Automatic keyframe insertion in available F-Curves");
+							 
+	prop = RNA_def_property(srna, "use_auto_keying_warning", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_NOWARNING);
+	RNA_def_property_ui_text(prop, "Show Auto Keying Warning",
+	                         "Show warning indicators when transforming Object and Bones if Auto Keying is enabled");
 	
 	/* keyframing settings */
 	prop = RNA_def_property(srna, "use_keyframe_insert_needed", PROP_BOOLEAN, PROP_NONE);




More information about the Bf-blender-cvs mailing list