Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-06-25 02:41:33 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-06-25 02:41:33 +0400
commit02fbfa5c70732e691606546ecce60fdfe3f80d9f (patch)
tree9c5e5be02ae4b87b52642d77f264ce1f76d48e41 /source/blender/makesrna/intern/rna_material.c
parent8390aa5181d3dd9c8458fa68c2add910c1cd12e9 (diff)
Fix unnecessary 3D viewport redraws in various cases, in particular when editing
node materials. Area and region listener callbacks now get the screen and area pointers passed, so they can do more fine grained checks to see if redraw is really needed, for example depending on the 3D view drawtype.
Diffstat (limited to 'source/blender/makesrna/intern/rna_material.c')
-rw-r--r--source/blender/makesrna/intern/rna_material.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 8936609c7db..fceb4e0a4d4 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -97,14 +97,7 @@ static void rna_Material_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *p
Material *ma = ptr->id.data;
DAG_id_tag_update(&ma->id, 0);
- if (scene) { /* can be NULL, see [#30025] */
- if (scene->gm.matmode == GAME_MAT_GLSL) {
- WM_main_add_notifier(NC_MATERIAL | ND_SHADING_DRAW, ma);
- }
- else {
- WM_main_add_notifier(NC_MATERIAL | ND_SHADING, ma);
- }
- }
+ WM_main_add_notifier(NC_MATERIAL | ND_SHADING, ma);
}
static void rna_Material_update_previews(Main *bmain, Scene *scene, PointerRNA *ptr)
@@ -114,10 +107,9 @@ static void rna_Material_update_previews(Main *bmain, Scene *scene, PointerRNA *
if (ma->nodetree)
BKE_node_preview_clear_tree(ma->nodetree);
- WM_main_add_notifier(NC_MATERIAL | ND_SHADING, ma);
+ WM_main_add_notifier(NC_MATERIAL | ND_SHADING_PREVIEW, ma);
}
-
static void rna_Material_draw_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
{
Material *ma = ptr->id.data;