diff --git a/.rive_head b/.rive_head index 9fb561a1..c4534548 100644 --- a/.rive_head +++ b/.rive_head @@ -1 +1 @@ -b9773680e341b946fa06d046cfeeda8f97555645 +d30f3e3ca6175e5f0bc7f029f6acf7de08d18355 diff --git a/include/rive/drawable.hpp b/include/rive/drawable.hpp index 4b894194..5c421ee6 100644 --- a/include/rive/drawable.hpp +++ b/include/rive/drawable.hpp @@ -51,6 +51,8 @@ class Drawable : public DrawableBase DrawableFlag::Opaque) == DrawableFlag::Opaque; } + virtual bool isProxy() { return false; } + bool isChildOfLayout(LayoutComponent* layout); StatusCode onAddedDirty(CoreContext* context) override; @@ -86,6 +88,8 @@ class DrawableProxy : public Drawable Core* hitTest(HitInfo*, const Mat2D&) override { return nullptr; } + bool isProxy() override { return true; } + ProxyDrawing* proxyDrawing() const { return m_proxyDrawing; } }; } // namespace rive diff --git a/src/animation/state_machine_instance.cpp b/src/animation/state_machine_instance.cpp index 14667124..f5f112f9 100644 --- a/src/animation/state_machine_instance.cpp +++ b/src/animation/state_machine_instance.cpp @@ -1293,8 +1293,7 @@ StateMachineInstance::StateMachineInstance(const StateMachine* machine, { continue; } - if (hittable->is() || - hittable->is()) + if (hittable->is() || hittable->isProxy()) { auto component = hittable->as(); HitLayout* hitLayout; diff --git a/src/artboard.cpp b/src/artboard.cpp index 7b4168ea..c9b59e54 100644 --- a/src/artboard.cpp +++ b/src/artboard.cpp @@ -342,12 +342,9 @@ StatusCode Artboard::initialize() // child of the layout, so we insert a proxy before it do { - if (currentLayout->clip() || currentLayout->hasShapePaints()) - { - m_Drawables.insert(m_Drawables.begin() + i, - currentLayout->proxy()); - i += 1; - } + m_Drawables.insert(m_Drawables.begin() + i, + currentLayout->proxy()); + i += 1; layouts.pop_back(); if (!layouts.empty()) { @@ -364,10 +361,7 @@ StatusCode Artboard::initialize() while (!layouts.empty()) { auto layout = layouts.back(); - if (layout->clip() || layout->hasShapePaints()) - { - m_Drawables.push_back(layout->proxy()); - } + m_Drawables.push_back(layout->proxy()); layouts.pop_back(); }