Cycles: fix missing node editor redraw when assiging/removing materials.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 16 Oct 2011 16:53:24 +0000 (16:53 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 16 Oct 2011 16:53:24 +0000 (16:53 +0000)
source/blender/editors/space_node/space_node.c

index dc3ef9f..a17b58a 100644 (file)
@@ -216,6 +216,12 @@ static void node_area_listener(ScrArea *sa, wmNotifier *wmn)
                                        ED_area_tag_refresh(sa);
                        }
                        break;
+               case NC_OBJECT:
+                       if(type==NTREE_SHADER) {
+                               if(wmn->data==ND_OB_SHADING)
+                                       ED_area_tag_refresh(sa);
+                       }
+                       break;
                case NC_TEXT:
                        /* pynodes */
                        if(wmn->data==ND_SHADING)
@@ -436,6 +442,10 @@ static void node_region_listener(ARegion *ar, wmNotifier *wmn)
                case NC_NODE:
                        ED_region_tag_redraw(ar);
                        break;
+               case NC_OBJECT:
+                       if(wmn->data==ND_OB_SHADING)
+                               ED_region_tag_redraw(ar);
+                       break;
                case NC_ID:
                        if(wmn->action == NA_RENAME)
                                ED_region_tag_redraw(ar);