[Bf-blender-cvs] [18ace3b541e] master: Fix linked objects not appearing after dragging in from Asset Browser
Julian Eisel
noreply at git.blender.org
Tue Oct 26 20:32:19 CEST 2021
Commit: 18ace3b541eec120ad75fa7bbbaa15d9fb9b6c12
Author: Julian Eisel
Date: Tue Oct 26 19:56:53 2021 +0200
Branches: master
https://developer.blender.org/rB18ace3b541eec120ad75fa7bbbaa15d9fb9b6c12
Fix linked objects not appearing after dragging in from Asset Browser
When the Asset Browser import type was set to "Link", after dragging in an
object asset the object wouldn't actually appear in the viewport. Do the same
depsgraph tagging (and TODO comment) as the `OBJECT_OT_add_named` operator,
which does similar things.
===================================================================
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 92a5efa2268..559e11e96a1 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -85,6 +85,7 @@
#endif
#include "DEG_depsgraph.h"
+#include "DEG_depsgraph_build.h"
#include "view3d_intern.h" /* own include */
@@ -747,6 +748,8 @@ static void view3d_ob_drop_copy_external_asset(wmDrag *drag, wmDropBox *drop)
ID *id = WM_drag_asset_id_import(asset_drag, FILE_AUTOSELECT);
+ /* TODO(sergey): Only update relations for the current scene. */
+ DEG_relations_tag_update(CTX_data_main(C));
WM_event_add_notifier(C, NC_SCENE | ND_LAYER_CONTENT, scene);
RNA_string_set(drop->ptr, "name", id->name + 2);
More information about the Bf-blender-cvs
mailing list