Action Editor: "New Action" operator now stashes old actions, and is used by default again

This commit modifies the "New Action" operator to always stash the old action
before it creates a new one. As a result, the old active action will now have
a proper user of sorts after the new one is created, preventing previously
created actions from being lost.

Now that the New operator does this, it can be used for the Action Editor header AND
NLA Editor (Animation Data Panel -> Active Action) again. The "stash and create"
operator is somewhat redundant at this point as a result.
This commit is contained in:
Joshua Leung
2015-03-01 01:35:34 +13:00
parent 741a66e472
commit ea84b0e4ac
2 changed files with 63 additions and 7 deletions

View File

@@ -122,7 +122,7 @@ class DOPESHEET_HT_header(Header):
dopesheet_filter(layout, context, genericFiltersOnly=True)
if st.mode in {'ACTION', 'SHAPEKEY'}:
layout.template_ID(st, "action", new="action.stash_and_create")
layout.template_ID(st, "action", new="action.new")
row = layout.row(align=True)
row.operator("action.push_down", text="Push Down", icon='NLA_PUSHDOWN')