From 53f4aa78175307e75e6a9c6deb6fb7f1caf766f9 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 4 Apr 2015 11:36:46 +1300 Subject: 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. --- source/blender/editors/space_action/action_ops.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/editors/space_action/action_ops.c') 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); -- cgit v1.2.3