[Bf-blender-cvs] [b801e86f8b6] master: Append: Reuse local data: remove limitation on directly selected data.

Bastien Montagne noreply at git.blender.org
Thu Sep 23 11:17:28 CEST 2021


Commit: b801e86f8b6719cd902707a95dbf0dd1576e061b
Author: Bastien Montagne
Date:   Thu Sep 23 11:15:58 2021 +0200
Branches: master
https://developer.blender.org/rBb801e86f8b6719cd902707a95dbf0dd1576e061b

Append: Reuse local data: remove limitation on directly selected data.

in asset context, when user drag & drop a material several time, they
would still expect to re-use existing one instead of getting new copies
of it, even if this material is directly appended (and not an indirect
dependency of an object e.g.).

===================================================================

M	source/blender/windowmanager/intern/wm_files_link.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_files_link.c b/source/blender/windowmanager/intern/wm_files_link.c
index 820a5990479..aa23f3523d3 100644
--- a/source/blender/windowmanager/intern/wm_files_link.c
+++ b/source/blender/windowmanager/intern/wm_files_link.c
@@ -674,10 +674,7 @@ static void wm_append_do(WMLinkAppendData *lapp_data,
       CLOG_INFO(&LOG, 3, "Appended ID '%s' is proxified, keeping it linked...", id->name);
       item->append_action = WM_APPEND_ACT_KEEP_LINKED;
     }
-    /* Only re-use existing local ID for indirectly linked data, the ID explicitly selected by the
-     * user we always fully append. */
-    else if (do_reuse_existing_id && existing_local_id != NULL &&
-             (item->append_tag & WM_APPEND_TAG_INDIRECT) != 0) {
+    else if (do_reuse_existing_id && existing_local_id != NULL) {
       CLOG_INFO(&LOG, 3, "Appended ID '%s' as a matching local one, re-using it...", id->name);
       item->append_action = WM_APPEND_ACT_REUSE_LOCAL;
       item->customdata = existing_local_id;



More information about the Bf-blender-cvs mailing list