Fix #30770: missing node editor redraw when changing active material by clicking
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 2 Apr 2012 11:51:36 +0000 (11:51 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 2 Apr 2012 11:51:36 +0000 (11:51 +0000)
on face in edit mode.

source/blender/editors/mesh/editmesh_select.c

index 51449f846d5d597944539fc158b669aa5cacbd68..57041e967e9f667f7f0c50515ec1f71d37076640 100644 (file)
@@ -1499,12 +1499,13 @@ int mouse_mesh(bContext *C, const int mval[2], short extend)
                
                EDBM_selectmode_flush(vc.em);
                  
-//             if (EM_texFaceCheck()) {
-
+               /* change active material on object */
                if (efa && efa->mat_nr != vc.obedit->actcol - 1) {
                        vc.obedit->actcol = efa->mat_nr + 1;
                        vc.em->mat_nr = efa->mat_nr;
-//                     BIF_preview_changed(ID_MA);
+
+                       WM_event_add_notifier(C, NC_MATERIAL|ND_SHADING, NULL);
+
                }
 
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit);