[Bf-blender-cvs] [72a47fea5d3] master: Fix dragging objects from Outliner to 3D View broken
Julian Eisel
noreply at git.blender.org
Tue Oct 12 17:50:13 CEST 2021
Commit: 72a47fea5d30d168e0de90a20187d63f4fe23e94
Author: Julian Eisel
Date: Tue Oct 12 17:06:04 2021 +0200
Branches: master
https://developer.blender.org/rB72a47fea5d30d168e0de90a20187d63f4fe23e94
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.
===================================================================
M source/blender/editors/space_view3d/space_view3d.c
===================================================================
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)
More information about the Bf-blender-cvs
mailing list