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
path: root/source
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-10-12 18:06:04 +0300
committerJulian Eisel <julian@blender.org>2021-10-12 18:49:59 +0300
commit72a47fea5d30d168e0de90a20187d63f4fe23e94 (patch)
tree44c7ab02819cdbde7c324965939068e2c73f01e6 /source
parentc63fb657c8991dbffaf6d6bb2bdf3d4fc3894f53 (diff)
Fix dragging objects from Outliner to 3D View broken
A dragged & dropped wouldn't be duplicated anymore, it would just be moved to the drop position. Caused by c8fcea0c33ef.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index bedc24a6287..bda6fa05a63 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -630,7 +630,9 @@ static void view3d_ob_drop_copy(wmDrag *drag, wmDropBox *drop)
ID *id = WM_drag_get_local_ID_or_import_from_asset(drag, ID_OB);
RNA_string_set(drop->ptr, "name", id->name + 2);
- RNA_boolean_set(drop->ptr, "duplicate", false);
+ /* Don't duplicate ID's which were just imported. Only do that for existing, local IDs. */
+ const bool is_imported_id = drag->type == WM_DRAG_ASSET;
+ RNA_boolean_set(drop->ptr, "duplicate", !is_imported_id);
}
static void view3d_collection_drop_copy(wmDrag *drag, wmDropBox *drop)