Skip to content

Conversation

@LloydVincent
Copy link

Timeline Integration Improvements

  • TMPAnimationClip now synchronizes with timeline playback, allowing for more predictable, consistent animations and an authoring experience more in line with typical Timeline workflow.
  • May have unintentionally fixed an issue where some animations were not applied correctly when using multiple TMP animator tracks.

tmp-effect-sync

To achieve this, the behavior of TMP Animator was altered such that when animating via Timeline, the update mode is considered to be UpdateMode.Script.

Two options have been added to the TMPAnimatorTrack inspector.

image

  • Preserve Animation State On Pause: if disabled, when the timeline is paused all timeline based animations will be interrupted and inline styles will be applied normally. I imagine this option will be useful for visual-novel style stop-and-go timeline implementations.
  • Should Update Animations: this option can be used to prevent a TMPAnimationTrack from updating animation state. This is useful when the same TMPAnimator is present on multiple tracks, to prevent multiple state updates in the same frame (which has the effect of compounding animation speed). It's probably possible to automate this but would require some awkward code because timeline tracks by design aren't intended to talk to each other.

I believe all this to be objectively desirable, but if maximizing preservation of current (somewhat buggy?) behaviour is a priority then I can add a check box to the track Inspector that toggles the core UpdateMode change.

Future Improvements

Ideally I'd like there to be options on the Track for how to handle inline styles while the timeline is playing (ie. ignore any inline animations, allow but reset their timing on timeline start, allow and sync them with timeline or allow them to run independently) but implementing these kind of options would require much deeper changes and unfortunately I don't have the time for it.

@LloydVincent LloydVincent changed the title Lloyd/timeline sync Synchronize animations with Timeline position Feb 22, 2025
@Luca3317
Copy link
Owner

Luca3317 commented Mar 8, 2025

Only got around to checking this out now, looks really good! Thanks for the contribution :)
I might implement the potential improvements you mentioned later, would be a handy feature to have.

I believe all this to be objectively desirable, but if maximizing preservation of current (somewhat buggy?) behaviour is a priority then I can add a check box to the track Inspector that toggles the core UpdateMode change.

No I agree, the behaviour you implemented is much preferable. I hadnt spent a lot of time or thought on the animation clips before since I was mostly focused on the mesh modifiers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants