Colorway
This file contains colorway functionality, you can clone colorway, delete colorway etc...
BwApiColorwayDelete
Delete an existing colorway.
Python
BwApi.ColorwayDelete(garmentId, colorwayId)
C++
BwApiColorwayDelete(garmentId, colorwayId);
C#
BwApi.ColorwayDelete(garmentId, colorwayId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | colorwayId | The colorway ID to delete. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiColorwayCurrentGet
Gets the current active colorway.
Python
BwApi.ColorwayCurrentGet(garmentId)
C++
BwApiColorwayCurrentGet(garmentId, colorwayId);
C#
BwApi.ColorwayCurrentGet(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | colorwayId | Active colorway ID. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiColorwayCurrentSet
Sets the current colorway.
Python
BwApi.ColorwayCurrentSet(garmentId, colorwayId)
C++
BwApiColorwayCurrentSet(garmentId, colorwayId);
C#
BwApi.ColorwayCurrentSet(garmentId, colorwayId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | colorwayId | Existing colorway ID. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiColorwayClone
Clone a colorway.
Python
BwApi.ColorwayClone(garmentId, colorwayId)
C++
BwApiColorwayClone(garmentId, colorwayId, newColorwayId);
C#
BwApi.ColorwayClone(garmentId, colorwayId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | colorwayId | The colorway ID to clone. |
Out | newColorwayId | The ID of the cloned colorway. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiColorwayMaterialIds
Get a list of material IDs from the given colorway ID.
Python
BwApi.ColorwayMaterialIds(garmentId, colorwayId)
C++
BwApiColorwayMaterialIds(garmentId, colorwayId, materialIds);
C#
BwApi.ColorwayMaterialIds(garmentId, colorwayId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | colorwayId | Existing colorway ID. |
Out | materialIds | Array of int containing the material IDs. |
Returns: error/success code (see BwApiErrorCodes enum).
Note: This function returns only front materials.
---
BwApiColorwayMaterialIdsEx
Get a list of material IDs from the given colorway ID.
Python
BwApi.ColorwayMaterialIdsEx(garmentId, colorwayId, materialsSide)
C++
BwApiColorwayMaterialIdsEx(garmentId, colorwayId, materialsSide, materialIds);
C#
BwApi.ColorwayMaterialIdsEx(garmentId, colorwayId, materialsSide);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | colorwayId | Existing colorway ID. |
In | materialsSide | The side of the materials. |
Out | materialIds | Array of int containing the material IDs. |
Returns: Error/success code (see BwApiErrorCodes enum).
Note: Updating front material will update the back as well.
---
BwApiColorwayNameGet
Get the name of the given colorway ID.
Python
BwApi.ColorwayNameGet(garmentId, colorwayId)
C++
BwApiColorwayNameGet(garmentId, colorwayId, colorwayName);
C#
BwApi.ColorwayNameGet(garmentId, colorwayId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | colorwayId | Existing colorway ID. |
Out | colorwayName | Name of the colorway. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiColorwayNameSet
Set the name of the given colorway ID.
Python
BwApi.ColorwayNameSet(garmentId, colorwayId, colorwayName)
C++
BwApiColorwayNameSet(garmentId, colorwayId, colorwayName);
C#
BwApi.ColorwayNameSet(garmentId, colorwayId, colorwayName);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | colorwayId | Existing colorway ID. |
In | colorwayName | Name of the colorway. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiColorwayColorsInUse
Get the colors in use in the given colorway.
Python
BwApi.ColorwayColorsInUse(garmentId, colorwayId)
C++
BwApiColorwayColorsInUse(garmentId, colorwayId, colors);
C#
BwApi.ColorwayColorsInUse(garmentId, colorwayId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | colorwayId | Existing colorway ID. |
Out | colors | JSON object as a string that represents a list of color object (see color.json schema). |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiColorwayColorsInUseUpdate
Replace a color from the color in use with another.
Python
BwApi.ColorwayColorsInUseUpdate(garmentId, colorwayId, srcColor, destColor)
C++
BwApiColorwayColorsInUseUpdate(garmentId, colorwayId, srcColor, destColor);
C#
BwApi.ColorwayColorsInUseUpdate(garmentId, colorwayId, srcColor, destColor);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | colorwayId | Existing colorway ID. |
In | srcColor | The source color. |
In | destColor | The destination color. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiColorwayUsedMaterialIds
Get a list of material IDs in use from the given colorway ID.
Python
BwApi.ColorwayUsedMaterialIds(garmentId, colorwayId)
C++
BwApiColorwayUsedMaterialIds(garmentId, colorwayId, materialIds);
C#
BwApi.ColorwayUsedMaterialIds(garmentId, colorwayId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | colorwayId | Existing colorway ID. |
Out | materialIds | Array of int containing the material IDs. |
Returns: Error/success code (see BwApiErrorCodes enum).
Note: This function returns only front materials.
---
BwApiColorwayUsedMaterialIdsEx
Get a list of material IDs in use from the given colorway ID.
Python
BwApi.ColorwayUsedMaterialIdsEx(garmentId, colorwayId, materialsSide)
C++
BwApiColorwayUsedMaterialIdsEx(garmentId, colorwayId, materialsSide, materialIds);
C#
BwApi.ColorwayUsedMaterialIdsEx(garmentId, colorwayId, materialsSide);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | colorwayId | Existing colorway ID. |
In | materialsSide | The side of the materials. |
Out | materialIds | Array of int containing the material IDs. |
Returns: Error/success code (see BwApiErrorCodes enum).
Note: Updating front material will update the back as well.
---
BwApiColorwayThumbnailExtract
Extract the thumbnail of the given colorway ID.
Python
BwApi.ColorwayThumbnailExtract(garmentId, colorwayId, path)
C++
BwApiColorwayThumbnailExtract(garmentId, colorwayId, path);
C#
BwApi.ColorwayThumbnailExtract(garmentId, colorwayId, path);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | colorwayId | Existing colorway ID. |
In | path | Path to the thumbnail output. |
Returns: Error/success code (see BwApiErrorCodes enum).
Note: If thumbnail doesn't exist, use BwApiColorwayThumbnailGenerate first.
---
BwApiColorwayThumbnailGenerate
Generate a thumbnail replacing existing thumbnail if one already exists.
Python
BwApi.ColorwayThumbnailGenerate(garmentId, colorwayId)
C++
BwApiColorwayThumbnailGenerate(garmentId, colorwayId);
C#
BwApi.ColorwayThumbnailGenerate(garmentId, colorwayId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | colorwayId | Existing colorway ID. |
Returns: Error/success code (see BwApiErrorCodes enum).
---