diff options
author | Ton Roosendaal <ton@blender.org> | 2011-03-19 21:23:21 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-03-19 21:23:21 +0300 |
commit | 647f4246da908dd46cb618bebc9e8682dea8c7bc (patch) | |
tree | 9e7dd0d68d4e3d32e9aee30c87b9291aae58dffe /source/blender/editors/space_buttons | |
parent | 5179a0c4775c82f8a94f20a5d9f9dc4dba60edbc (diff) |
Todo item:
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.
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/space_buttons.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 9e07ccd8c68..f91e830d52e 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -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; } } diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index 8df1f218767..a808e9885c4 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -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: |