Fix T44068: "Layered" option for auto keyframing doesn't "Insert Available Only" is enabled

The "Layered" option for auto keyframing will create a new NLA strip if playback
reaches the end of the frame range and jumps back again. The idea is that instead
of overwriting the keyframes you've already made, it will make a new animation
layer. However, this does not work with the "Insert Available Only" option
(which can either be set in the User Prefs, or in the active keyingset), as that
option needs some existing FCurves to tell what it can insert keyframes into.

The "fix" here is to simply not show the offending button in situations where it
cannot be used!
This commit is contained in:
Joshua Leung 2015-03-28 23:48:10 +13:00
parent b7afbaf8cc
commit 1a5c5ac742
Notes: blender-bot 2023-02-14 10:11:54 +01:00
Referenced by issue #44068, "Layered" option during autokey playback
1 changed files with 2 additions and 1 deletions

View File

@ -30,6 +30,7 @@ class TIME_HT_header(Header):
scene = context.scene
toolsettings = context.tool_settings
screen = context.screen
userprefs = context.user_preferences
row = layout.row(align=True)
row.template_header()
@ -82,7 +83,7 @@ class TIME_HT_header(Header):
if toolsettings.use_keyframe_insert_auto:
row.prop(toolsettings, "use_keyframe_insert_keyingset", text="", toggle=True)
if screen.is_animation_playing:
if screen.is_animation_playing and not userprefs.edit.use_keyframe_insert_available:
subsub = row.row(align=True)
subsub.prop(toolsettings, "use_record_with_nla", toggle=True)