diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-10-05 15:55:54 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-10-05 15:55:54 +0400 |
commit | 629ddacd48d1cb4256f25620730ab870bbd7eb60 (patch) | |
tree | 79a4b97371f47310a59ed1a9aa70c2e91057746f /source/blender/editors | |
parent | 0eeeab515b6b46f907016091b3a89bf5e320c400 (diff) |
Fix #24135: Material modification not immediately updated in Outliner
Also fixed outliner update when changing active_material_index from Py and
when selecting texture from UI
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/render/render_shading.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/space_outliner.c | 12 |
3 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index debd13c8d99..71a46a16f98 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -263,6 +263,7 @@ static int material_slot_add_exec(bContext *C, wmOperator *op) object_add_material_slot(ob); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_OB_SHADING, ob); return OPERATOR_FINISHED; } @@ -290,6 +291,7 @@ static int material_slot_remove_exec(bContext *C, wmOperator *op) object_remove_material_slot(ob); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_OB_SHADING, ob); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index aaeab9e7843..b876aa11ab5 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -2050,7 +2050,9 @@ static int tree_element_active_texture(bContext *C, Scene *scene, SpaceOops *soo } } - WM_event_add_notifier(C, NC_TEXTURE, NULL); + if(set) + WM_event_add_notifier(C, NC_TEXTURE, NULL); + return 0; } diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index d91c8caa14c..f0f9ac945ef 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -116,6 +116,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn) case ND_BONE_ACTIVE: case ND_BONE_SELECT: case ND_PARENT: + case ND_OB_SHADING: ED_region_tag_redraw(ar); break; case ND_CONSTRAINT: @@ -150,6 +151,17 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn) if(wmn->action == NA_RENAME) ED_region_tag_redraw(ar); break; + case NC_MATERIAL: + switch(wmn->data) { + case ND_SHADING: + case ND_SHADING_DRAW: + ED_region_tag_redraw(ar); + break; + } + break; + case NC_TEXTURE: + ED_region_tag_redraw(ar); + break; } } |