[Bf-blender-cvs] [a6e6ad07563] master: Fix T60683, T60662: Cycles render crash in edit mode for certain meshes.
Brecht Van Lommel
noreply at git.blender.org
Mon Jan 21 16:11:17 CET 2019
Commit: a6e6ad07563738b641c9df9e8c48ec0cf9342068
Author: Brecht Van Lommel
Date: Mon Jan 21 15:34:34 2019 +0100
Branches: master
https://developer.blender.org/rBa6e6ad07563738b641c9df9e8c48ec0cf9342068
Fix T60683, T60662: Cycles render crash in edit mode for certain meshes.
===================================================================
M intern/cycles/blender/blender_util.h
===================================================================
diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h
index d3a8b935a6c..1b9e1911591 100644
--- a/intern/cycles/blender/blender_util.h
+++ b/intern/cycles/blender/blender_util.h
@@ -71,8 +71,12 @@ static inline BL::Mesh object_to_mesh(BL::BlendData& data,
/* TODO: calc_undeformed is not used. */
mesh = BL::Mesh(object.data());
- /* Make a copy to split faces if we use autosmooth, otherwise not needed. */
- if (mesh.use_auto_smooth() && subdivision_type == Mesh::SUBDIVISION_NONE) {
+ /* Make a copy to split faces if we use autosmooth, otherwise not needed.
+ * Also in edit mode do we need to make a copy, to ensure data layers like
+ * UV are not empty. */
+ if (mesh.is_editmode() ||
+ (mesh.use_auto_smooth() && subdivision_type == Mesh::SUBDIVISION_NONE))
+ {
mesh = data.meshes.new_from_object(depsgraph, object, false, false);
}
}
More information about the Bf-blender-cvs
mailing list