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 <montagne29@wanadoo.fr>2016-07-14 14:03:22 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-07-14 19:33:12 +0300
commitf87603662d03bf908094ed7a7f002a07bf13be38 (patch)
tree0c16ff1a26bd3ceffd4a9cbf7044c77b19797f24 /source/blender
parentf2509e764e3be417c6a400e56be75dce9b6acde5 (diff)
Add option to id_make_local to force localization of datablock, even if not used locally.
Will be used by link/append code.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_action.h2
-rw-r--r--source/blender/blenkernel/BKE_armature.h2
-rw-r--r--source/blender/blenkernel/BKE_brush.h2
-rw-r--r--source/blender/blenkernel/BKE_camera.h2
-rw-r--r--source/blender/blenkernel/BKE_curve.h2
-rw-r--r--source/blender/blenkernel/BKE_image.h2
-rw-r--r--source/blender/blenkernel/BKE_key.h2
-rw-r--r--source/blender/blenkernel/BKE_lamp.h2
-rw-r--r--source/blender/blenkernel/BKE_lattice.h2
-rw-r--r--source/blender/blenkernel/BKE_library.h2
-rw-r--r--source/blender/blenkernel/BKE_material.h2
-rw-r--r--source/blender/blenkernel/BKE_mball.h2
-rw-r--r--source/blender/blenkernel/BKE_mesh.h2
-rw-r--r--source/blender/blenkernel/BKE_node.h2
-rw-r--r--source/blender/blenkernel/BKE_object.h2
-rw-r--r--source/blender/blenkernel/BKE_particle.h2
-rw-r--r--source/blender/blenkernel/BKE_speaker.h2
-rw-r--r--source/blender/blenkernel/BKE_texture.h2
-rw-r--r--source/blender/blenkernel/BKE_world.h2
-rw-r--r--source/blender/blenkernel/intern/action.c6
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c10
-rw-r--r--source/blender/blenkernel/intern/armature.c6
-rw-r--r--source/blender/blenkernel/intern/brush.c8
-rw-r--r--source/blender/blenkernel/intern/camera.c6
-rw-r--r--source/blender/blenkernel/intern/curve.c8
-rw-r--r--source/blender/blenkernel/intern/image.c6
-rw-r--r--source/blender/blenkernel/intern/key.c2
-rw-r--r--source/blender/blenkernel/intern/lamp.c6
-rw-r--r--source/blender/blenkernel/intern/lattice.c8
-rw-r--r--source/blender/blenkernel/intern/library.c40
-rw-r--r--source/blender/blenkernel/intern/material.c6
-rw-r--r--source/blender/blenkernel/intern/mball.c6
-rw-r--r--source/blender/blenkernel/intern/mesh.c8
-rw-r--r--source/blender/blenkernel/intern/node.c6
-rw-r--r--source/blender/blenkernel/intern/object.c6
-rw-r--r--source/blender/blenkernel/intern/particle.c6
-rw-r--r--source/blender/blenkernel/intern/speaker.c6
-rw-r--r--source/blender/blenkernel/intern/texture.c6
-rw-r--r--source/blender/blenkernel/intern/world.c6
-rw-r--r--source/blender/editors/interface/interface_templates.c4
-rw-r--r--source/blender/editors/object/object_relations.c12
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c2
42 files changed, 109 insertions, 109 deletions
diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h
index 5874f95502b..ac9b0b6fb10 100644
--- a/source/blender/blenkernel/BKE_action.h
+++ b/source/blender/blenkernel/BKE_action.h
@@ -63,7 +63,7 @@ struct bAction *BKE_action_copy(struct Main *bmain, struct bAction *src);
/* Deallocate all of the Action's data, but not the Action itself */
void BKE_action_free(struct bAction *act);
-void BKE_action_make_local(struct Main *bmain, struct bAction *act);
+void BKE_action_make_local(struct Main *bmain, struct bAction *act, const bool force_local);
/* Action API ----------------- */
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h
index 326c335338f..bfd4a7e3dd8 100644
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@ -76,7 +76,7 @@ struct bArmature *BKE_armature_from_object(struct Object *ob);
int BKE_armature_bonelist_count(struct ListBase *lb);
void BKE_armature_bonelist_free(struct ListBase *lb);
void BKE_armature_free(struct bArmature *arm);
-void BKE_armature_make_local(struct Main *bmain, struct bArmature *arm);
+void BKE_armature_make_local(struct Main *bmain, struct bArmature *arm, const bool force_local);
struct bArmature *BKE_armature_copy(struct Main *bmain, struct bArmature *arm);
/* Bounding box. */
diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h
index c7116bf2ef6..4be4d95490b 100644
--- a/source/blender/blenkernel/BKE_brush.h
+++ b/source/blender/blenkernel/BKE_brush.h
@@ -45,7 +45,7 @@ void BKE_brush_init(struct Brush *brush);
struct Brush *BKE_brush_add(struct Main *bmain, const char *name, short ob_mode);
struct Brush *BKE_brush_first_search(struct Main *bmain, short ob_mode);
struct Brush *BKE_brush_copy(struct Main *bmain, struct Brush *brush);
-void BKE_brush_make_local(struct Main *bmain, struct Brush *brush);
+void BKE_brush_make_local(struct Main *bmain, struct Brush *brush, const bool force_local);
void BKE_brush_unlink(struct Main *bmain, struct Brush *brush);
void BKE_brush_free(struct Brush *brush);
diff --git a/source/blender/blenkernel/BKE_camera.h b/source/blender/blenkernel/BKE_camera.h
index 97f4b30894b..3ae0e0e1111 100644
--- a/source/blender/blenkernel/BKE_camera.h
+++ b/source/blender/blenkernel/BKE_camera.h
@@ -53,7 +53,7 @@ struct GPUFXSettings;
void BKE_camera_init(struct Camera *cam);
void *BKE_camera_add(struct Main *bmain, const char *name);
struct Camera *BKE_camera_copy(struct Main *bmain, struct Camera *cam);
-void BKE_camera_make_local(struct Main *bmain, struct Camera *cam);
+void BKE_camera_make_local(struct Main *bmain, struct Camera *cam, const bool force_local);
void BKE_camera_free(struct Camera *ca);
/* Camera Usage */
diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h
index 89dbe246910..c2a0404e96e 100644
--- a/source/blender/blenkernel/BKE_curve.h
+++ b/source/blender/blenkernel/BKE_curve.h
@@ -71,7 +71,7 @@ void BKE_curve_editfont_free(struct Curve *cu);
void BKE_curve_init(struct Curve *cu);
struct Curve *BKE_curve_add(struct Main *bmain, const char *name, int type);
struct Curve *BKE_curve_copy(struct Main *bmain, struct Curve *cu);
-void BKE_curve_make_local(struct Main *bmain, struct Curve *cu);
+void BKE_curve_make_local(struct Main *bmain, struct Curve *cu, const bool force_local);
short BKE_curve_type_get(struct Curve *cu);
void BKE_curve_type_test(struct Object *ob);
void BKE_curve_curve_dimension_update(struct Curve *cu);
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h
index 0895feef983..db73b42d894 100644
--- a/source/blender/blenkernel/BKE_image.h
+++ b/source/blender/blenkernel/BKE_image.h
@@ -108,7 +108,7 @@ struct anim *openanim_noload(const char *name, int flags, int streamindex, char
void BKE_image_de_interlace(struct Image *ima, int odd);
-void BKE_image_make_local(struct Main *bmain, struct Image *ima);
+void BKE_image_make_local(struct Main *bmain, struct Image *ima, const bool force_local);
void BKE_image_tag_time(struct Image *ima);
diff --git a/source/blender/blenkernel/BKE_key.h b/source/blender/blenkernel/BKE_key.h
index f30f9eac4e8..b55915276b1 100644
--- a/source/blender/blenkernel/BKE_key.h
+++ b/source/blender/blenkernel/BKE_key.h
@@ -53,7 +53,7 @@ void BKE_key_free_nolib(struct Key *key);
struct Key *BKE_key_add(struct ID *id);
struct Key *BKE_key_copy(struct Main *bmain, struct Key *key);
struct Key *BKE_key_copy_nolib(struct Key *key);
-void BKE_key_make_local(struct Main *bmain, struct Key *key);
+void BKE_key_make_local(struct Main *bmain, struct Key *key, const bool force_local);
void BKE_key_sort(struct Key *key);
void key_curve_position_weights(float t, float data[4], int type);
diff --git a/source/blender/blenkernel/BKE_lamp.h b/source/blender/blenkernel/BKE_lamp.h
index 49b43550e67..dc977eabbb1 100644
--- a/source/blender/blenkernel/BKE_lamp.h
+++ b/source/blender/blenkernel/BKE_lamp.h
@@ -46,7 +46,7 @@ void BKE_lamp_init(struct Lamp *la);
struct Lamp *BKE_lamp_add(struct Main *bmain, const char *name) ATTR_WARN_UNUSED_RESULT;
struct Lamp *BKE_lamp_copy(struct Main *bmain, struct Lamp *la) ATTR_WARN_UNUSED_RESULT;
struct Lamp *localize_lamp(struct Lamp *la) ATTR_WARN_UNUSED_RESULT;
-void BKE_lamp_make_local(struct Main *bmain, struct Lamp *la);
+void BKE_lamp_make_local(struct Main *bmain, struct Lamp *la, const bool force_local);
void BKE_lamp_free(struct Lamp *la);
void lamp_drivers_update(struct Scene *scene, struct Lamp *la, float ctime);
diff --git a/source/blender/blenkernel/BKE_lattice.h b/source/blender/blenkernel/BKE_lattice.h
index 606df9dcec8..4f72bbecff4 100644
--- a/source/blender/blenkernel/BKE_lattice.h
+++ b/source/blender/blenkernel/BKE_lattice.h
@@ -49,7 +49,7 @@ void BKE_lattice_init(struct Lattice *lt);
struct Lattice *BKE_lattice_add(struct Main *bmain, const char *name);
struct Lattice *BKE_lattice_copy(struct Main *bmain, struct Lattice *lt);
void BKE_lattice_free(struct Lattice *lt);
-void BKE_lattice_make_local(struct Main *bmain, struct Lattice *lt);
+void BKE_lattice_make_local(struct Main *bmain, struct Lattice *lt, const bool force_local);
void calc_lat_fudu(int flag, int res, float *r_fu, float *r_du);
struct LatticeDeformData;
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h
index d419d257471..3e8ede638ca 100644
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@ -80,7 +80,7 @@ void id_us_min(struct ID *id);
void id_fake_user_set(struct ID *id);
void id_fake_user_clear(struct ID *id);
-bool id_make_local(struct Main *bmain, struct ID *id, bool test);
+bool id_make_local(struct Main *bmain, struct ID *id, const bool test, const bool force_local);
bool id_single_user(struct bContext *C, struct ID *id, struct PointerRNA *ptr, struct PropertyRNA *prop);
bool id_copy(struct Main *bmain, struct ID *id, struct ID **newid, bool test);
void id_sort_by_name(struct ListBase *lb, struct ID *id);
diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h
index 0bc54ee4a16..bbe104cd6ee 100644
--- a/source/blender/blenkernel/BKE_material.h
+++ b/source/blender/blenkernel/BKE_material.h
@@ -57,7 +57,7 @@ struct Material *BKE_material_add(struct Main *bmain, const char *name);
struct Material *BKE_material_copy(struct Main *bmain, struct Material *ma);
struct Material *localize_material(struct Material *ma);
struct Material *give_node_material(struct Material *ma); /* returns node material or self */
-void BKE_material_make_local(struct Main *bmain, struct Material *ma);
+void BKE_material_make_local(struct Main *bmain, struct Material *ma, const bool force_local);
/* UNUSED */
// void automatname(struct Material *);
diff --git a/source/blender/blenkernel/BKE_mball.h b/source/blender/blenkernel/BKE_mball.h
index 42704c1b2db..191e8721099 100644
--- a/source/blender/blenkernel/BKE_mball.h
+++ b/source/blender/blenkernel/BKE_mball.h
@@ -43,7 +43,7 @@ void BKE_mball_init(struct MetaBall *mb);
struct MetaBall *BKE_mball_add(struct Main *bmain, const char *name);
struct MetaBall *BKE_mball_copy(struct Main *bmain, struct MetaBall *mb);
-void BKE_mball_make_local(struct Main *bmain, struct MetaBall *mb);
+void BKE_mball_make_local(struct Main *bmain, struct MetaBall *mb, const bool force_local);
bool BKE_mball_is_basis_for(struct Object *ob1, struct Object *ob2);
bool BKE_mball_is_basis(struct Object *ob);
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index d3bb34d7a41..ef8d1c98318 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -91,7 +91,7 @@ struct Mesh *BKE_mesh_copy(struct Main *bmain, struct Mesh *me);
void BKE_mesh_update_customdata_pointers(struct Mesh *me, const bool do_ensure_tess_cd);
void BKE_mesh_ensure_skin_customdata(struct Mesh *me);
-void BKE_mesh_make_local(struct Main *bmain, struct Mesh *me);
+void BKE_mesh_make_local(struct Main *bmain, struct Mesh *me, const bool force_local);
void BKE_mesh_boundbox_calc(struct Mesh *me, float r_loc[3], float r_size[3]);
void BKE_mesh_texspace_calc(struct Mesh *me);
float (*BKE_mesh_orco_verts_get(struct Object *ob))[3];
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index b44cb226f0d..647b96fb9ae 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -346,7 +346,7 @@ void ntreeUserDecrefID(struct bNodeTree *ntree);
struct bNodeTree *ntreeFromID(struct ID *id);
-void ntreeMakeLocal(struct Main *bmain, struct bNodeTree *ntree, bool id_in_mainlist);
+void ntreeMakeLocal(struct Main *bmain, struct bNodeTree *ntree, bool id_in_mainlist, const bool force_local);
struct bNode *ntreeFindType(const struct bNodeTree *ntree, int type);
bool ntreeHasType(const struct bNodeTree *ntree, int type);
bool ntreeHasTree(const struct bNodeTree *ntree, const struct bNodeTree *lookup);
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index 09a6a716944..509524a7ce0 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -107,7 +107,7 @@ struct Object *BKE_object_lod_matob_get(struct Object *ob, struct Scene *scene);
struct Object *BKE_object_copy_ex(struct Main *bmain, struct Object *ob, bool copy_caches);
struct Object *BKE_object_copy(struct Main *bmain, struct Object *ob);
-void BKE_object_make_local(struct Main *bmain, struct Object *ob);
+void BKE_object_make_local(struct Main *bmain, struct Object *ob, const bool force_local);
bool BKE_object_is_libdata(struct Object *ob);
bool BKE_object_obdata_is_libdata(struct Object *ob);
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h
index 0b2e2383457..b22facd2394 100644
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@ -324,7 +324,7 @@ struct ModifierData *object_add_particle_system(struct Scene *scene, struct Obje
void object_remove_particle_system(struct Scene *scene, struct Object *ob);
struct ParticleSettings *psys_new_settings(const char *name, struct Main *main);
struct ParticleSettings *BKE_particlesettings_copy(struct Main *bmain, struct ParticleSettings *part);
-void BKE_particlesettings_make_local(struct Main *bmain, struct ParticleSettings *part);
+void BKE_particlesettings_make_local(struct Main *bmain, struct ParticleSettings *part, const bool force_local);
void psys_reset(struct ParticleSystem *psys, int mode);
diff --git a/source/blender/blenkernel/BKE_speaker.h b/source/blender/blenkernel/BKE_speaker.h
index 89b948a2126..fb730d95b92 100644
--- a/source/blender/blenkernel/BKE_speaker.h
+++ b/source/blender/blenkernel/BKE_speaker.h
@@ -34,7 +34,7 @@ struct Speaker;
void BKE_speaker_init(struct Speaker *spk);
void *BKE_speaker_add(struct Main *bmain, const char *name);
struct Speaker *BKE_speaker_copy(struct Main *bmain, struct Speaker *spk);
-void BKE_speaker_make_local(struct Main *bmain, struct Speaker *spk);
+void BKE_speaker_make_local(struct Main *bmain, struct Speaker *spk, const bool force_local);
void BKE_speaker_free(struct Speaker *spk);
#endif
diff --git a/source/blender/blenkernel/BKE_texture.h b/source/blender/blenkernel/BKE_texture.h
index 56f056c681a..eef02f63350 100644
--- a/source/blender/blenkernel/BKE_texture.h
+++ b/source/blender/blenkernel/BKE_texture.h
@@ -72,7 +72,7 @@ void BKE_texture_default(struct Tex *tex);
struct Tex *BKE_texture_copy(struct Main *bmain, struct Tex *tex);
struct Tex *BKE_texture_add(struct Main *bmain, const char *name);
struct Tex *BKE_texture_localize(struct Tex *tex);
-void BKE_texture_make_local(struct Main *bmain, struct Tex *tex);
+void BKE_texture_make_local(struct Main *bmain, struct Tex *tex, const bool force_local);
void BKE_texture_type_set(struct Tex *tex, int type);
void BKE_texture_mtex_default(struct MTex *mtex);
diff --git a/source/blender/blenkernel/BKE_world.h b/source/blender/blenkernel/BKE_world.h
index da5cca09b27..8b8dac4ab22 100644
--- a/source/blender/blenkernel/BKE_world.h
+++ b/source/blender/blenkernel/BKE_world.h
@@ -41,7 +41,7 @@ void BKE_world_init(struct World *wrld);
struct World *add_world(struct Main *bmian, const char *name);
struct World *BKE_world_copy(struct Main *bmain, struct World *wrld);
struct World *localize_world(struct World *wrld);
-void BKE_world_make_local(struct Main *bmain, struct World *wrld);
+void BKE_world_make_local(struct Main *bmain, struct World *wrld, const bool force_local);
#endif
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index f7ff1261c8a..fa49797126d 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -95,11 +95,11 @@ bAction *add_empty_action(Main *bmain, const char name[])
/* .................................. */
// does copy_fcurve...
-void BKE_action_make_local(Main *bmain, bAction *act)
+void BKE_action_make_local(Main *bmain, bAction *act, const bool force_local)
{
bool is_local = false, is_lib = false;
- /* - only lib users: do nothing
+ /* - only lib users: do nothing (unless force_local is set)
* - only local users: set flag
* - mixed: make copy
*/
@@ -110,7 +110,7 @@ void BKE_action_make_local(Main *bmain, bAction *act)
BKE_library_ID_test_usages(bmain, act, &is_local, &is_lib);
- if (is_local) {
+ if (force_local || is_local) {
if (!is_lib) {
id_clear_lib_data(bmain, &act->id);
BKE_id_expand_local(&act->id);
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index d6f93528262..d04b950c043 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -400,8 +400,8 @@ static void make_local_strips(ListBase *strips)
NlaStrip *strip;
for (strip = strips->first; strip; strip = strip->next) {
- if (strip->act) BKE_action_make_local(G.main, strip->act);
- if (strip->remap && strip->remap->target) BKE_action_make_local(G.main, strip->remap->target);
+ if (strip->act) BKE_action_make_local(G.main, strip->act, false);
+ if (strip->remap && strip->remap->target) BKE_action_make_local(G.main, strip->remap->target, false);
make_local_strips(&strip->strips);
}
@@ -413,10 +413,10 @@ void BKE_animdata_make_local(AnimData *adt)
NlaTrack *nlt;
/* Actions - Active and Temp */
- if (adt->action) BKE_action_make_local(G.main, adt->action);
- if (adt->tmpact) BKE_action_make_local(G.main, adt->tmpact);
+ if (adt->action) BKE_action_make_local(G.main, adt->action, false);
+ if (adt->tmpact) BKE_action_make_local(G.main, adt->tmpact, false);
/* Remaps */
- if (adt->remap && adt->remap->target) BKE_action_make_local(G.main, adt->remap->target);
+ if (adt->remap && adt->remap->target) BKE_action_make_local(G.main, adt->remap->target, false);
/* Drivers */
/* TODO: need to remap the ID-targets too? */
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 5f564e1c4d2..53e28177bdf 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -144,11 +144,11 @@ void BKE_armature_free(bArmature *arm)
}
}
-void BKE_armature_make_local(Main *bmain, bArmature *arm)
+void BKE_armature_make_local(Main *bmain, bArmature *arm, const bool force_local)
{
bool is_local = false, is_lib = false;
- /* - only lib users: do nothing
+ /* - only lib users: do nothing (unless force_local is set)
* - only local users: set flag
* - mixed: make copy
*/
@@ -159,7 +159,7 @@ void BKE_armature_make_local(Main *bmain, bArmature *arm)
BKE_library_ID_test_usages(bmain, arm, &is_local, &is_lib);
- if (is_local) {
+ if (force_local || is_local) {
if (!is_lib) {
id_clear_lib_data(bmain, &arm->id);
BKE_id_expand_local(&arm->id);
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 20621feac6c..3d9cabdc15d 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -219,11 +219,11 @@ void BKE_brush_free(Brush *brush)
BKE_previewimg_free(&(brush->preview));
}
-void BKE_brush_make_local(Main *bmain, Brush *brush)
+void BKE_brush_make_local(Main *bmain, Brush *brush, const bool force_local)
{
bool is_local = false, is_lib = false;
- /* - only lib users: do nothing
+ /* - only lib users: do nothing (unless force_local is set)
* - only local users: set flag
* - mixed: make copy
*/
@@ -234,12 +234,12 @@ void BKE_brush_make_local(Main *bmain, Brush *brush)
if (brush->clone.image) {
/* Special case: ima always local immediately. Clone image should only have one user anyway. */
- id_make_local(bmain, &brush->clone.image->id, false);
+ id_make_local(bmain, &brush->clone.image->id, false, false);
}
BKE_library_ID_test_usages(bmain, brush, &is_local, &is_lib);
- if (is_local) {
+ if (force_local || is_local) {
if (!is_lib) {
id_clear_lib_data(bmain, &brush->id);
BKE_id_expand_local(&brush->id);
diff --git a/source/blender/blenkernel/intern/camera.c b/source/blender/blenkernel/intern/camera.c
index ae7aac8b54f..cd085816b4d 100644
--- a/source/blender/blenkernel/intern/camera.c
+++ b/source/blender/blenkernel/intern/camera.c
@@ -107,11 +107,11 @@ Camera *BKE_camera_copy(Main *bmain, Camera *cam)
return camn;
}
-void BKE_camera_make_local(Main *bmain, Camera *cam)
+void BKE_camera_make_local(Main *bmain, Camera *cam, const bool force_local)
{
bool is_local = false, is_lib = false;
- /* - only lib users: do nothing
+ /* - only lib users: do nothing (unless force_local is set)
* - only local users: set flag
* - mixed: make copy
*/
@@ -122,7 +122,7 @@ void BKE_camera_make_local(Main *bmain, Camera *cam)
BKE_library_ID_test_usages(bmain, cam, &is_local, &is_lib);
- if (is_local) {
+ if (force_local || is_local) {
if (!is_lib) {
id_clear_lib_data(bmain, &cam->id);
BKE_id_expand_local(&cam->id);
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 0e634e21ea3..fa7dac5d432 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -215,11 +215,11 @@ Curve *BKE_curve_copy(Main *bmain, Curve *cu)
return cun;
}
-void BKE_curve_make_local(Main *bmain, Curve *cu)
+void BKE_curve_make_local(Main *bmain, Curve *cu, const bool force_local)
{
bool is_local = false, is_lib = false;
- /* - when there are only lib users: don't do
+ /* - only lib users: do nothing (unless force_local is set)
* - when there are only local users: set flag
* - mixed: do a copy
*/
@@ -230,11 +230,11 @@ void BKE_curve_make_local(Main *bmain, Curve *cu)
BKE_library_ID_test_usages(bmain, cu, &is_local, &is_lib);
- if (is_local) {
+ if (force_local || is_local) {
if (!is_lib) {
id_clear_lib_data(bmain, &cu->id);
if (cu->key) {
- BKE_key_make_local(bmain, cu->key);
+ BKE_key_make_local(bmain, cu->key, force_local);
}
BKE_id_expand_local(&cu->id);
}
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index f993c05e198..ae3163d388e 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -469,11 +469,11 @@ Image *BKE_image_copy(Main *bmain, Image *ima)
return nima;
}
-void BKE_image_make_local(Main *bmain, Image *ima)
+void BKE_image_make_local(Main *bmain, Image *ima, const bool force_local)
{
bool is_local = false, is_lib = false;
- /* - only lib users: do nothing
+ /* - only lib users: do nothing (unless force_local is set)
* - only local users: set flag
* - mixed: make copy
*/
@@ -484,7 +484,7 @@ void BKE_image_make_local(Main *bmain, Image *ima)
BKE_library_ID_test_usages(bmain, ima, &is_local, &is_lib);
- if (is_local) {
+ if (force_local || is_local) {
if (!is_lib) {
id_clear_lib_data(bmain, &ima->id);
BKE_id_expand_local(&ima->id);
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index e59facd3c39..c61aee704d2 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -203,7 +203,7 @@ Key *BKE_key_copy_nolib(Key *key)
return keyn;
}
-void BKE_key_make_local(Main *bmain, Key *key)
+void BKE_key_make_local(Main *bmain, Key *key, const bool UNUSED(force_local))
{
/* Note that here for now we simply just make it local...
* Sounds fishy behavior, but since skeys are not *real* IDs... */
diff --git a/source/blender/blenkernel/intern/lamp.c b/source/blender/blenkernel/intern/lamp.c
index 003b154a70b..c224b5ca0a7 100644
--- a/source/blender/blenkernel/intern/lamp.c
+++ b/source/blender/blenkernel/intern/lamp.c
@@ -172,11 +172,11 @@ Lamp *localize_lamp(Lamp *la)
return lan;
}
-void BKE_lamp_make_local(Main *bmain, Lamp *la)
+void BKE_lamp_make_local(Main *bmain, Lamp *la, const bool force_local)
{
bool is_local = false, is_lib = false;
- /* - only lib users: do nothing
+ /* - only lib users: do nothing (unless force_local is set)
* - only local users: set flag
* - mixed: make copy
*/
@@ -187,7 +187,7 @@ void BKE_lamp_make_local(Main *bmain, Lamp *la)
BKE_library_ID_test_usages(bmain, la, &is_local, &is_lib);
- if (is_local) {
+ if (force_local || is_local) {
if (!is_lib) {
id_clear_lib_data(bmain, &la->id);
BKE_id_expand_local(&la->id);
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index 67f49266efc..9d4f14110a2 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -330,11 +330,11 @@ void BKE_lattice_free(Lattice *lt)
}
-void BKE_lattice_make_local(Main *bmain, Lattice *lt)
+void BKE_lattice_make_local(Main *bmain, Lattice *lt, const bool force_local)
{
bool is_local = false, is_lib = false;
- /* - only lib users: do nothing
+ /* - only lib users: do nothing (unless force_local is set)
* - only local users: set flag
* - mixed: make copy
*/
@@ -345,11 +345,11 @@ void BKE_lattice_make_local(Main *bmain, Lattice *lt)
BKE_library_ID_test_usages(bmain, lt, &is_local, &is_lib);
- if (is_local) {
+ if (force_local || is_local) {
if (!is_lib) {
id_clear_lib_data(bmain, &lt->id);
if (lt->key) {
- BKE_key_make_local(bmain, lt->key);
+ BKE_key_make_local(bmain, lt->key, force_local);
}
BKE_id_expand_local(&lt->id);
}
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 869e02448ea..4680d481ff6 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -271,7 +271,7 @@ void BKE_id_expand_local(ID *id)
/* calls the appropriate make_local method for the block, unless test. Returns true
* if the block can be made local. */
-bool id_make_local(Main *bmain, ID *id, bool test)
+bool id_make_local(Main *bmain, ID *id, const bool test, const bool force_local)
{
if (id->tag & LIB_TAG_INDIRECT)
return false;
@@ -282,45 +282,45 @@ bool id_make_local(Main *bmain, ID *id, bool test)
case ID_LI:
return false; /* can't be linked */
case ID_OB:
- if (!test) BKE_object_make_local(bmain, (Object *)id);
+ if (!test) BKE_object_make_local(bmain, (Object *)id, force_local);
return true;
case ID_ME:
- if (!test) BKE_mesh_make_local(bmain, (Mesh *)id);
+ if (!test) BKE_mesh_make_local(bmain, (Mesh *)id, force_local);
return true;
case ID_CU:
- if (!test) BKE_curve_make_local(bmain, (Curve *)id);
+ if (!test) BKE_curve_make_local(bmain, (Curve *)id, force_local);
return true;
case ID_MB:
- if (!test) BKE_mball_make_local(bmain, (MetaBall *)id);
+ if (!test) BKE_mball_make_local(bmain, (MetaBall *)id, force_local);
return true;
case ID_MA:
- if (!test) BKE_material_make_local(bmain, (Material *)id);
+ if (!test) BKE_material_make_local(bmain, (Material *)id, force_local);
return true;
case ID_TE:
- if (!test) BKE_texture_make_local(bmain, (Tex *)id);
+ if (!test) BKE_texture_make_local(bmain, (Tex *)id, force_local);
return true;
case ID_IM:
- if (!test) BKE_image_make_local(bmain, (Image *)id);
+ if (!test) BKE_image_make_local(bmain, (Image *)id, force_local);
return true;
case ID_LT:
- if (!test) BKE_lattice_make_local(bmain, (Lattice *)id);
+ if (!test) BKE_lattice_make_local(bmain, (Lattice *)id, force_local);
return true;
case ID_LA:
- if (!test) BKE_lamp_make_local(bmain, (Lamp *)id);
+ if (!test) BKE_lamp_make_local(bmain, (Lamp *)id, force_local);
return true;
case ID_CA:
- if (!test) BKE_camera_make_local(bmain, (Camera *)id);
+ if (!test) BKE_camera_make_local(bmain, (Camera *)id, force_local);
return true;
case ID_SPK:
- if (!test) BKE_speaker_make_local(bmain, (Speaker *)id);
+ if (!test) BKE_speaker_make_local(bmain, (Speaker *)id, force_local);
return true;
case ID_IP:
return false; /* deprecated */
case ID_KE:
- if (!test) BKE_key_make_local(bmain, (Key *)id);
+ if (!test) BKE_key_make_local(bmain, (Key *)id, force_local);
return true;
case ID_WO:
- if (!test) BKE_world_make_local(bmain, (World *)id);
+ if (!test) BKE_world_make_local(bmain, (World *)id, force_local);
return true;
case ID_SCR:
return false; /* can't be linked */
@@ -333,19 +333,19 @@ bool id_make_local(Main *bmain, ID *id, bool test)
case ID_GR:
return false; /* not implemented */
case ID_AR:
- if (!test) BKE_armature_make_local(bmain, (bArmature *)id);
+ if (!test) BKE_armature_make_local(bmain, (bArmature *)id, force_local);
return true;
case ID_AC:
- if (!test) BKE_action_make_local(bmain, (bAction *)id);
+ if (!test) BKE_action_make_local(bmain, (bAction *)id, force_local);
return true;
case ID_NT:
- if (!test) ntreeMakeLocal(bmain, (bNodeTree *)id, true);
+ if (!test) ntreeMakeLocal(bmain, (bNodeTree *)id, true, force_local);
return true;
case ID_BR:
- if (!test) BKE_brush_make_local(bmain, (Brush *)id);
+ if (!test) BKE_brush_make_local(bmain, (Brush *)id, force_local);
return true;
case ID_PA:
- if (!test) BKE_particlesettings_make_local(bmain, (ParticleSettings *)id);
+ if (!test) BKE_particlesettings_make_local(bmain, (ParticleSettings *)id, force_local);
return true;
case ID_WM:
return false; /* can't be linked */
@@ -1487,7 +1487,7 @@ void id_clear_lib_data_ex(Main *bmain, ID *id, bool id_in_mainlist)
ntree = ntreeFromID(id);
if (ntree) {
- ntreeMakeLocal(bmain, ntree, false);
+ ntreeMakeLocal(bmain, ntree, false, false);
}
if (GS(id->name) == ID_OB) {
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 17811893c03..2ae369fdd1b 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -285,11 +285,11 @@ Material *localize_material(Material *ma)
return man;
}
-void BKE_material_make_local(Main *bmain, Material *ma)
+void BKE_material_make_local(Main *bmain, Material *ma, const bool force_local)
{
bool is_local = false, is_lib = false;
- /* - only lib users: do nothing
+ /* - only lib users: do nothing (unless force_local is set)
* - only local users: set flag
* - mixed: make copy
*/
@@ -300,7 +300,7 @@ void BKE_material_make_local(Main *bmain, Material *ma)
BKE_library_ID_test_usages(bmain, ma, &is_local, &is_lib);
- if (is_local) {
+ if (force_local || is_local) {
if (!is_lib) {
id_clear_lib_data(bmain, &ma->id);
BKE_id_expand_local(&ma->id);
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c
index 9a0a6e3540c..aeb38b3bd1d 100644
--- a/source/blender/blenkernel/intern/mball.c
+++ b/source/blender/blenkernel/intern/mball.c
@@ -127,11 +127,11 @@ MetaBall *BKE_mball_copy(Main *bmain, MetaBall *mb)
return mbn;
}
-void BKE_mball_make_local(Main *bmain, MetaBall *mb)
+void BKE_mball_make_local(Main *bmain, MetaBall *mb, const bool force_local)
{
bool is_local = false, is_lib = false;
- /* - only lib users: do nothing
+ /* - only lib users: do nothing (unless force_local is set)
* - only local users: set flag
* - mixed: make copy
*/
@@ -142,7 +142,7 @@ void BKE_mball_make_local(Main *bmain, MetaBall *mb)
BKE_library_ID_test_usages(bmain, mb, &is_local, &is_lib);
- if (is_local) {
+ if (force_local || is_local) {
if (!is_lib) {
id_clear_lib_data(bmain, &mb->id);
BKE_id_expand_local(&mb->id);
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 787b9905734..1dd22f4a32b 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -555,11 +555,11 @@ BMesh *BKE_mesh_to_bmesh(
return bm;
}
-void BKE_mesh_make_local(Main *bmain, Mesh *me)
+void BKE_mesh_make_local(Main *bmain, Mesh *me, const bool force_local)
{
bool is_local = false, is_lib = false;
- /* - only lib users: do nothing
+ /* - only lib users: do nothing (unless force_local is set)
* - only local users: set flag
* - mixed: make copy
*/
@@ -570,11 +570,11 @@ void BKE_mesh_make_local(Main *bmain, Mesh *me)
BKE_library_ID_test_usages(bmain, me, &is_local, &is_lib);
- if (is_local) {
+ if (force_local || is_local) {
if (!is_lib) {
id_clear_lib_data(bmain, &me->id);
if (me->key) {
- BKE_key_make_local(bmain, me->key);
+ BKE_key_make_local(bmain, me->key, force_local);
}
BKE_id_expand_local(&me->id);
}
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 296a00388c4..1058b22f96e 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -1951,11 +1951,11 @@ bNodeTree *ntreeFromID(ID *id)
}
}
-void ntreeMakeLocal(Main *bmain, bNodeTree *ntree, bool id_in_mainlist)
+void ntreeMakeLocal(Main *bmain, bNodeTree *ntree, bool id_in_mainlist, const bool force_local)
{
bool is_lib = false, is_local = false;
- /* - only lib users: do nothing
+ /* - only lib users: do nothing (unless force_local is set)
* - only local users: set flag
* - mixed: make copy
*/
@@ -1966,7 +1966,7 @@ void ntreeMakeLocal(Main *bmain, bNodeTree *ntree, bool id_in_mainlist)
BKE_library_ID_test_usages(bmain, ntree, &is_local, &is_lib);
- if (is_local) {
+ if (force_local || is_local) {
if (!is_lib) {
id_clear_lib_data_ex(bmain, (ID *)ntree, id_in_mainlist);
BKE_id_expand_local(&ntree->id);
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 30a193506a6..4bdcec51360 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1186,11 +1186,11 @@ Object *BKE_object_copy(Main *bmain, Object *ob)
return BKE_object_copy_ex(bmain, ob, false);
}
-void BKE_object_make_local(Main *bmain, Object *ob)
+void BKE_object_make_local(Main *bmain, Object *ob, const bool force_local)
{
bool is_local = false, is_lib = false;
- /* - only lib users: do nothing
+ /* - only lib users: do nothing (unless force_local is set)
* - only local users: set flag
* - mixed: make copy
*/
@@ -1201,7 +1201,7 @@ void BKE_object_make_local(Main *bmain, Object *ob)
BKE_library_ID_test_usages(bmain, ob, &is_local, &is_lib);
- if (is_local) {
+ if (force_local || is_local) {
if (!is_lib) {
id_clear_lib_data(bmain, &ob->id);
BKE_id_expand_local(&ob->id);
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 934c5b9ff06..2ff6c6c8b65 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -3343,11 +3343,11 @@ ParticleSettings *BKE_particlesettings_copy(Main *bmain, ParticleSettings *part)
return partn;
}
-void BKE_particlesettings_make_local(Main *bmain, ParticleSettings *part)
+void BKE_particlesettings_make_local(Main *bmain, ParticleSettings *part, const bool force_local)
{
bool is_local = false, is_lib = false;
- /* - only lib users: do nothing
+ /* - only lib users: do nothing (unless force_local is set)
* - only local users: set flag
* - mixed: make copy
*/
@@ -3358,7 +3358,7 @@ void BKE_particlesettings_make_local(Main *bmain, ParticleSettings *part)
BKE_library_ID_test_usages(bmain, part, &is_local, &is_lib);
- if (is_local) {
+ if (force_local || is_local) {
if (!is_lib) {
id_clear_lib_data(bmain, &part->id);
BKE_id_expand_local(&part->id);
diff --git a/source/blender/blenkernel/intern/speaker.c b/source/blender/blenkernel/intern/speaker.c
index a91d8657179..c027f3b38ca 100644
--- a/source/blender/blenkernel/intern/speaker.c
+++ b/source/blender/blenkernel/intern/speaker.c
@@ -85,11 +85,11 @@ Speaker *BKE_speaker_copy(Main *bmain, Speaker *spk)
return spkn;
}
-void BKE_speaker_make_local(Main *bmain, Speaker *spk)
+void BKE_speaker_make_local(Main *bmain, Speaker *spk, const bool force_local)
{
bool is_local = false, is_lib = false;
- /* - only lib users: do nothing
+ /* - only lib users: do nothing (unless force_local is set)
* - only local users: set flag
* - mixed: make copy
*/
@@ -100,7 +100,7 @@ void BKE_speaker_make_local(Main *bmain, Speaker *spk)
BKE_library_ID_test_usages(bmain, spk, &is_local, &is_lib);
- if (is_local) {
+ if (force_local || is_local) {
if (!is_lib) {
id_clear_lib_data(bmain, &spk->id);
BKE_id_expand_local(&spk->id);
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index e34d632f2ca..460417cc2c0 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -918,11 +918,11 @@ Tex *BKE_texture_localize(Tex *tex)
/* ------------------------------------------------------------------------- */
-void BKE_texture_make_local(Main *bmain, Tex *tex)
+void BKE_texture_make_local(Main *bmain, Tex *tex, const bool force_local)
{
bool is_local = false, is_lib = false;
- /* - only lib users: do nothing
+ /* - only lib users: do nothing (unless force_local is set)
* - only local users: set flag
* - mixed: make copy
*/
@@ -933,7 +933,7 @@ void BKE_texture_make_local(Main *bmain, Tex *tex)
BKE_library_ID_test_usages(bmain, tex, &is_local, &is_lib);
- if (is_local) {
+ if (force_local || is_local) {
if (!is_lib) {
id_clear_lib_data(bmain, &tex->id);
BKE_id_expand_local(&tex->id);
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c
index 9795a8174f8..277aeaa7e42 100644
--- a/source/blender/blenkernel/intern/world.c
+++ b/source/blender/blenkernel/intern/world.c
@@ -176,11 +176,11 @@ World *localize_world(World *wrld)
return wrldn;
}
-void BKE_world_make_local(Main *bmain, World *wrld)
+void BKE_world_make_local(Main *bmain, World *wrld, const bool force_local)
{
bool is_local = false, is_lib = false;
- /* - only lib users: do nothing
+ /* - only lib users: do nothing (unless force_local is set)
* - only local users: set flag
* - mixed: make copy
*/
@@ -191,7 +191,7 @@ void BKE_world_make_local(Main *bmain, World *wrld)
BKE_library_ID_test_usages(bmain, wrld, &is_local, &is_lib);
- if (is_local) {
+ if (force_local || is_local) {
if (!is_lib) {
id_clear_lib_data(bmain, &wrld->id);
BKE_id_expand_local(&wrld->id);
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index d91bd498225..aec4065adaf 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -302,7 +302,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
break;
case UI_ID_LOCAL:
if (id) {
- if (id_make_local(CTX_data_main(C), id, false)) {
+ if (id_make_local(CTX_data_main(C), id, false, false)) {
/* reassign to get get proper updates/notifiers */
idptr = RNA_property_pointer_get(&template->ptr, template->prop);
RNA_property_pointer_set(&template->ptr, template->prop, idptr);
@@ -455,7 +455,7 @@ static void template_ID(
else {
but = uiDefIconBut(block, UI_BTYPE_BUT, 0, ICON_LIBRARY_DATA_DIRECT, 0, 0, UI_UNIT_X, UI_UNIT_Y,
NULL, 0, 0, 0, 0, TIP_("Direct linked library datablock, click to make local"));
- if (!id_make_local(CTX_data_main(C), id, true /* test */) || (idfrom && idfrom->lib))
+ if (!id_make_local(CTX_data_main(C), id, true /* test */, false) || (idfrom && idfrom->lib))
UI_but_flag_enable(but, UI_BUT_DISABLED);
}
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 6b16e19f790..b3edf1f5e0d 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -2104,11 +2104,11 @@ static void make_local_makelocalmaterial(Material *ma)
AnimData *adt;
int b;
- id_make_local(G.main, &ma->id, false);
+ id_make_local(G.main, &ma->id, false, false);
for (b = 0; b < MAX_MTEX; b++)
if (ma->mtex[b] && ma->mtex[b]->tex)
- id_make_local(G.main, &ma->mtex[b]->tex->id, false);
+ id_make_local(G.main, &ma->mtex[b]->tex->id, false, false);
adt = BKE_animdata_from_id(&ma->id);
if (adt) BKE_animdata_make_local(adt);
@@ -2237,7 +2237,7 @@ static int make_local_exec(bContext *C, wmOperator *op)
}
if (ob->id.lib)
- id_make_local(bmain, &ob->id, false);
+ id_make_local(bmain, &ob->id, false, false);
}
CTX_DATA_END;
@@ -2259,7 +2259,7 @@ static int make_local_exec(bContext *C, wmOperator *op)
id = ob->data;
if (id && (ELEM(mode, MAKE_LOCAL_SELECT_OBDATA, MAKE_LOCAL_SELECT_OBDATA_MATERIAL))) {
- id_make_local(bmain, id, false);
+ id_make_local(bmain, id, false, false);
adt = BKE_animdata_from_id(id);
if (adt) BKE_animdata_make_local(adt);
@@ -2275,7 +2275,7 @@ static int make_local_exec(bContext *C, wmOperator *op)
}
for (psys = ob->particlesystem.first; psys; psys = psys->next)
- id_make_local(bmain, &psys->part->id, false);
+ id_make_local(bmain, &psys->part->id, false, false);
adt = BKE_animdata_from_id(&ob->id);
if (adt) BKE_animdata_make_local(adt);
@@ -2294,7 +2294,7 @@ static int make_local_exec(bContext *C, wmOperator *op)
for (b = 0; b < MAX_MTEX; b++)
if (la->mtex[b] && la->mtex[b]->tex)
- id_make_local(bmain, &la->mtex[b]->tex->id, false);
+ id_make_local(bmain, &la->mtex[b]->tex->id, false, false);
}
else {
for (a = 0; a < ob->totcol; a++) {
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index 253e8180c3d..111e60e5159 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -439,7 +439,7 @@ static void id_local_cb(
Main *bmain = CTX_data_main(C);
/* if the ID type has no special local function,
* just clear the lib */
- if (id_make_local(bmain, tselem->id, false) == false) {
+ if (id_make_local(bmain, tselem->id, false, false) == false) {
id_clear_lib_data(bmain, tselem->id);
}
}