stf.animation¶
[ Schema | Category: Data ]
An animation relative to a prefab.
Implementations¶
Blender |
bpy.types.Action setup with Slot Link |
|
Godot |
Animation |
|
Unity |
AnimationClip |
Properties¶
Main¶
type¶
required Constant: "stf.animation"
loop¶
optional Enum: "loop" | "none"
Default: none
Whether to loop the animation and how.
fps¶
required Type: number
range¶
required Type: array<number>
tracks¶
required Type: array<Animation Track Object>
tracks_baked¶
optional Type: array<Animation Track Object>
Tracks that are the result of a baking operation.
Animation Track Object¶
target¶
required Type: Resource-ID-Path
STF path to the target property. Must start with a Resource-ID.
timepoints¶
required Type: array<number>
The timepoints at which this track has keyframes. Must be sorted from earliest to latest.
interpolation¶
optional Enum: "bezier" | "constant" | "linear" | "quadratic" | "cubic"
Fallback interpolation type for the entire track.
subtracks¶
required Type: array<Subtrack Object>
In case a vector with 3 components is animated, each of the vectors component will have its own subtrack. In case a subtrack is not to be animated, it can be null
track_baked¶
optional Type: boolean
Default: False
Indicates whether the entire tracks is generated by a baking operation.
reset_animation¶
optional Type: Resource-Ref
Resource reference to a reset animation.
is_reset_animation¶
optional Type: boolean
Default: False
Whether this animation is a reset-animation.
Subtrack Object¶
keyframes¶
required Type: array<Keyframe Array>
In case the previous keyframe has an out-tangent, this keyframes in-tangent is added at the last position in the keyframe-array.
baked¶
optional Type: Buffer-Ref
Buffer reference. Baked keyframe values for each frame within the animations range.
Keyframe Array¶
One of:¶
0¶
0: source_of_truth¶
required Type: boolean
Whether this keyframe is a source of truth, as in not baked or generated.
1: value¶
required Type: number
The keyframes value.
2: interpolation¶
required Enum: "constant" | "linear" | "quadratic" | "cubic"
Interpolation type for this keyframe. Depending on this, the keyframe array may contain further items.
Items: in_tangent¶
optional Type: array<number>
In-tangent x and y offset. In case the previous keyframe has an out-tangent, this keyframes in-tangent is added at the last position in the keyframe-array.
1¶
0: source_of_truth¶
required Type: boolean
Whether this keyframe is a source of truth, as in not baked or generated.
1: value¶
required Type: number
The keyframes value.
2: interpolation¶
required Enum: "bezier"
Interpolation type for this keyframe. Depending on this, the keyframe array may contain further items.
3: tangent_type¶
required Enum: "split" | "aligned" | "auto"
4: out_tangent¶
required Type: array<number>
Out-tangent x and y offset
Items: in_tangent¶
optional Type: array<number>
In-tangent x and y offset. In case the previous keyframe has an out-tangent, this keyframes in-tangent is added at the last position in the keyframe-array.
Json Example:¶
{
"type": "stf.animation",
"name": "Test Animation",
"loop": "none",
"fps": 24,
"range": [
1.0,
5.0
],
"reset_animation": 0,
"tracks": [
{
"target": [
"bbff51e8-b34d-4ec4-aca4-3fcecad73309",
"instance",
"blendshape",
"MouthEdgesOpen",
"value"
],
"timepoints": [
1.0,
5.0
],
"subtracks": [
{
"keyframes": [
[
true,
0.0,
"bezier",
"auto",
[
1.3333334922790527,
0.0
]
],
[
true,
1.0,
"bezier",
"auto",
[
1.3333334922790527,
0.0
],
[
-1.3333334922790527,
0.0
]
]
],
"baked": 0
}
],
"interpolation": "bezier",
"track_baked": false
},
{
"target": [
"e6ae2ed1-fc53-43ee-ac53-05bf296d5fc1",
"instance",
"29c1fb4e-37f7-46d5-b07e-526934455996",
"r"
],
"timepoints": [
1.0,
5.0
],
"subtracks": [
{
"keyframes": [
[
true,
0.8330915570259094,
"bezier",
"auto",
[
1.3333334922790527,
0.0
]
],
[
true,
0.8460156917572021,
"bezier",
"auto",
[
1.3333334922790527,
0.0
],
[
-1.3333334922790527,
0.0
]
]
],
"baked": 6
},
{
"keyframes": [
[
true,
4.20605830192368e-16,
"bezier",
"auto",
[
1.3333334922790527,
0.0
]
],
[
true,
4.3544335926898076e-16,
"bezier",
"auto",
[
1.3333334922790527,
0.0
],
[
-1.3333334922790527,
0.0
]
]
],
"baked": 7
},
{
"keyframes": [
[
true,
-1.713443229014921e-16,
"bezier",
"auto",
[
1.3333334922790527,
0.0
]
],
[
true,
-1.7949213134447822e-16,
"bezier",
"auto",
[
1.3333334922790527,
0.0
],
[
-1.3333334922790527,
0.0
]
]
],
"baked": 8
},
{
"keyframes": [
[
true,
0.5531351566314697,
"bezier",
"auto",
[
1.3333334922790527,
0.0
]
],
[
true,
0.5331581234931946,
"bezier",
"auto",
[
1.3333334922790527,
0.0
],
[
-1.3333334922790527,
0.0
]
]
],
"baked": 9
}
],
"interpolation": "bezier",
"track_baked": false
}
],
"referenced_buffers": [
"d8127b86-db5a-4914-b04b-8303058abbcf",
"65d2a116-3534-418d-a60d-8fbf63e086d0",
"62291a71-9c14-4fee-811b-406abf5dadec",
"87638823-adb0-4822-ad66-9cabdf0e0de4",
"e17a8389-5517-4c33-a5d7-17d93f0d00b4",
"a893069d-0b84-44e4-846c-24d59ece8fac",
"4c462ff6-8fd6-4c62-b668-ac87e700c9df",
"265c2f68-85fb-4f73-8643-8f419f5b9c62",
"2ccf7b4a-1a7f-4f9f-b729-751b9539eaf6",
"c7859f35-1c2e-46af-a50e-e52df147b53f"
],
"referenced_resources": [
"49ebe3d6-b733-4556-91ce-5adc6779f0b3"
]
}