Revision: 35975
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35975
Author:   blendix
Date:     2011-04-03 16:11:21 +0000 (Sun, 03 Apr 2011)
Log Message:
-----------
Add material slot now adds no material in the new slot.

It's obviously much better than the two previous behaviors, since you don't
get confusing linked materials, and you don't have useless added materials.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/material.c

Modified: trunk/blender/source/blender/blenkernel/intern/material.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/material.c   2011-04-03 
13:17:07 UTC (rev 35974)
+++ trunk/blender/source/blender/blenkernel/intern/material.c   2011-04-03 
16:11:21 UTC (rev 35975)
@@ -785,21 +785,10 @@
 
 int object_add_material_slot(Object *ob)
 {
-       Material *ma;
-       
        if(ob==NULL) return FALSE;
        if(ob->totcol>=MAXMAT) return FALSE;
        
-       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);
+       assign_material(ob, NULL, ob->totcol+1);
        ob->actcol= ob->totcol;
        return TRUE;
 }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to