Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Keep the consistency of mesh image addr, after save operation (#380)

tomosue5f7d8952725
diff --git a/toonz/sources/toonzlib/imagebuilders.cpp b/toonz/sources/toonzlib/imagebuilders.cpp
index 7431ea7ae..458464e5e 100644
--- a/toonz/sources/toonzlib/imagebuilders.cpp
+++ b/toonz/sources/toonzlib/imagebuilders.cpp
@@ -154,7 +154,10 @@ bool ImageLoader::isImageCompatible(int imFlags, void *extData)
BuildExtData *data = static_cast<BuildExtData *>(extData);
const TXshSimpleLevel *sl = data->m_sl;
- if (sl->getType() == PLI_XSHLEVEL)
+
+ // NOTE: Vector and Mesh dont care about sub sampling rate and bit depth compatibility.
+ // They are property of Raster.
+ if (sl->getType() == PLI_XSHLEVEL || sl->getType() == MESH_XSHLEVEL)
return true;
int subsampling = buildSubsampling(imFlags, data);
@@ -162,7 +165,11 @@ bool ImageLoader::isImageCompatible(int imFlags, void *extData)
if (m_subsampling <= 0 || subsampling != m_subsampling)
return false;
- return (m_64bitCompatible || !(imFlags & ImageManager::is64bitEnabled));
+ if (m_64bitCompatible || !(imFlags & ImageManager::is64bitEnabled)){
+ return true;
+ }else{
+ return false;
+ }
}
//-------------------------------------------------------------------------