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:
authorJacques Lucke <jacques@blender.org>2021-11-19 17:28:44 +0300
committerJacques Lucke <jacques@blender.org>2021-11-19 17:28:44 +0300
commit04ec36f677d47e3a70baa944bb26fc03d5e8d52e (patch)
treedf6eb9d4a1c57e18ee7585a79d688f351f7734ea /source/blender/editors/space_view3d/space_view3d.c
parenta20e703d1a5cc0d3e4294825e31609d9b92da06d (diff)
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
Diffstat (limited to 'source/blender/editors/space_view3d/space_view3d.c')
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c2
1 files changed, 1 insertions, 1 deletions
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)