Fix: Bam file contains objects of unknown type: MovingPart<LMatrix4f>

Restores ability to read old .bam files containing animation data
This commit is contained in:
rdb 2016-04-21 11:28:00 +02:00
parent 6225755230
commit ad04a4b026
1 changed files with 11 additions and 0 deletions

View File

@ -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<ACMatrixSwitchType>::get_class_type(),
"AnimChannelFixed<LMatrix4f>");
reg->record_alternate_name(MovingPart<ACMatrixSwitchType>::get_class_type(),
"MovingPart<LMatrix4f>");
reg->record_alternate_name(MovingPart<ACScalarSwitchType>::get_class_type(),
"MovingPart<float>");
#endif
}