Merge branch 'master' into blender2.8
[blender.git] / source / blender / blenkernel / intern / library_remap.c
index f855de0dac5f21cec0cd2142d9c06c6bbaa3e572..a260dffea2f2d16cd7caccdd7fabf0358a0dc571 100644 (file)
@@ -447,6 +447,7 @@ ATTR_NONNULL(1) static void libblock_remap_data(
        IDRemap id_remap_data;
        ListBase *lb_array[MAX_LIBARRAY];
        int i;
+       const int foreach_id_flags = (remap_flags & ID_REMAP_NO_INDIRECT_PROXY_DATA_USAGE) != 0 ? IDWALK_NO_INDIRECT_PROXY_DATA_USAGE : IDWALK_NOP;
 
        if (r_id_remap_data == NULL) {
                r_id_remap_data = &id_remap_data;
@@ -467,7 +468,7 @@ ATTR_NONNULL(1) static void libblock_remap_data(
 #endif
                r_id_remap_data->id = id;
                libblock_remap_data_preprocess(r_id_remap_data);
-               BKE_library_foreach_ID_link(NULL, id, foreach_libblock_remap_callback, (void *)r_id_remap_data, IDWALK_NOP);
+               BKE_library_foreach_ID_link(NULL, id, foreach_libblock_remap_callback, (void *)r_id_remap_data, foreach_id_flags);
        }
        else {
                i = set_listbasepointers(bmain, lb_array);
@@ -484,7 +485,7 @@ ATTR_NONNULL(1) static void libblock_remap_data(
                                        r_id_remap_data->id = id_curr;
                                        libblock_remap_data_preprocess(r_id_remap_data);
                                        BKE_library_foreach_ID_link(
-                                                   NULL, id_curr, foreach_libblock_remap_callback, (void *)r_id_remap_data, IDWALK_NOP);
+                                                   NULL, id_curr, foreach_libblock_remap_callback, (void *)r_id_remap_data, foreach_id_flags);
                                }
                        }
                }