Skip to main content

Animation

Animation

This file contains all the animation functionality. While in animation mode, you can create an animation sequence. After that, you may choose a selected frame or play the entire sequence.

BwApiAnimationSeek

Seek a cached frame.

Python

BwApi.AnimationSeek(time)

C++

BwApiAnimationSeek(time);

C#

BwApi.AnimationSeek(time);

Parameters

Param

Variable

Description

In

time

Seek a cached frame.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiAnimationSettingsUpdate

Update the current animation settings.

Python

BwApi.AnimationSettingsUpdate(animationJson)

C++

BwApiAnimationSettingsUpdate(animationJson);

C#

BwApi.AnimationSettingsUpdate(animationJson);

Parameters

Param

Variable

Description

In

animationJson

JSON object as string that represent an animation settings object (see settings.json schema).

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiAnimationSettingsGet

Get the current animation settings.

Python

BwApi.AnimationSettingsGet()

C++

BwApiAnimationSettingsGet(animationJson);

C#

BwApi.AnimationSettingsGet();

Parameters

Param

Variable

Description

Out

animationJson

JSON object as string that represent an animation settings object (see settings.json schema).

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiAnimationPlay

Play animation preview with or without the garment.

Python

BwApi.AnimationPlay(loop)

C++

BwApiAnimationPlay(loop);

C#

BwApi.AnimationPlay(loop);

Parameters

Param

Variable

Description

In

loop

Boolean.

Returns: Error/success code (see BwApiErrorCodes enum).

Note: The function triggers the event BW_API_EVENT_ANIMATION_READY for every cached frame.

---

BwApiAnimationPause

Pause the animation preview.

Python

BwApi.AnimationPause()

C++

BwApiAnimationPause();

C#

BwApi.AnimationPause();

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiAnimationExport

Export animation (mc/mdd/abc).

Python

BwApi.AnimationExport(outputFileName, presetName)

C++

BwApiAnimationExport(outputFileName, presetName);

C#

BwApi.AnimationExport(outputFileName, presetName);

Parameters

Param

Variable

Description

In

outputFileName

File to save the export.

In

presetName

Preset file name to use (will be loaded from <BwApiSpecialFolderGet(2)>\Commons\AnimationPresets\{PRESET_MAME}.exp).

Returns: Error/success code (see BwApiErrorCodes enum).

---

Did this answer your question?