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:
authorCampbell Barton <ideasman42@gmail.com>2021-06-09 18:55:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-09 19:22:45 +0300
commit5575aba0256b584d66d2492345cea5ad6cee0eb5 (patch)
tree9c27a7cead9f4e6d03bfc46a506424f8f4d94eaf /source/blender/editors/space_outliner/outliner_dragdrop.c
parent25d8ce16b53d64a9921243e9b4f816f97659b4be (diff)
Cleanup: simplify grease pencil type checks
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_dragdrop.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_dragdrop.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.c b/source/blender/editors/space_outliner/outliner_dragdrop.c
index 8e19f76ea16..7d889eed612 100644
--- a/source/blender/editors/space_outliner/outliner_dragdrop.c
+++ b/source/blender/editors/space_outliner/outliner_dragdrop.c
@@ -818,12 +818,7 @@ static bool datastack_drop_are_types_valid(StackDropData *drop_data)
switch (drop_data->drag_tselem->type) {
case TSE_MODIFIER_BASE:
case TSE_MODIFIER:
- if (ob_parent->type == OB_GPENCIL) {
- return ob_dst->type == OB_GPENCIL;
- }
- else if (ob_parent->type != OB_GPENCIL) {
- return ob_dst->type != OB_GPENCIL;
- }
+ return (ob_parent->type == OB_GPENCIL) == (ob_dst->type == OB_GPENCIL);
break;
case TSE_CONSTRAINT_BASE:
case TSE_CONSTRAINT:
@@ -1008,7 +1003,7 @@ static void datastack_drop_reorder(bContext *C, ReportList *reports, StackDropDa
drag_te, drop_te, insert_type, &ob->greasepencil_modifiers);
ED_object_gpencil_modifier_move_to_index(reports, ob, drop_data->drag_directdata, index);
}
- else if (ob->type != OB_GPENCIL) {
+ else {
index = outliner_get_insert_index(drag_te, drop_te, insert_type, &ob->modifiers);
ED_object_modifier_move_to_index(reports, ob, drop_data->drag_directdata, index);
}