From ad04a4b02693d3e972dc2c1ac61239a00225fd64 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 21 Apr 2016 11:28:00 +0200 Subject: [PATCH] Fix: Bam file contains objects of unknown type: MovingPart Restores ability to read old .bam files containing animation data --- panda/src/chan/config_chan.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/panda/src/chan/config_chan.cxx b/panda/src/chan/config_chan.cxx index ab9b343d23..9772f2d661 100644 --- a/panda/src/chan/config_chan.cxx +++ b/panda/src/chan/config_chan.cxx @@ -138,4 +138,15 @@ ConfigureFn(config_chan) { AnimChannelScalarTable::register_with_read_factory(); AnimChannelScalarDynamic::register_with_read_factory(); AnimPreloadTable::register_with_read_factory(); + + // For compatibility with old .bam files. +#ifndef STDFLOAT_DOUBLE + TypeRegistry *reg = TypeRegistry::ptr(); + reg->record_alternate_name(AnimChannelFixed::get_class_type(), + "AnimChannelFixed"); + reg->record_alternate_name(MovingPart::get_class_type(), + "MovingPart"); + reg->record_alternate_name(MovingPart::get_class_type(), + "MovingPart"); +#endif }