add animation before setting exit time

fixes #7728
This fix is not necessary now that we have the renderer in the editor, since nested artboards run in c++.
But since I was looking into it, and just in case, I added the fix on the flutter runtime.

Diffs=
1b6afc1e9 add animation before setting exit time (#7729)

Co-authored-by: hernan <hernan@rive.app>
This commit is contained in:
bodymovin
2024-08-01 15:11:28 +00:00
parent 2ab7604760
commit 05e454f70e
2 changed files with 2 additions and 4 deletions

View File

@ -1 +1 @@
c3137b923ca5d62771f85dcae10afcba6de083d3
1b6afc1e96b6cac3a708b78381ce6fa7d0dd8058

View File

@ -19,6 +19,7 @@ class LayerStateImporter extends ArtboardImportStackObject {
// animations.
if (state is BlendState) {
var blendState = state as BlendState;
blendState.internalAddAnimation(blendAnimation);
for (final transition
in state.transitions.whereType<BlendStateTransition>()) {
if (transition.exitBlendAnimationId >= 0 &&
@ -27,9 +28,6 @@ class LayerStateImporter extends ArtboardImportStackObject {
blendState.animations[transition.exitBlendAnimationId];
}
}
}
if (state is BlendState) {
(state as BlendState).internalAddAnimation(blendAnimation);
return true;
}