Namespace: Animation

DuIO. Animation

Animation IO

Methods

staticDuIO.Animation.cleanExportData(data){object}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 29921
Cleans data from an After Effects animation before exporting it.
This is a low-level function which you may need only if building your own export formats.
It cleans the data returned by the "getAnim" functions (see DuAELayer.getAnim, DuAELayer.getAnims, DuAEProperty.getAnim) to be able to store it in a text file.
Name Type Description
data object The animation
Returns:
Type Description
object The data cleaned

staticDuIO.Animation.cleanImportData(data){object}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 29958
Cleans data from a JSON before loading it.
This is a low-level function which you may need only if building your own import formats.
It cleans the data stored after having used DuAEF.Interchange.animation.cleanAnimExportData
to be able to set the animations using the "setAnim" functions (see DuAEF.DuAE.Layer.setAnim, DuAEF.DuAE.Property.setAnim).
Name Type Description
data object The animation
Returns:
Type Description
object The data cleaned

staticDuIO.Animation.fromJson(jsonFile, layers, keyframesOnly, matchNames, offset, reverse)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 29893
Loads an animation file and applies it on the layers
Name Type Default Description
jsonFile File The file containing the animation
layers Array.<Layer> | DuList.<Layer> | LayerCollection optional The layers. If omitted, will get the selected layers from the current comp, or all layers if none are selected.
keyframesOnly Boolean false optional If true, will load only keyframes, but not static values or expressions.
matchNames Array.<string> [] optional A filter for the properties to load. If empty, will load all properties.
offset Boolean false optional Whether to offset the current values or use absolute values.
reverse Boolean false optional Whether to reverse the keyframes in time.

staticDuIO.Animation.keyframeInterpolationTypeToName(type){string}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 30041
Gets the name of an After Effects interpolation type.
This is a low-level function which you should not need.
It used by DuIO.Animation.cleanAnimExportData to store interpolation with their names.
Name Type Description
type KeyframeInterpolationType The After Effects interpolation type
Returns:
Type Description
string The interpolation name or empty string if not found

staticDuIO.Animation.paste(data, comp, replace, offset, reverse, matchNames, keyframesOnly, expressions)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 29765
Pastes the animation previously copied by Duik.Animation.copy to the selected properties.
Name Type Default Description
data Array.<DuAELayerAnimation> The animation data to paste
comp CompItem optional The composition.
replace Boolean false optional Whether to completely erase and replace the current animation
offset Boolean false optional Whether to offset the animation from the current value
reverse Boolean false optional Whether to reverse the animation
matchNames Array.<string> [] optional A filter to apply only on specific property types
keyframesOnly Boolean true optional If false, the value of properties without keyframes will be set too.
expressions Boolean false optional If true, the expression is set too.

staticDuIO.Animation.toJson(file, layers, selectedKeysOnly, timeRange){Array.<DuAELayerAnimation>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 29850
Copies all the animations on selected layers, and saves them to a Json file.
Name Type Description
file File The file to save the data
layers Array.<Layer> | DuList.<Layer> | LayerCollection optional An array of Layers or LayerCollection with the animation. Selected layers from the current comp if omitted.
selectedKeysOnly Boolean optional Wether to copy only selected keys or not. If omitted, will be true if there are selected keyframes, false otherwise.
timeRange Array.<float> optional The time range, an array of two time values, in seconds. If omitted, will use the keyframes if some are selected, or the work area of the comp.
Returns:
Type Description
Array.<DuAELayerAnimation> The animations