WIP: Added dedicated operator for unlinking actions from the Action Editor (NLA butto...
authorJoshua Leung <aligorith@gmail.com>
Fri, 3 Apr 2015 22:36:46 +0000 (11:36 +1300)
committerJoshua Leung <aligorith@gmail.com>
Fri, 3 Apr 2015 22:37:06 +0000 (11:37 +1300)
commit53f4aa78175307e75e6a9c6deb6fb7f1caf766f9
tree431fed49f98aee0023b9bffdbd3fb72b81d822e1
parent34c4133daf01cd7b2b94bc54b3b78de21b3091b9
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.
release/scripts/startup/bl_ui/space_dopesheet.py
source/blender/editors/include/ED_anim_api.h
source/blender/editors/space_action/action_data.c
source/blender/editors/space_action/action_intern.h
source/blender/editors/space_action/action_ops.c
source/blender/editors/space_nla/nla_buttons.c
source/blender/editors/space_nla/nla_channels.c
source/blender/editors/space_nla/nla_intern.h
source/blender/editors/space_nla/nla_ops.c