Fix #35969: blender internal and cycles not updating mesh while in edit mode.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 8 Jul 2013 22:41:14 +0000 (22:41 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 8 Jul 2013 22:41:14 +0000 (22:41 +0000)
Patch for blender internal made by Campbell.

intern/cycles/blender/blender_mesh.cpp
source/blender/editors/render/render_internal.c

index d628fa04f92170fb8ec772f39e26187fff25a485..90278f215c03cf524487100a07149de959b16a3d 100644 (file)
@@ -462,6 +462,9 @@ Mesh *BlenderSync::sync_mesh(BL::Object b_ob, bool object_updated, bool hide_tri
        mesh->name = ustring(b_ob_data.name().c_str());
 
        if(render_layer.use_surfaces || render_layer.use_hair) {
+               if(preview)
+                       b_ob.update_from_editmode();
+
                BL::Mesh b_mesh = object_to_mesh(b_data, b_ob, b_scene, true, !preview, need_undeformed);
 
                if(b_mesh) {
index 15aa67feefa4c0ea755128acfd9a826a740931d5..7a2ece66ba4e6d601a96f332884f2c676dc62dfa 100644 (file)
@@ -982,8 +982,13 @@ static bool render_view3d_flag_changed(RenderEngine *engine, const bContext *C)
        if (engine->update_flag & RE_ENGINE_UPDATE_OTHER)
                job_update_flag |= PR_UPDATE_MATERIAL;
        
-       if (engine->update_flag & RE_ENGINE_UPDATE_DATABASE)
+       if (engine->update_flag & RE_ENGINE_UPDATE_DATABASE) {
                job_update_flag |= PR_UPDATE_DATABASE;
+
+               /* load editmesh */
+               if (scene->obedit)
+                       ED_object_editmode_load(scene->obedit);
+       }
        
        engine->update_flag = 0;