[Bf-blender-cvs] [6fd5f95ca11] blender2.8: Fix (unreported) Cycles not rendering correctly modified curves/surfaces/texts.
Bastien Montagne
noreply at git.blender.org
Wed Nov 28 16:25:24 CET 2018
Commit: 6fd5f95ca111543ccd37da118551a2b4d94dfdb7
Author: Bastien Montagne
Date: Wed Nov 28 16:23:39 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB6fd5f95ca111543ccd37da118551a2b4d94dfdb7
Fix (unreported) Cycles not rendering correctly modified curves/surfaces/texts.
Meshes from evaluated objects may already have modifiers applied, but
that's not the case for curves, we need to do that when converting them
to meshes.
===================================================================
M intern/cycles/blender/blender_mesh.cpp
===================================================================
diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp
index b97c250adf6..b27de775c54 100644
--- a/intern/cycles/blender/blender_mesh.cpp
+++ b/intern/cycles/blender/blender_mesh.cpp
@@ -1061,9 +1061,12 @@ Mesh *BlenderSync::sync_mesh(BL::Depsgraph& b_depsgraph,
* updating meshes here will end up having derived mesh referencing
* freed data from the blender side.
*/
- if(preview && b_ob.type() != BL::Object::type_MESH)
+ if(preview && b_ob.type() != BL::Object::type_MESH) {
b_ob.update_from_editmode(b_data);
+ }
+ /* For some reason, meshes do not need this... */
+ bool apply_modifiers = (b_ob.type() != BL::Object::type_MESH);
bool need_undeformed = mesh->need_attribute(scene, ATTR_STD_GENERATED);
mesh->subdivision_type = object_subdivision_type(b_ob, preview, experimental);
@@ -1078,7 +1081,7 @@ Mesh *BlenderSync::sync_mesh(BL::Depsgraph& b_depsgraph,
BL::Mesh b_mesh = object_to_mesh(b_data,
b_ob,
b_depsgraph,
- false,
+ apply_modifiers,
need_undeformed,
mesh->subdivision_type);
More information about the Bf-blender-cvs
mailing list