was setting the active material on exit editmode rather then enter
authorCampbell Barton <ideasman42@gmail.com>
Thu, 5 Nov 2009 14:54:02 +0000 (14:54 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 5 Nov 2009 14:54:02 +0000 (14:54 +0000)
source/blender/editors/mesh/editmesh.c

index 8b9de0f6348532635e6e10d21f1bc218582bccb0..81d565a9ba438ff4ff017757c82d812adac46cc9 100644 (file)
@@ -777,6 +777,9 @@ void make_editMesh(Scene *scene, Object *ob)
                return;
        }
        
+       if(ob->actcol > 0)
+               em->mat_nr= ob->actcol-1;
+
        /* initialize fastmalloc for editmesh */
        init_editmesh_fastmalloc(em, me->totvert, me->totedge, me->totface);
 
@@ -990,8 +993,6 @@ void load_editMesh(Scene *scene, Object *ob)
        CustomData_add_layer(&me->fdata, CD_MFACE, CD_ASSIGN, mface, me->totface);
        mesh_update_customdata_pointers(me);
 
-       em->mat_nr= ob->actcol-1;
-
        /* the vertices, use ->tmp.l as counter */
        eve= em->verts.first;
        a= 0;