Don't defer path update if Shape has a dependent skin Fixes an issue where shapes set to 0% opacity and also having bound bones were not updating, causing problems with hit detection on those shapes. Diffs= e0c4d9a20 Don't defer path update if Shape has a dependent skin (#7231) Co-authored-by: Philip Chung <philterdesign@gmail.com>
diff --git a/.rive_head b/.rive_head index 42e7060..f5a3b4c 100644 --- a/.rive_head +++ b/.rive_head
@@ -1 +1 @@ -806ae1faea4cc10452c76a4ce2b35f2ca12aa469 +e0c4d9a20df66b8bc43d7d2528caf432aa053ebb
diff --git a/src/shapes/points_path.cpp b/src/shapes/points_path.cpp index a6d70d6..a23b0ca 100644 --- a/src/shapes/points_path.cpp +++ b/src/shapes/points_path.cpp
@@ -28,7 +28,7 @@ void PointsPath::update(ComponentDirt value) { - if (hasDirt(value, ComponentDirt::Path) && skin() != nullptr && !m_Shape->canDeferPathUpdate()) + if (hasDirt(value, ComponentDirt::Path) && skin() != nullptr) { // Path tracks re-adding ComponentDirt::Path if we deferred due to to // shape being invisible.
diff --git a/src/shapes/shape.cpp b/src/shapes/shape.cpp index 420b82d..e37b474 100644 --- a/src/shapes/shape.cpp +++ b/src/shapes/shape.cpp
@@ -1,6 +1,7 @@ #include "rive/constraints/constraint.hpp" #include "rive/hittest_command_path.hpp" #include "rive/shapes/path.hpp" +#include "rive/shapes/points_path.hpp" #include "rive/shapes/shape.hpp" #include "rive/shapes/clipping_shape.hpp" #include "rive/shapes/paint/blend_mode.hpp" @@ -28,6 +29,14 @@ (pathSpace() & PathSpace::FollowPath) != PathSpace::FollowPath; if (canDefer) { + // If we have a dependent Skin, don't defer the update + for (auto d : dependents()) + { + if (d->is<PointsPath>() && d->as<PointsPath>()->skin() != nullptr) + { + return false; + } + } for (auto path : m_Paths) { if (!path->canDeferPathUpdate())