Expose animation_clip paths (#9392)

Need this for a custom `AnimationPlayer` that I tick in `FixedUpdate`

# Objective

- Need access to an animation clip's `paths` from outside the module

## Solution

- Add a getter method to return a reference to `paths`

---------

Co-authored-by: Tristan Guichaoua <33934311+tguichaoua@users.noreply.github.com>
This commit is contained in:
jfaz 2023-08-11 17:03:36 -04:00 committed by GitHub
parent 1e170d2e90
commit ad4ec145eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,6 +102,12 @@ impl AnimationClip {
self.duration
}
/// The bone ids mapped by their [`EntityPath`].
#[inline]
pub fn paths(&self) -> &HashMap<EntityPath, usize> {
&self.paths
}
/// Add a [`VariableCurve`] to an [`EntityPath`].
pub fn add_curve_to_path(&mut self, path: EntityPath, curve: VariableCurve) {
// Update the duration of the animation by this curve duration if it's longer