Todo item:
authorTon Roosendaal <ton@blender.org>
Sat, 19 Mar 2011 18:23:21 +0000 (18:23 +0000)
committerTon Roosendaal <ton@blender.org>
Sat, 19 Mar 2011 18:23:21 +0000 (18:23 +0000)
Improving UI visualization of using Material nodes:
- Property editor: the context top line now shows the linkage path
  (in material and texture view mode)
- Activating new material node refreshes preview in property editor
  when in texture mode.

This should make editing textures with node materials a bit more clear.

source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_buttons/space_buttons.c

index 9e07ccd8c685a2e6edceda65d5049b07a630bb7e..f91e830d52e061f917c3fc61fea70c5a38f5bc46 100644 (file)
@@ -236,6 +236,12 @@ static int buttons_context_path_material(ButsContextPath *path)
                        ma= give_current_material(ob, ob->actcol);
                        RNA_id_pointer_create(&ma->id, &path->ptr[path->len]);
                        path->len++;
+                       
+                       ma= give_node_material(ma);
+                       if(ma) {
+                               RNA_id_pointer_create(&ma->id, &path->ptr[path->len]);
+                               path->len++;
+                       }                       
                        return 1;
                }
        }
index 8df1f2187674cd0922016360a970874da198b6ba..a808e9885c41c31383826ed5002c9a59290dfd21 100644 (file)
@@ -356,8 +356,12 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
                        }
                        break;
                case NC_NODE:
-                       if(wmn->action==NA_SELECTED)
+                       if(wmn->action==NA_SELECTED) {
                                ED_area_tag_redraw(sa);
+                               /* new active node, update texture preview */
+                               if(sbuts->mainb == BCONTEXT_TEXTURE)
+                                       sbuts->preview= 1;
+                       }
                        break;
                /* Listener for preview render, when doing an global undo. */
                case NC_WINDOW: