Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-09-11 10:00:57 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-09-11 10:02:17 +0300
commit2f1e51a1f33a07b947a92d91a4849bce6a57135f (patch)
tree3da19c5dc8663f8941641226516e19831c77ffcd /source/blender
parent935544671636fd679a607d380c11c4176b22bb6f (diff)
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.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/mesh.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index f85e54a8362..8c89a724975 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);