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:
authorBastien Montagne <bastien@blender.org>2021-09-29 16:32:53 +0300
committerBastien Montagne <bastien@blender.org>2021-09-29 18:10:42 +0300
commitdf9120b365380cc1d64006e0d37a650eaaff9776 (patch)
treea503aa77796a9ce9eb57495484c0dd8e15a3112a /source/blender/windowmanager/WM_types.h
parent6aac892fad9e6447cf7cfdaee5c2e9c61e2e99fe (diff)
Fix T89864: Adding an asset referencing other objects adds it to scene but only adds data-blocks of referenced objects.
Link/append code needs proper access to scene/view3d data to handle collections/objects instantiation. Note that this is a temporary hack more than a proper fix, which would require a deeper redesign of drag&drop code. Also note that this will not handle 'properly' (i.e. as user would expect it) cases like implicitely appended parent objects, in that only the explicitely appended object will be dropped to the nes location, the others will remain at their original coordinates. Differential Revision: https://developer.blender.org/D12696
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r--source/blender/windowmanager/WM_types.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index df6dc3af3cb..d0690cfd738 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -944,6 +944,13 @@ typedef struct wmDragAsset {
const char *path;
int id_type;
int import_type; /* eFileAssetImportType */
+
+ /* FIXME: This is temporary evil solution to get scene/viewlayer/etc in the copy callback of the
+ * #wmDropBox.
+ * TODO: Handle link/append in operator called at the end of the drop process, and NOT in its
+ * copy callback.
+ * */
+ struct bContext *evil_C;
} wmDragAsset;
typedef char *(*WMDropboxTooltipFunc)(struct bContext *,