Browse Source

Made palettization forced with texture swap

Gyedo Jeon 16 years ago
parent
commit
1c55bb68cc

+ 11 - 0
pandatool/src/palettizer/paletteGroup.cxx

@@ -823,3 +823,14 @@ add_texture_swap_info(const string sourceTextureName, const vector_string &swapT
   }
   _textureSwapInfo.insert(TextureSwapInfo::value_type(sourceTextureName, swapTextures));
 }
+
+////////////////////////////////////////////////////////////////////
+//     Function: PaletteGroup::is_none_texture_swap
+//       Access: Public
+//  Description: Returns textureswap information is set or not,
+//               True if it's not set.
+////////////////////////////////////////////////////////////////////
+bool PaletteGroup::
+is_none_texture_swap() const {
+  return _textureSwapInfo.empty();
+}

+ 1 - 0
pandatool/src/palettizer/paletteGroup.h

@@ -91,6 +91,7 @@ public:
   void update_images(bool redo_all);
 
   void add_texture_swap_info(const string sourceTextureName, const vector_string &swapTextures);
+  bool is_none_texture_swap() const;
 
 private:
   string _dirname;

+ 1 - 1
pandatool/src/palettizer/texturePlacement.cxx

@@ -349,7 +349,7 @@ determine_size() {
     force_replace();
     _omit_reason = OR_size;
 
-  } else if (pal->_omit_everything) {
+  } else if (pal->_omit_everything && (_group->is_none_texture_swap())) {
     // If we're omitting everything, omit everything.
     force_replace();
     _omit_reason = OR_default_omit;