Snapshot
Load a snapshot.
BwApiSnapshotLoad
Load a snapshot.
Python
BwApi.SnapshotLoad(garmentId, snapshotId)
C++
BwApiSnapshotLoad(garmentId, snapshotId);
C#
BwApi.SnapshotLoad(garmentId, snapshotId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | snapshotId | Existing snapshot ID. |
Returns: Error/success code (see BwApiErrorCodes enum).
Note: Loading a snapshot always uses the current colorway.
---
BwApiSnapshotLoadEx
Load a snapshot with properties.
Python
BwApi.SnapshotLoadEx(garmentId, loadSnapshotJson, snapshotId)
C++
BwApiSnapshotLoadEx(garmentId, loadSnapshotJson, snapshotId);
C#
BwApi.SnapshotLoadEx(garmentId, loadSnapshotJson, snapshotId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | loadSnapshotJson | JSON object as a string containing properties for loading a snapshot (see load_snapshot.json). |
In | snapshotId | Existing snapshot ID. |
Returns: Error/success code (see BwApiErrorCodes enum).
Note: Loading a snapshot always uses the current colorway.
---
BwApiSnapshotSave
Save the current simulation state as a snapshot.
Python
BwApi.SnapshotSave(garmentId, name)
C++
BwApiSnapshotSave(garmentId, name, snapshotId);
C#
BwApi.SnapshotSave(garmentId, name);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | name | The name of the snapshot. |
Out | snapshotId | The ID of the snapshot. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiSnapshotInfoGet
Get information on a given snapshot.
Python
BwApi.SnapshotInfoGet(garmentId, snapshotId)
C++
BwApiSnapshotInfoGet(garmentId, snapshotId, info);
C#
BwApi.SnapshotInfoGet(garmentId, snapshotId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | snapshotId | Existing snapshot ID. |
Out | info | JSON object as a string that represents a snapshot (see snapshot_info.json schema). |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiSnapshotDelete
Delete a snapshot.
Python
BwApi.SnapshotDelete(garmentId, snapshotId)
C++
BwApiSnapshotDelete(garmentId, snapshotId);
C#
BwApi.SnapshotDelete(garmentId, snapshotId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | snapshotId | Existing snapshot ID. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiSnapshotThumbnailGet
Export a snapshot thumbnail.
Python
BwApi.SnapshotThumbnailGet(garmentId, snapshotId, path)
C++
BwApiSnapshotThumbnailGet(garmentId, snapshotId, path);
C#
BwApi.SnapshotThumbnailGet(garmentId, snapshotId, path);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | snapshotId | Existing snapshot ID. |
In | path | Path to the thumbnail output. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiSnapshotRename
Rename a snapshot.
Python
BwApi.SnapshotRename(garmentId, snapshotId, newSnapshotName)
C++
BwApiSnapshotRename(garmentId, snapshotId, newSnapshotName);
C#
BwApi.SnapshotRename(garmentId, snapshotId, newSnapshotName);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | snapshotId | Existing snapshot ID. |
In | newSnapshotName | New snapshot name. |
Returns: Error/success code (see BwApiErrorCodes enum).
---