fix: drive Instance parts nested inside Instance parts (SDK bump) - #304
Merged
Conversation
`_update_instance_children` is the sim phase, and it ran only from `_seek_and_redraw`, which a parent-driven child never enters. Instance parts below the first level therefore held the frame the setup pass left them at. `_drive_instance_slot` now recurses into the child ahead of its draw, so the whole reference graph steps and the clipping carry-over (`visible_this_frame`) is settled before the child builds. Hiding an Instance child moves with it, out of the sim phase and into `_drawAnimation`, alongside the Effect emitter canvas items: the draw is what re-shows them, and a player holding a frame does not redraw, so hiding in the sim phase left the children of every held frame with nothing to switch them back on. That surfaced as a sub-animation blanking out whenever a seek landed on a fractional frame with sub-frames off.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
An Instance inside an Instance never advanced.
_update_instance_children— thesim phase — was reached only from
_seek_and_redraw, and a parent-driven childnever enters it:
update()returns early on_parent_driven, and the child'sdraw arrives straight from
_redraw_child_if_frame_changed. So everything belowthe first level held the frame
_fetchAnimation's one-off setup left it at,however far the animation ran.
Also bumps
SpriteStudio-SDKto the landedcri-middleware/SpriteStudio-SDK#399, which fixes an Instance key with a
startOffsetlosing the tail of its sub-animation.Player-facing effect
that themselves hold Instance parts (an Adobe Animate conversion typically
nests three or four deep) previously showed those inner parts frozen on their
setup frame. They now step with their parent.
carrying
startOffsetkeeps its section instead of collapsing to two frames —a walk cycle whose second leg is half a cycle out of phase walks instead of
vibrating in place.
the carry-over flag (
visible_this_frame) is now settled before the childdraws.
Changes
ss_player/ss_internal_player.cpp_drive_instance_slotrecurses intochild->_update_instance_childrenahead of the child's draw.
_drawAnimation, beside the Effect emitter canvas items. The draw is whatre-shows them, and a player holding a frame does not redraw — hiding in the
sim phase stranded the children of every held frame with nothing to switch
them back on. That surfaced as a sub-animation blanking out whenever a seek
landed on a fractional frame with sub-frames off, which the Godot editor's
seek bar produces.
ss_player/SpriteStudio-SDK— submodule bump to the merged #399.Verification
scripts/run-tests.sh— 35 cases, 101 assertions, 0 failed, 0 skipped, on theGDExtension build.
scripts/build.sh(custom module) andscripts/build-extension.sh.frames differ where the nested instances now advance, and with sub-frames off
a fractional seek renders byte-identical to its integer frame
(
24.0 / 24.25 / 24.5 / 24.75one hash;269.5 = 269.0,270.5 = 270.0,271.5 = 271.0,430.5 = 430.0). With sub-frames on, fractional framesinterpolate as before.
ghosting.
Known limit, not addressed here
_needs_continuous_update()looks one level down, so an independent Instancenested two or more levels deep loses the ticks where the root holds its frame
and runs slow. Nothing in the corpus to hand carries one — every Instance key
across the projects checked is synced — so it is left until an asset shows it.