editor.animation

Animation sequence and montage editing

← API Reference

editor.animation.getInfo

Returns metadata about an animation sequence.

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path

Returns:

Name Type Description
asset_pathstringAsset path
namestringAnimation name
lengthnumberDuration in seconds
num_framesnumberTotal frame count
frame_ratestringFrame rate as fraction string
num_bonesnumberNumber of bone tracks
num_curvesnumberNumber of curves
num_notifiesnumberNumber of notifies
is_additiveboolWhether animation is additive
root_motion_enabledboolWhether root motion is enabled

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.animation.getInfo", "params": { "asset_path": "/Game/Animations/Anim_Run" } }

editor.animation.getCurves

Returns all curves in an animation sequence.

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path

Returns:

Name Type Description
asset_pathstringAsset path
curvesarrayEach: {curve_name, curve_type} (type is "float" or "transform")

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.animation.getCurves", "params": { "asset_path": "/Game/Animations/Anim_Run" } }

editor.animation.addCurve

Adds a new curve to an animation sequence.

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path
curve_namestringYesName for the new curve
curve_typestringNo"float", "vector", or "transform" (default "float")

Returns:

Name Type Description
successboolWhether curve was added
curve_namestringCurve name
curve_typestringCurve type

Example Request:

{
  "jsonrpc": "2.0", "id": 1, "method": "editor.animation.addCurve",
  "params": { "asset_path": "/Game/Animations/Anim_Run", "curve_name": "FootIK_Alpha", "curve_type": "float" }
}

editor.animation.removeCurve

Removes a curve from an animation sequence.

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path
curve_namestringYesCurve name to remove

Returns:

Name Type Description
successboolWhether curve was removed
curve_namestringRemoved curve name

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.animation.removeCurve", "params": { "asset_path": "/Game/Animations/Anim_Run", "curve_name": "FootIK_Alpha" } }

editor.animation.addCurveKey

Adds a key to a float curve in an animation sequence.

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path
curve_namestringYesTarget curve name
timenumberYesKey time in seconds
valuenumberYesKey value

Returns:

Name Type Description
successboolWhether key was added
curve_namestringCurve name
timenumberKey time
valuenumberKey value

Example Request:

{
  "jsonrpc": "2.0", "id": 1, "method": "editor.animation.addCurveKey",
  "params": { "asset_path": "/Game/Animations/Anim_Run", "curve_name": "FootIK_Alpha", "time": 0.5, "value": 1.0 }
}

editor.animation.getCurveKeys

Returns all keys in a specific curve.

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path
curve_namestringYesCurve name

Returns:

Name Type Description
asset_pathstringAsset path
curve_namestringCurve name
keysarrayEach: {time, value}

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.animation.getCurveKeys", "params": { "asset_path": "/Game/Animations/Anim_Run", "curve_name": "FootIK_Alpha" } }

editor.animation.getNotifies

Returns all animation notifies in a sequence.

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path

Returns:

Name Type Description
asset_pathstringAsset path
notifiesarrayEach: {notify_name, trigger_time, duration, track_name}

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.animation.getNotifies", "params": { "asset_path": "/Game/Animations/Anim_Run" } }

editor.animation.addNotify

Adds a notify at the specified time.

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path
notify_namestringYesNotify name
timenumberYesTrigger time in seconds
track_namestringNoTarget notify track (default: creates/uses default track)

Returns:

Name Type Description
successboolWhether notify was added
notify_namestringNotify name
timenumberTrigger time
track_namestringTrack where notify was placed

Example Request:

{
  "jsonrpc": "2.0", "id": 1, "method": "editor.animation.addNotify",
  "params": { "asset_path": "/Game/Animations/Anim_Run", "notify_name": "FootstepSound", "time": 0.25 }
}

editor.animation.removeNotify

Removes all notifies with the specified name.

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path
notify_namestringYesNotify name to remove

Returns:

Name Type Description
successboolWhether any notifies were removed
notify_namestringNotify name
removed_countnumberNumber of notifies removed

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.animation.removeNotify", "params": { "asset_path": "/Game/Animations/Anim_Run", "notify_name": "FootstepSound" } }

editor.animation.getNotifyTracks

Returns all notify tracks in an animation sequence.

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path

Returns:

Name Type Description
asset_pathstringAsset path
tracksarrayEach: {track_name, notify_count}

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.animation.getNotifyTracks", "params": { "asset_path": "/Game/Animations/Anim_Run" } }

editor.animation.addNotifyTrack

Adds a new notify track to an animation sequence.

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path
track_namestringYesName for the new track

Returns:

Name Type Description
successboolWhether track was created
track_namestringTrack name

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.animation.addNotifyTrack", "params": { "asset_path": "/Game/Animations/Anim_Run", "track_name": "SFX" } }

editor.animation.getBoneTracks

Returns all bone tracks in an animation sequence.

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path

Returns:

Name Type Description
asset_pathstringAsset path
bone_tracksarrayEach: {bone_name}

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.animation.getBoneTracks", "params": { "asset_path": "/Game/Animations/Anim_Run" } }

editor.animation.removeBoneTrack

Removes all animation data for a bone (and optionally its children).

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path
bone_namestringYesBone name to remove
include_childrenboolNoAlso remove child bone tracks (default true)

Returns:

Name Type Description
successboolWhether bone track was removed
bone_namestringBone name
include_childrenboolWhether children were included

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.animation.removeBoneTrack", "params": { "asset_path": "/Game/Animations/Anim_Run", "bone_name": "ik_foot_l", "include_children": false } }

editor.animation.getCompressionSettings

Returns compression settings for bones and curves.

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path

Returns:

Name Type Description
asset_pathstringAsset path
bone_compressionobject{name, class}
curve_compressionobject{name, class}

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.animation.getCompressionSettings", "params": { "asset_path": "/Game/Animations/Anim_Run" } }

editor.animation.setAdditiveType

Sets whether the animation is additive and its additive type.

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path
additive_typestringYesOne of: "none", "local_space", "mesh_space"

Returns:

Name Type Description
successboolWhether type was set
additive_typestringNew additive type

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.animation.setAdditiveType", "params": { "asset_path": "/Game/Animations/Anim_Hit", "additive_type": "local_space" } }

editor.animation.getRootMotionSettings

Returns root motion settings and lock type.

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path

Returns:

Name Type Description
asset_pathstringAsset path
root_motion_enabledboolWhether root motion is enabled
root_motion_lock_typestringOne of: "ref_pose", "anim_first_frame", "zero", "unknown"
force_root_lockboolWhether root lock is forced

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.animation.getRootMotionSettings", "params": { "asset_path": "/Game/Animations/Anim_Run" } }

editor.animation.getMetadata

Returns all metadata objects attached to an animation sequence.

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path

Returns:

Name Type Description
asset_pathstringAsset path
metadataarrayEach: {class_name, name}

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.animation.getMetadata", "params": { "asset_path": "/Game/Animations/Anim_Run" } }

editor.animation.addMetadata

Adds a metadata object of the specified class to the animation.

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path
metadata_classstringYesUAnimMetaData subclass name

Returns:

Name Type Description
successboolWhether metadata was added
metadata_classstringMetadata class name

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.animation.addMetadata", "params": { "asset_path": "/Game/Animations/Anim_Run", "metadata_class": "AnimMetaData_CurveCompressionSettings" } }

editor.animation.setPlayRate

Sets the playback rate scale for the animation.

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path
ratenumberYesPlayback rate multiplier

Returns:

Name Type Description
successboolWhether rate was set
ratenumberNew playback rate

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.animation.setPlayRate", "params": { "asset_path": "/Game/Animations/Anim_Run", "rate": 1.5 } }

editor.animation.getVirtualBones

Returns all virtual bones defined in the skeleton used by this animation.

Parameters:

Name Type Required Description
asset_pathstringYesAnimSequence asset path

Returns:

Name Type Description
asset_pathstringAsset path
virtual_bonesarrayEach: {virtual_bone_name, source_bone_name, target_bone_name}

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.animation.getVirtualBones", "params": { "asset_path": "/Game/Animations/Anim_Run" } }