Material slots: on adding a new one, the material datablock is now copied again
like in 2.4x. This can result in material datablocks you don't need, but not doing it seems to cause too much confusion.
This commit is contained in:
@@ -786,6 +786,13 @@ int object_add_material_slot(Object *ob)
|
||||
|
||||
ma= give_current_material(ob, ob->actcol);
|
||||
|
||||
if(ma == NULL)
|
||||
ma= add_material("Material");
|
||||
else
|
||||
ma= copy_material(ma);
|
||||
|
||||
id_us_min(&ma->id);
|
||||
|
||||
assign_material(ob, ma, ob->totcol+1);
|
||||
ob->actcol= ob->totcol;
|
||||
return TRUE;
|
||||
|
||||
Reference in New Issue
Block a user