Skip to content

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

C

fix crush on inserting fx

shun-iwasawaae72bf260ac9
diff --git a/toonz/sources/toonzqt/fxschematicscene.cpp b/toonz/sources/toonzqt/fxschematicscene.cpp
index 1e5d6536d..8f820b186 100644
--- a/toonz/sources/toonzqt/fxschematicscene.cpp
+++ b/toonz/sources/toonzqt/fxschematicscene.cpp
@@ -2194,8 +2194,12 @@ bool FxSchematicScene::isAnEmptyZone_withParentFx(const QRectF &rect,
if (fxNode && fxNode->isA(eXSheetFx)) continue;
// check only the fxs sharing the same parent
if (!fxNode) continue;
- for (int p = 0; p < fxNode->getInputPortCount(); p++) {
- if (parent == fxNode->getFx()->getInputPort(p)->getFx()) {
+ TFx *fx = fxNode->getFx();
+ if (TZeraryColumnFx *zfx = dynamic_cast<TZeraryColumnFx *>(fx))
+ fx = zfx->getZeraryFx();
+ if (!fx || fx == parent) continue;
+ for (int p = 0; p < fx->getInputPortCount(); p++) {
+ if (parent == fx->getInputPort(p)->getFx()) {
if (node->boundingRect().translated(node->scenePos()).intersects(rect))
return false;
else