bugfix [#28111] material.pop breaks mt->mat_nr
authorDalai Felinto <dfelinto@gmail.com>
Sun, 31 Jul 2011 11:12:38 +0000 (11:12 +0000)
committerDalai Felinto <dfelinto@gmail.com>
Sun, 31 Jul 2011 11:12:38 +0000 (11:12 +0000)
commit432bd158fbdb9d56f9499dcc0e465f4e148abbf3
tree3147ff78468de6abea93493eff1fc320b0c65ef3
parentf4a1dc4c8dd353aa614bc7c00846e5076ddc2dc2
bugfix [#28111] material.pop breaks mt->mat_nr

create a new parameter for materials.pop() to not remove material slot.
this way the mat_nr is still the old one.

for the default behaviour we now have material remapping (i.e. data_delete_material_index_id(id, index)).
This new function is brought from the material_slot remove function.
source/blender/blenkernel/BKE_material.h
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/mesh.c
source/blender/makesrna/intern/rna_ID.c