diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-05-22 20:42:41 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-05-22 21:01:15 +0300 |
commit | 062ee07b7ffa810729cfeaad585925ec960627b8 (patch) | |
tree | 6005c32211219fa5f50bc5476cd19da3081a61d5 /intern/cycles | |
parent | 78a26f28aa50e96ad8db6b70db5e67a33b3acde1 (diff) |
Fix some Cycles modifier stack issues with copy-on-write.
There's still many problems, but this avoids modifiers being applied twice,
subsurf render levels not being respected and hair render crashing.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/blender/blender_mesh.cpp | 4 | ||||
-rw-r--r-- | intern/cycles/blender/blender_util.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp index 1e1e0db6c62..03d24c04e2a 100644 --- a/intern/cycles/blender/blender_mesh.cpp +++ b/intern/cycles/blender/blender_mesh.cpp @@ -1189,7 +1189,7 @@ Mesh *BlenderSync::sync_mesh(BL::Depsgraph& b_depsgraph, BL::Mesh b_mesh = object_to_mesh(b_data, b_ob, b_depsgraph, - true, + false, need_undeformed, mesh->subdivision_type); @@ -1277,7 +1277,7 @@ void BlenderSync::sync_mesh_motion(BL::Depsgraph& b_depsgraph, b_mesh = object_to_mesh(b_data, b_ob, b_depsgraph, - true, + false, false, Mesh::SUBDIVISION_NONE); } diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h index 3eb09cbe3c0..a8379914b83 100644 --- a/intern/cycles/blender/blender_util.h +++ b/intern/cycles/blender/blender_util.h @@ -53,6 +53,7 @@ static inline BL::Mesh object_to_mesh(BL::BlendData& data, bool subsurf_mod_show_render = false; bool subsurf_mod_show_viewport = false; + /* TODO: make this work with copy-on-write, modifiers are already evaluated. */ if(subdivision_type != Mesh::SUBDIVISION_NONE) { BL::Modifier subsurf_mod = object.modifiers[object.modifiers.length()-1]; |