diff options
author | Joshua Leung <aligorith@gmail.com> | 2015-04-04 01:36:46 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2015-04-04 01:37:06 +0300 |
commit | 53f4aa78175307e75e6a9c6deb6fb7f1caf766f9 (patch) | |
tree | 431fed49f98aee0023b9bffdbd3fb72b81d822e1 /release | |
parent | 34c4133daf01cd7b2b94bc54b3b78de21b3091b9 (diff) |
WIP: Added dedicated operator for unlinking actions from the Action Editor (NLA buttons support to come)
After looking into this more carefully, I've found that we do in fact need a dedicate
operator to add some custom logic when trying to unlink an action from the editor/datablocks.
Specifically, this new operator does the following:
1) When in Tweak Mode, it shouldn't be possible to unlink the active action,
or else, everything turns to custard.
2) If the Action doesn't have any other users, the user should at least get
a warning that it is going to get lost.
3) We need a convenient way to exit Tweak Mode from the Action Editor
4) If none of the above apply, we can just unlink normally
This commit implements this for the Action Editor, with stubs for the NLA Editor too.
Those will be fixed next.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_dopesheet.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index c4452ee61f4..bb08a7c392e 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -118,7 +118,7 @@ class DOPESHEET_HT_header(Header): row.operator("action.layer_prev", text="", icon='TRIA_DOWN') row.operator("action.layer_next", text="", icon='TRIA_UP') - layout.template_ID(st, "action", new="action.new") + layout.template_ID(st, "action", new="action.new", unlink="action.unlink") row = layout.row(align=True) row.operator("action.push_down", text="Push Down", icon='NLA_PUSHDOWN') |