Skip to content

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

C

Skip not exportable levels/columns

Abel Youcb45b0e4d4ac
diff --git a/toonz/sources/toonz/exportalllevelspopup.cpp b/toonz/sources/toonz/exportalllevelspopup.cpp
index 4bb271d7a..4eacef345 100644
--- a/toonz/sources/toonz/exportalllevelspopup.cpp
+++ b/toonz/sources/toonz/exportalllevelspopup.cpp
@@ -330,7 +330,7 @@ void ExportAllLevelsPopup::collectSelectedSimpleLevels() {
if (col->isEmpty() || !col->isPreviewVisible()) continue;// Not empty and visible
if (col->getColumnType()) continue;
if (col->getRange(r0, r1)) sl = xsh->getCell(r0, index).getSimpleLevel();
- assert(sl);
+ if (!sl) continue;
int type = sl->getType();
if
(!(type == PLI_XSHLEVEL || // ToonzVector
diff --git a/toonz/sources/toonz/exportlevelpopup.cpp b/toonz/sources/toonz/exportlevelpopup.cpp
index 82b5978bd..fb968e855 100644
--- a/toonz/sources/toonz/exportlevelpopup.cpp
+++ b/toonz/sources/toonz/exportlevelpopup.cpp
@@ -378,6 +378,13 @@ void ExportLevelPopup::collectSelectedSimpleLevels() {
if (r0 <= r1) // There exists a not-empty cell
{
TXshSimpleLevel *sl = xsh->getCell(r0, c).getSimpleLevel();
+ if (!sl) continue;
+ int type = sl->getType();
+ if (!(type == PLI_XSHLEVEL || // ToonzVector
+ type == TZP_XSHLEVEL || // ToonzRaster
+ type == OVL_XSHLEVEL)) // Raster
+ continue;
+
outputLevels.push_back(sl);
assert(sl);
}