AnimationClipProvider
Provides functions to load and preview AnimationClips.
Memory category | Animation |
---|
Member index 8
Description
Provides functions to load and preview AnimationClips. It includes a number of functions that are useful when working with an Animation.
The AnimationClipProvider replaces the deprecated
KeyframeSequenceProvider that was used to download KeyframeSequences
by content ID.
The AnimationClipProvider has a number of uses.
- Download the AnimationClip associated with an animation content ID from the Roblox website, regardless of the underlying type of AnimationClip (KeyframeSequence or CurveAnimation).
- Generate a temporary id to locally preview an animation.
- Fetch the content IDs of animations owned by a particular user.
History 16
- 645 Change ReturnType of RegisterAnimationClip from Content to ContentId
- 645 Change ReturnType of RegisterActiveAnimationClip from Content to ContentId
- 645 Change Parameters of GetClipEvaluatorAsync from (assetId: Content) to (assetId: ContentId)
- 645 Change Parameters of GetAnimationClipAsync from (assetId: Content) to (assetId: ContentId)
- 645 Change Parameters of GetAnimationClip from (assetId: Content) to (assetId: ContentId)
- 592 Add GetClipEvaluatorAsync
- 553 Change PreferredDescriptor of GetAnimationClipById from to GetAnimationClipAsync
- 553 Change PreferredDescriptor of GetAnimationClip from to GetAnimationClipAsync
- 502 Add RegisterAnimationClip
- 502 Add RegisterActiveAnimationClip
- 502 Add GetMemStats
- 502 Add GetAnimations
- 502 Add GetAnimationClipById
- 502 Add GetAnimationClipAsync
- 502 Add GetAnimationClip
- 502 Add AnimationClipProvider
Members 8
GetAnimationClip
Parameters (1) | ||
---|---|---|
assetId | ContentId | |
Returns (1) | ||
AnimationClip |
Returns a AnimationClip from a given asset URL.
Security | PluginSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 645 Change Parameters of GetAnimationClip from (assetId: Content) to (assetId: ContentId)
- 553 Change PreferredDescriptor of GetAnimationClip from to GetAnimationClipAsync
- 502 Add GetAnimationClip
GetAnimationClipAsync
Parameters (1) | ||
---|---|---|
assetId | ContentId | |
Returns (1) | ||
AnimationClip |
Fetches an AnimationClip based on the specified assetId. The
assetId must correspond to an animation asset in Roblox. The function will
yield until the AnimationClip is loaded from the website and
should be wrapped in a pcall
.
Thread safety | Unsafe |
---|
History 2
- 645 Change Parameters of GetAnimationClipAsync from (assetId: Content) to (assetId: ContentId)
- 502 Add GetAnimationClipAsync
GetAnimationClipById
Parameters (2) | ||
---|---|---|
assetId | int64 | |
useCache | bool | |
Returns (1) | ||
AnimationClip |
Returns a AnimationClip from the supplied assetId. Can optionally cache to reduce unnecessary loading freezes.
Security | PluginSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 553 Change PreferredDescriptor of GetAnimationClipById from to GetAnimationClipAsync
- 502 Add GetAnimationClipById
GetAnimations
Parameters (1) | ||
---|---|---|
userId | int64 | |
Returns (1) | ||
Instance |
This function returns an InventoryPages object which can be used to iterate over animations owned by a specific user.
This function has a number of potential uses, such as allowing users to browse and import animations into a custom animation plugin.
Thread safety | Unsafe |
---|
History 1
- 502 Add GetAnimations
GetClipEvaluatorAsync
Parameters (1) | ||
---|---|---|
assetId | ContentId | |
Returns (1) | ||
ClipEvaluator |
Thread safety | Unsafe |
---|
History 2
- 645 Change Parameters of GetClipEvaluatorAsync from (assetId: Content) to (assetId: ContentId)
- 592 Add GetClipEvaluatorAsync
GetMemStats
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
Dictionary |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
- 502 Add GetMemStats
RegisterActiveAnimationClip
Parameters (1) | ||
---|---|---|
animationClip | AnimationClip | |
Returns (1) | ||
ContentId |
Generates a temporary asset ID from a AnimationClip that can be
used for localized testing of an animation. This performs the same
function as
RegisterAnimationClip()
but generates an active://
URL instead of a hash. The generated ID can
be used as an AnimationId property for
testing.
The asset ID generated by this function is temporary and cannot be used outside of Studio. Developers wishing to generate an asset ID that can be used online should upload the AnimationClip to Roblox.
Thread safety | Unsafe |
---|
History 2
- 645 Change ReturnType of RegisterActiveAnimationClip from Content to ContentId
- 502 Add RegisterActiveAnimationClip
RegisterAnimationClip
Parameters (1) | ||
---|---|---|
animationClip | AnimationClip | |
Returns (1) | ||
ContentId |
Generates a temporary asset ID from a AnimationClip that can be used for localized testing of an animation.
This function performs the same function to RegisterActiveAnimationClip yet generates an active:// URL instead of a hash.
The ID generated can be used for the Animation.AnimationId property to test animations.
The asset ID generated by this function is temporary and cannot be used outside of Studio. Developers wishing to generate an asset ID that can be used online should upload the AnimationClip to Roblox.
Thread safety | Unsafe |
---|
History 2
- 645 Change ReturnType of RegisterAnimationClip from Content to ContentId
- 502 Add RegisterAnimationClip