Commit: 9aefe0871115bba491638fa53ab11226d5b24a64
Author: Sergey Sharybin
Date:   Tue Jan 27 22:40:55 2015 +0500
Branches: master
https://developer.blender.org/rB9aefe0871115bba491638fa53ab11226d5b24a64

Fix T43398: Viewport "Renderend" ist not updated when a material is assigned to 
a face

The issues goes back to eb016eb and now it becomes clear object could be tagged 
for
update from the edit mode as well.

===================================================================

M       source/blender/blenkernel/intern/scene.c
M       source/blender/makesdna/DNA_ID.h

===================================================================

diff --git a/source/blender/blenkernel/intern/scene.c 
b/source/blender/blenkernel/intern/scene.c
index 8f479d4..f94f7cd 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1642,9 +1642,9 @@ static void prepare_mesh_for_viewport_render(Main *bmain, 
Scene *scene)
        Object *obedit = scene->obedit;
        if (obedit) {
                Mesh *mesh = obedit->data;
-               /* TODO(sergey): Check object recalc flags as well? */
                if ((obedit->type == OB_MESH) &&
-                   (mesh->id.flag & (LIB_ID_RECALC | LIB_ID_RECALC_DATA)))
+                   ((obedit->id.flag & LIB_ID_RECALC_ALL) ||
+                    (mesh->id.flag & LIB_ID_RECALC_ALL)))
                {
                        if (check_rendered_viewport_visible(bmain)) {
                                BMesh *bm = mesh->edit_btmesh->bm;
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index c00435f..b51b53c 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -270,6 +270,8 @@ enum {
        LIB_ID_RECALC       = 1 << 12,
        LIB_ID_RECALC_DATA  = 1 << 13,
        LIB_ANIM_NO_RECALC  = 1 << 14,
+
+       LIB_ID_RECALC_ALL   = (LIB_ID_RECALC|LIB_ID_RECALC_DATA),
 };
 
 #ifdef __cplusplus

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to