From 04ec36f677d47e3a70baa944bb26fc03d5e8d52e Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Fri, 19 Nov 2021 15:28:44 +0100 Subject: Fix T87912: use session id instead of name to identify dropped object The old code did not work when there were multiple ids with the same name (which can happen when ids are linked in). The solution is to use the session ids instead. Those are different even when two ids have the same name. Differential Revision: https://developer.blender.org/D11116 --- source/blender/editors/space_view3d/space_view3d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/space_view3d') diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 6acf51aec6e..bf16dfb469c 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -784,7 +784,7 @@ static void view3d_collection_drop_copy(wmDrag *drag, wmDropBox *drop) { ID *id = WM_drag_get_local_ID_or_import_from_asset(drag, ID_GR); - RNA_string_set(drop->ptr, "name", id->name + 2); + RNA_int_set(drop->ptr, "session_uuid", (int)id->session_uuid); } static void view3d_id_drop_copy(wmDrag *drag, wmDropBox *drop) -- cgit v1.2.3