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:
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tools.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c44
1 files changed, 16 insertions, 28 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index 09df1d57b2b..bf76fdda61e 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -1160,49 +1160,37 @@ static int outliner_data_operation_exec(bContext *C, wmOperator *op)
event = RNA_enum_get(op->ptr, "type");
set_operation_types(soops, &soops->tree, &scenelevel, &objectlevel, &idlevel, &datalevel);
- if (event <= 0)
- return OPERATOR_CANCELLED;
-
- switch (datalevel) {
- case TSE_POSE_CHANNEL:
- {
+ if (datalevel == TSE_POSE_CHANNEL) {
+ if (event > 0) {
outliner_do_data_operation(soops, datalevel, event, &soops->tree, pchan_cb, NULL);
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL);
ED_undo_push(C, "PoseChannel operation");
}
- break;
-
- case TSE_BONE:
- {
+ }
+ else if (datalevel == TSE_BONE) {
+ if (event > 0) {
outliner_do_data_operation(soops, datalevel, event, &soops->tree, bone_cb, NULL);
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL);
ED_undo_push(C, "Bone operation");
}
- break;
-
- case TSE_EBONE:
- {
+ }
+ else if (datalevel == TSE_EBONE) {
+ if (event > 0) {
outliner_do_data_operation(soops, datalevel, event, &soops->tree, ebone_cb, NULL);
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, NULL);
ED_undo_push(C, "EditBone operation");
}
- break;
-
- case TSE_SEQUENCE:
- {
+ }
+ else if (datalevel == TSE_SEQUENCE) {
+ if (event > 0) {
Scene *scene = CTX_data_scene(C);
outliner_do_data_operation(soops, datalevel, event, &soops->tree, sequence_cb, scene);
}
- break;
-
- case TSE_RNA_STRUCT:
- if (event == 5) {
- outliner_do_data_operation(soops, datalevel, event, &soops->tree, data_select_linked_cb, C);
- }
- break;
-
- default:
- break;
+ }
+ else if (datalevel == TSE_RNA_STRUCT) {
+ if (event == 5) {
+ outliner_do_data_operation(soops, datalevel, event, &soops->tree, data_select_linked_cb, C);
+ }
}
return OPERATOR_FINISHED;