ldk_keyframe_animation_apply

Sample and write all nonempty tracks to the subtree of a root entity.

LDK_API bool ldk_keyframe_animation_apply(
 const LDKKeyframeAnimation *clip,
 LDKEntity root,
 float time
);

Parameters

const LDKKeyframeAnimation *clip
Animation clip instance.
LDKEntity root
Entity used as the root for relative bindings.
float time
Time in seconds.

Returns

True if all tracks applied successfully; missing bindings are reported by false.

ldk_keyframe_animation_duration_set

Set duration without discarding keys or events.

LDK_API bool ldk_keyframe_animation_duration_set(
 LDKKeyframeAnimation *clip,
 float duration
);

Parameters

LDKKeyframeAnimation *clip
Animation clip instance.
float duration
Requested clip length in seconds.

Returns

False if invalid or any key/event would lie beyond duration.

ldk_keyframe_animation_event_add_integer

Insert an integer event marker at the specified second.

LDK_API bool ldk_keyframe_animation_event_add_integer(
 LDKKeyframeAnimation *clip,
 float time,
 i32 number
);

Parameters

LDKKeyframeAnimation *clip
Animation clip instance.
float time
Time in seconds.
i32 number
Integer event payload.

Returns

True on success; extends duration if needed.

ldk_keyframe_animation_event_add_string

Insert a string event marker, copying the supplied text.

LDK_API bool ldk_keyframe_animation_event_add_string(
 LDKKeyframeAnimation *clip,
 float time,
 const char *text
);

Parameters

LDKKeyframeAnimation *clip
Animation clip instance.
float time
Time in seconds.
const char *text
NUL-terminated event string.

Returns

True on success; extends duration if needed.

ldk_keyframe_animation_event_move

Change an event timestamp while preserving event ordering.

LDK_API bool ldk_keyframe_animation_event_move(
 LDKKeyframeAnimation *clip,
 u32 event_index,
 float new_time,
 u32 *out_index
);

Parameters

LDKKeyframeAnimation *clip
Animation clip instance.
u32 event_index
Zero-based event index.
float new_time
Requested new timestamp in seconds.
u32 *out_index
Optional output for the moved item index.

Returns

True on success; times beyond duration are rejected.

ldk_keyframe_animation_event_remove

Delete an event marker and its owned string.

LDK_API bool ldk_keyframe_animation_event_remove(
 LDKKeyframeAnimation *clip,
 u32 event_index
);

Parameters

LDKKeyframeAnimation *clip
Animation clip instance.
u32 event_index
Zero-based event index.

Returns

True if removed. Later event indices shift.

ldk_keyframe_animation_event_set_integer

Replace an event payload with an integer.

LDK_API bool ldk_keyframe_animation_event_set_integer(
 LDKKeyframeAnimation *clip,
 u32 event_index,
 i32 number
);

Parameters

LDKKeyframeAnimation *clip
Animation clip instance.
u32 event_index
Zero-based event index.
i32 number
Integer event payload.

Returns

True if the event existed.

ldk_keyframe_animation_event_set_string

Replace an event payload with a copied string.

LDK_API bool ldk_keyframe_animation_event_set_string(
 LDKKeyframeAnimation *clip,
 u32 event_index,
 const char *text
);

Parameters

LDKKeyframeAnimation *clip
Animation clip instance.
u32 event_index
Zero-based event index.
const char *text
NUL-terminated event string.

Returns

True on success; the old payload remains if allocation fails.

ldk_keyframe_animation_events_dispatch

Synchronously deliver all events crossed in (previous_time, current_time].

LDK_API void ldk_keyframe_animation_events_dispatch(
 const LDKKeyframeAnimation *clip,
 LDKEntity root,
 float previous_time,
 float current_time,
 LDKKeyframeEventFn fn,
 void *user
);

Parameters

const LDKKeyframeAnimation *clip
Animation clip instance.
LDKEntity root
Root entity containing the animation source.
float previous_time
Exclusive lower time bound in seconds.
float current_time
Inclusive upper time bound in seconds.
LDKKeyframeEventFn fn
Event callback.
void *user
Opaque callback context.

Returns

Nothing. Event payloads are temporary snapshots valid during each callback. Note: Callbacks may mutate or destroy the source; do not keep event pointers.

ldk_keyframe_animation_from_tml

Parse a version-2 TML animation into an initialized clip.

LDK_API bool ldk_keyframe_animation_from_tml(
 LDKKeyframeAnimation *clip,
 const char *source
);

Parameters

LDKKeyframeAnimation *clip
Animation clip instance.
const char *source
NUL-terminated TML input.

Returns

True on success; clip remains unchanged on failure.

ldk_keyframe_animation_key_move

Move a keyframe in time while keeping its value and chronological order.

LDK_API bool ldk_keyframe_animation_key_move(
 LDKKeyframeAnimation *clip,
 u32 track,
 u32 key,
 float new_time,
 u32 *out_index
);

Parameters

LDKKeyframeAnimation *clip
Animation clip instance.
u32 track
Zero-based track index or track description.
u32 key
Zero-based keyframe index.
float new_time
Requested new timestamp in seconds.
u32 *out_index
Optional output for the moved item index.

Returns

True on success. Rejects collisions and times beyond duration.

ldk_keyframe_animation_key_remove

Remove a keyframe from a track.

LDK_API bool ldk_keyframe_animation_key_remove(
 LDKKeyframeAnimation *clip,
 u32 track,
 u32 key
);

Parameters

LDKKeyframeAnimation *clip
Animation clip instance.
u32 track
Zero-based track index or track description.
u32 key
Zero-based keyframe index.

Returns

True if removed. Subsequent key indices shift.

ldk_keyframe_animation_key_set

Insert or update a typed keyframe at the specified second.

LDK_API bool ldk_keyframe_animation_key_set(
 LDKKeyframeAnimation *clip,
 u32 track,
 float time,
 LDKPropertyValue value
);

Parameters

LDKKeyframeAnimation *clip
Animation clip instance.
u32 track
Zero-based track index or track description.
float time
Time in seconds.
LDKPropertyValue value
Type-tagged property value.

Returns

True on success; may extend clip duration. Requires available component metadata. Note: Reflected component metadata must be registered when authoring.

ldk_keyframe_animation_load

Load a clip from the configured asset source.

LDK_API bool ldk_keyframe_animation_load(
 LDKKeyframeAnimation *clip,
 const char *asset_path
);

Parameters

LDKKeyframeAnimation *clip
Animation clip instance.
const char *asset_path
Logical .anim asset path.

Returns

True on success; existing clip remains unchanged on failure.

ldk_keyframe_animation_save

Save a clip as TML through the configured asset source.

LDK_API bool ldk_keyframe_animation_save(
 const LDKKeyframeAnimation *clip,
 const char *asset_path
);

Parameters

const LDKKeyframeAnimation *clip
Animation clip instance.
const char *asset_path
Logical .anim asset path.

Returns

True if successfully serialized and written.

ldk_keyframe_animation_to_tml

Serialize a structurally valid clip to TML version 2.

LDK_API bool ldk_keyframe_animation_to_tml(
 const LDKKeyframeAnimation *clip,
 char **out_source
);

Parameters

const LDKKeyframeAnimation *clip
Animation clip instance.
char **out_source
Receives a newly allocated NUL-terminated TML buffer.

Returns

True on success. Caller must free *out_source.

ldk_keyframe_animation_validate

Validate a clip independently of the ECS and reflected metadata.

LDK_API bool ldk_keyframe_animation_validate(const LDKKeyframeAnimation *clip);

Parameters

const LDKKeyframeAnimation *clip
Animation clip instance.

Returns

True if the duration, tracks, keys and events are structurally valid.

ldk_keyframe_animation_value_from_entity

Read the current component value addressed by a track.

LDK_API bool ldk_keyframe_animation_value_from_entity(
 LDKEntity entity,
 const LDKKeyframeTrack *track,
 LDKPropertyValue *out_value
);

Parameters

LDKEntity entity
Target ECS entity.
const LDKKeyframeTrack *track
Zero-based track index or track description.
LDKPropertyValue *out_value
Receives the sampled property value.

Returns

True if the editable reflected field exists and can be read.