From 0e1a72839634549b90dd703c1563231b695977da Mon Sep 17 00:00:00 2001 From: manongjohn <19245851+manongjohn@users.noreply.github.com> Date: Tue, 26 Mar 2024 18:41:35 -0400 Subject: [PATCH] Fix hook inbetween creating extra hooks --- toonz/sources/toonz/cellselection.cpp | 2 +- toonz/sources/toonz/filmstripcommand.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/toonz/sources/toonz/cellselection.cpp b/toonz/sources/toonz/cellselection.cpp index 2f9bef99e..3c58805e5 100644 --- a/toonz/sources/toonz/cellselection.cpp +++ b/toonz/sources/toonz/cellselection.cpp @@ -1522,7 +1522,7 @@ void inbetweenWithoutUndo(TXshSimpleLevel *sl, std::vector fids, if (hooks) { for (int j = 0; j < hooks->getHookCount(); j++) { Hook *hook = hooks->getHook(j); - if (!hook) continue; + if (!hook || hook->isEmpty()) continue; TPointD firstPos = hook->getAPos(fid0); TPointD lastPos = hook->getAPos(fid1); TPointD iPos = firstPos * (1 - t) + lastPos * t; diff --git a/toonz/sources/toonz/filmstripcommand.cpp b/toonz/sources/toonz/filmstripcommand.cpp index 56706e716..fd69a2462 100644 --- a/toonz/sources/toonz/filmstripcommand.cpp +++ b/toonz/sources/toonz/filmstripcommand.cpp @@ -2756,7 +2756,7 @@ void FilmstripCmd::inbetweenWithoutUndo( if (hooks) { for (int j = 0; j < hooks->getHookCount(); j++) { Hook *hook = hooks->getHook(j); - if (!hook) continue; + if (!hook || hook->isEmpty()) continue; TPointD firstPos = hook->getAPos(fid0); TPointD lastPos = hook->getAPos(fid1); TPointD iPos = firstPos * (1 - s) + lastPos * s;