forked from bartvdbraak/blender
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...)
This commit is contained in:
parent
6536e2d01a
commit
a2a9b6b9a3
@ -324,6 +324,7 @@ class USERPREF_PT_edit(Panel):
|
||||
col.separator()
|
||||
|
||||
col.prop(edit, "use_auto_keying", text="Auto Keyframing:")
|
||||
col.prop(edit, "use_auto_keying_warning")
|
||||
|
||||
sub = col.column()
|
||||
|
||||
|
@ -1617,9 +1617,11 @@ static void drawTransformPixel(const struct bContext *UNUSED(C), ARegion *ar, vo
|
||||
Object *ob = OBACT;
|
||||
|
||||
/* draw autokeyframing hint in the corner */
|
||||
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)
|
||||
|
@ -544,6 +544,7 @@ extern UserDef U; /* from blenkernel blender.c */
|
||||
|
||||
/* toolsettings->autokey_flag */
|
||||
#define AUTOKEY_FLAG_ONLYKEYINGSET (1<<6)
|
||||
#define AUTOKEY_FLAG_NOWARNING (1<<7)
|
||||
#define ANIMRECORD_FLAG_WITHNLA (1<<10)
|
||||
|
||||
/* transopts */
|
||||
|
@ -2746,6 +2746,11 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
|
||||
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);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_INSERTNEEDED);
|
||||
|
Loading…
Reference in New Issue
Block a user