From 2fbb7c162312024006b59ec94df3aa895e7206c9 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 12 Apr 2006 23:49:01 +0000 Subject: [PATCH] fix animation under flattenStrong --- panda/src/gobj/geomVertexFormat.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/panda/src/gobj/geomVertexFormat.cxx b/panda/src/gobj/geomVertexFormat.cxx index 5c1da16e35..44f2a84d12 100644 --- a/panda/src/gobj/geomVertexFormat.cxx +++ b/panda/src/gobj/geomVertexFormat.cxx @@ -155,6 +155,15 @@ get_union_format(const GeomVertexFormat *other) const { PT(GeomVertexFormat) new_format = new GeomVertexFormat; + // Preserve whichever animation type is not AT_None. (If both + // animation types are not AT_None, but they are different, this + // whole operation is questionable.) + if (_animation.get_animation_type() != AT_none) { + new_format->set_animation(_animation); + } else { + new_format->set_animation(other->get_animation()); + } + // Keep track of the columns we have already added. typedef pset< CPT(InternalName) > ColumnNames; ColumnNames column_names;