-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Improve access to animation curves and clips #15664
Copy link
Copy link
Open
Labels
A-AnimationMake things move and change over timeMake things move and change over timeC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-ComplexQuite challenging from either a design or technical perspective. Ask for help!Quite challenging from either a design or technical perspective. Ask for help!
Metadata
Metadata
Assignees
Labels
A-AnimationMake things move and change over timeMake things move and change over timeC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-ComplexQuite challenging from either a design or technical perspective. Ask for help!Quite challenging from either a design or technical perspective. Ask for help!
Type
Fields
Give feedbackNo fields configured for issues without a type.
What problem does this solve or what need does it fill?
Right now (especially after #15434) it's hard to do anything with curve data after it's been added to an
AnimationClip. For the sake of post-processing and general reuse, it would be good if there was a way of obtaining aCurvefrom anAnimationCurve. This would allow, for example, the curve to be inspected, sampled, etc. without needing to actually animate something.What solution would you like?
Use the type registry to register pointers that allow conversion
dyn AnimationCurve -> dyn Curve<T>when the type of the property being animated is known extrinsically. Ideally, these could be packaged together with some utilities in order to allow something like aBox< dyn Curve<Transform>>to be extracted from anAnimationCliptogether with a target ID. (Note thatCurve<Transform>is actually not quite the right idea, since not every property of theTransformmay actually be animated.)What alternative(s) have you considered?
Do something hacky and hijack the
AnimationGraphmachinery in order to get it to read out values instead of animating things. Alternatively, attempt to downcast theAnimationCurvetypes directly into the types used by the glTF loader.