Don't collapse child constraints of Solos Fixes the problem where FollowPathConstraints were not working with Solos in CPP runtime (works only in editor). The proposed solution is to not collapse constraints of the Solo because in the case of FollowPathConstraint, a call to it's update() is required in order to get the path info. Before the fix: https://github.com/rive-app/rive/assets/186340/48df0eb5-a422-464c-84c0-4c49412fa90e After the fix: https://github.com/rive-app/rive/assets/186340/dbfc8172-217d-4685-92c8-c34c551235ca Diffs= a91b1b764 Don't collapse child constraints of Solos - fixes Follow Paths on Solos (#5866) Co-authored-by: Philip Chung <philterdesign@gmail.com>
diff --git a/.rive_head b/.rive_head index ecde75e..06a46dd 100644 --- a/.rive_head +++ b/.rive_head
@@ -1 +1 @@ -033489f8bb031318adc12cd418dde42e89635061 +a91b1b7647965149bd1b7894fa428f189e57f653
diff --git a/src/solo.cpp b/src/solo.cpp index 8e842f8..4c1fb03 100644 --- a/src/solo.cpp +++ b/src/solo.cpp
@@ -1,4 +1,5 @@ #include "rive/solo.hpp" +#include "rive/constraints/constraint.hpp" #include "rive/artboard.hpp" using namespace rive; @@ -8,6 +9,11 @@ Core* active = collapse ? nullptr : artboard()->resolve(activeComponentId()); for (Component* child : children()) { + // We don't want to collapse constraints applied to the Solo + if (child->is<Constraint>()) + { + continue; + } child->collapse(child != active); } }