Browse Source

*** empty log message ***

David Rose 25 years ago
parent
commit
abbd4a8e2b

+ 8 - 0
panda/src/chan/animChannelMatrixXfmTable.cxx

@@ -308,6 +308,14 @@ fillin(DatagramIterator& scan, BamReader* manager)
     if (manager->get_file_minor_ver() < 1) {
       chan_cat.error()
 	<< "Cannot read old-style quantized channels.\n";
+      clear_all_tables();
+      return;
+    }
+
+    if (!read_compressed) {
+      chan_cat.info()
+	<< "Not reading compressed animation channels.\n";
+      clear_all_tables();
       return;
     }
 

+ 6 - 0
panda/src/chan/config_chan.cxx

@@ -56,6 +56,12 @@ bool compress_channels = config_chan.GetBool("compress-channels", false);
 //
 int compress_chan_quality = config_chan.GetInt("compress-chan-quality", 95);
 
+// Set this false to disable reading of compressed animation channels,
+// even if the decompression code is available.  The only reason you
+// might want to do this would be to speed load time when you don't
+// care about what the animation looks like.
+bool read_compressed = config_chan.GetBool("read-compressed", true);
+
 ConfigureFn(config_chan) {
   AnimBundle::init_type();
   AnimBundleNode::init_type();

+ 1 - 0
panda/src/chan/config_chan.h

@@ -14,5 +14,6 @@ NotifyCategoryDecl(chan, EXPCL_PANDA, EXPTP_PANDA);
 
 EXPCL_PANDA extern bool compress_channels;
 EXPCL_PANDA extern int compress_chan_quality;
+EXPCL_PANDA extern bool read_compressed;
 
 #endif