fix [#27178] Material links lost when making mesh data local
authorCampbell Barton <ideasman42@gmail.com>
Tue, 26 Apr 2011 07:17:21 +0000 (07:17 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 26 Apr 2011 07:17:21 +0000 (07:17 +0000)
commite4cc1c3f2c3e5a85fbf4f7f2757b09544dd556ee
tree1d134f4085ba2d90e854c47848c6fc82704667bb
parent461a7c5c8185d0504c63ddc8de0b2c765e72be4b
fix [#27178] Material links lost when making mesh data local
- making local object data - Curve/Mesh/MBall lost references to linked materials.
- joining a linked mesh object into a local one lost the link.

As well as these reported bugs, checked all local functions for consistency/correctness and found other cases which would also fail.
- making local metaball didn't ensure unique ID name.
- make_local_armature() was missing check for object users - main body of code would never run.
- local particles didn't set the dupli-group or textures to extern.

checked all local functions for consistency/correctness.
16 files changed:
source/blender/blenkernel/BKE_material.h
source/blender/blenkernel/BKE_mesh.h
source/blender/blenkernel/BKE_object.h
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/lattice.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/mball.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/texture.c
source/blender/blenkernel/intern/world.c
source/blender/editors/mesh/meshtools.c