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
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2008-07-20 20:06:40 +0400
committerTon Roosendaal <ton@blender.org>2008-07-20 20:06:40 +0400
commit433c43932b3b057530465982ddef8be0ee27b673 (patch)
tree3ccdeee315f1418b343727e24ef4db076513d3d5 /source
parentd725e5f78eae57b3cfd0d32b8404beaef4e11846 (diff)
Bugfix #16662
Curve modifier on lattice suffered drawing updates, only when the system was not animated though, missed depsgraph calls then. Solved it by forcing lattice to always return displist for its vertices, that's same as for how mesh/curve works now.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/lattice.c5
-rw-r--r--source/blender/src/drawobject.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index e8bcae42d5a..54915058bab 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -915,7 +915,10 @@ void lattice_calc_modifiers(Object *ob)
mti->deformVerts(md, ob, NULL, vertexCos, numVerts);
}
- if (vertexCos) {
+ /* always displist to make this work like derivedmesh */
+ if (!vertexCos) vertexCos = lattice_getVertexCos(ob, &numVerts);
+
+ {
DispList *dl = MEM_callocN(sizeof(*dl), "lt_dl");
dl->type = DL_VERTS;
dl->parts = 1;
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c
index 045bf292446..1a469e8b366 100644
--- a/source/blender/src/drawobject.c
+++ b/source/blender/src/drawobject.c
@@ -1199,7 +1199,12 @@ static void drawlattice(Object *ob)
int use_wcol= 0;
lt= (ob==G.obedit)?editLatt:ob->data;
+
+ /* now we default make displist, this will modifiers work for non animated case */
+ if(ob->disp.first==NULL)
+ lattice_calc_modifiers(ob);
dl= find_displist(&ob->disp, DL_VERTS);
+
if(ob==G.obedit) {
cpack(0x004000);