Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2015-04-04 01:36:46 +0300
committerJoshua Leung <aligorith@gmail.com>2015-04-04 01:37:06 +0300
commit53f4aa78175307e75e6a9c6deb6fb7f1caf766f9 (patch)
tree431fed49f98aee0023b9bffdbd3fb72b81d822e1 /source/blender/editors/space_action/action_ops.c
parent34c4133daf01cd7b2b94bc54b3b78de21b3091b9 (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 'source/blender/editors/space_action/action_ops.c')
-rw-r--r--source/blender/editors/space_action/action_ops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c
index 431dd27d064..9ad0931a957 100644
--- a/source/blender/editors/space_action/action_ops.c
+++ b/source/blender/editors/space_action/action_ops.c
@@ -79,6 +79,8 @@ void action_operatortypes(void)
WM_operatortype_append(ACTION_OT_paste);
WM_operatortype_append(ACTION_OT_new);
+ WM_operatortype_append(ACTION_OT_unlink);
+
WM_operatortype_append(ACTION_OT_push_down);
WM_operatortype_append(ACTION_OT_stash);
WM_operatortype_append(ACTION_OT_stash_and_create);