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:
parent
1e170d2e90
commit
ad4ec145eb
@ -102,6 +102,12 @@ impl AnimationClip {
|
|||||||
self.duration
|
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`].
|
/// Add a [`VariableCurve`] to an [`EntityPath`].
|
||||||
pub fn add_curve_to_path(&mut self, path: EntityPath, curve: VariableCurve) {
|
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
|
// Update the duration of the animation by this curve duration if it's longer
|
||||||
|
Loading…
Reference in New Issue
Block a user