From ab40d5456ea2f68a0c8ad3e0c469853932ce4d17 Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 11 Jan 2013 17:43:18 +0000 Subject: [PATCH] properly deal with animated vertices in make_flat_mesh() --- panda/src/distort/projectionScreen.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/panda/src/distort/projectionScreen.cxx b/panda/src/distort/projectionScreen.cxx index e578d74d8d..ea5d6ee9e5 100644 --- a/panda/src/distort/projectionScreen.cxx +++ b/panda/src/distort/projectionScreen.cxx @@ -722,10 +722,12 @@ make_mesh_geom_node(const WorkingNodePath &np, const NodePath &camera, //////////////////////////////////////////////////////////////////// PT(Geom) ProjectionScreen:: make_mesh_geom(const Geom *geom, Lens *lens, LMatrix4 &rel_mat) { + Thread *current_thread = Thread::get_current_thread(); PT(Geom) new_geom = geom->make_copy(); - - GeomVertexRewriter vertex(new_geom->modify_vertex_data(), - InternalName::get_vertex()); + PT(GeomVertexData) vdata = new_geom->modify_vertex_data(); + new_geom->set_vertex_data(vdata->animate_vertices(false, current_thread)); + vdata = new_geom->modify_vertex_data(); + GeomVertexRewriter vertex(vdata, InternalName::get_vertex()); while (!vertex.is_at_end()) { LVertex vert = vertex.get_data3();