[Bf-blender-cvs] [2f1e51a1] master: Fix T46058: Modifiers on curve shows different results on OpenGL and cycles render

Sergey Sharybin noreply at git.blender.org
Fri Sep 11 09:02:24 CEST 2015


Commit: 2f1e51a1f33a07b947a92d91a4849bce6a57135f
Author: Sergey Sharybin
Date:   Fri Sep 11 12:00:57 2015 +0500
Branches: master
https://developer.blender.org/rB2f1e51a1f33a07b947a92d91a4849bce6a57135f

Fix T46058: Modifiers on curve shows different results on OpenGL and cycles render

Not really ideal fix, but should make Cycles behave same as BI. For some details
please refer to inline comment.

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

M	source/blender/blenkernel/intern/mesh.c

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

diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index f85e54a..8c89a72 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -2340,6 +2340,19 @@ Mesh *BKE_mesh_new_from_object(
 			tmpcu = (Curve *)tmpobj->data;
 			tmpcu->id.us--;
 
+			/* Copy cached display list, it might be needed by the stack evaluation.
+			 * Ideally stack should be able to use render-time display list, but doing
+			 * so is quite tricky and not safe so close to the release.
+			 *
+			 * TODO(sergey): Look into more proper solution.
+			 */
+			if (ob->curve_cache != NULL) {
+				if (tmpobj->curve_cache == NULL) {
+					tmpobj->curve_cache = MEM_callocN(sizeof(CurveCache), "CurveCache for curve types");
+				}
+				BKE_displist_copy(&tmpobj->curve_cache->disp, &ob->curve_cache->disp);
+			}
+
 			/* if getting the original caged mesh, delete object modifiers */
 			if (cage)
 				BKE_object_free_modifiers(tmpobj);




More information about the Bf-blender-cvs mailing list