diff --git a/pandatool/src/palettizer/paletteGroup.cxx b/pandatool/src/palettizer/paletteGroup.cxx index 02fc14374a..d8b8f6c98f 100644 --- a/pandatool/src/palettizer/paletteGroup.cxx +++ b/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(); +} diff --git a/pandatool/src/palettizer/paletteGroup.h b/pandatool/src/palettizer/paletteGroup.h index b39240d803..31490f69b4 100644 --- a/pandatool/src/palettizer/paletteGroup.h +++ b/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; diff --git a/pandatool/src/palettizer/texturePlacement.cxx b/pandatool/src/palettizer/texturePlacement.cxx index f572684cdd..816139f6e6 100644 --- a/pandatool/src/palettizer/texturePlacement.cxx +++ b/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;