MaterialContainerIds
Gets the materialContainer IDs of the current active garment and the current colorway.
Python C++ C# VS Server
Python
BwApi.MaterialContainerIds(garmentId)
C++
BwApiMaterialContainerIds(garmentId);
C#
BwApi.MaterialContainerIds(garmentId);
VS Server
{
"id": "API processing order number",
"function": "MaterialContainerIds",
"params": {
"garmentId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
Out | materialContainerIds | Array of int containing the materialContainer IDs |
Error/success code (see BwApiErrorCodes enum).
Only visible material containers will be returned.
MaterialContainerCreate
Creates a new material container and assigns it to a shape in the current colorway.
Python C++ C# VS Server
Python
BwApi.MaterialContainerCreate(garmentId, shapeId, materialId, transformation, drawPlace)
C++
BwApiMaterialContainerCreate(garmentId, shapeId, materialId, transformation, drawPlace);
C#
BwApi.MaterialContainerCreate(garmentId, shapeId, materialId, transformation, drawPlace);
VS Server
{
"id": "API processing order number",
"function": "MaterialContainerCreate",
"params": {
"garmentId": "value",
"shapeId": "value",
"materialId": "value",
"transformation": "value",
"drawPlace": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | shapeId | Existing shape ID |
In | materialId | Existing material ID |
In | transformation | Material container transformation (see BwApiTransformation) |
In | drawPlace | Where to draw the material container: on the inside or outside layer |
Out | materialContainerId | The ID of the newly created material container |
Error/success code (see BwApiErrorCodes enum).
Artwork and piece assignable will be accpeted as a material.
The dimensions won't be affected.
Use BwApiShapeCenterGet to create the material container relative from center.
MaterialContainerDelete
Delete a material container within the current colorway.
Python C++ C# VS Server
Python
BwApi.MaterialContainerDelete(garmentId, materialContainerId)
C++
BwApiMaterialContainerDelete(garmentId, materialContainerId);
C#
BwApi.MaterialContainerDelete(garmentId, materialContainerId);
VS Server
{
"id": "API processing order number",
"function": "MaterialContainerDelete",
"params": {
"garmentId": "value",
"materialContainerId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | materialContainerId | Existing material container ID |
Error/success code (see BwApiErrorCodes enum).
MaterialContainerDrawingPlaceGet
Get the drawing place (inside / outside) of the given material container.
Python C++ C# VS Server
Python
BwApi.MaterialContainerDrawingPlaceGet(garmentId, materialContainerId)
C++
BwApiMaterialContainerDrawingPlaceGet(garmentId, materialContainerId);
C#
BwApi.MaterialContainerDrawingPlaceGet(garmentId, materialContainerId);
VS Server
{
"id": "API processing order number",
"function": "MaterialContainerDrawingPlaceGet",
"params": {
"garmentId": "value",
"materialContainerId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | materialContainerId | Existing material container |
Out | drawPlace | Draw place of the material container |
Error/success code (see BwApiErrorCodes enum).
This function looks for the material in the current colorway.
MaterialContainerDrawingPlaceSet
Set the drawing place (inside / outside) of the given material container.
Python C++ C# VS Server
Python
BwApi.MaterialContainerDrawingPlaceSet(garmentId, materialContainerId, drawPlace)
C++
BwApiMaterialContainerDrawingPlaceSet(garmentId, materialContainerId, drawPlace);
C#
BwApi.MaterialContainerDrawingPlaceSet(garmentId, materialContainerId, drawPlace);
VS Server
{
"id": "API processing order number",
"function": "MaterialContainerDrawingPlaceSet",
"params": {
"garmentId": "value",
"materialContainerId": "value",
"drawPlace": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | materialContainerId | Existing material container |
In | drawPlace | Draw place of the material container |
Error/success code (see BwApiErrorCodes enum).
This function looks for the material in the current colorway.
MaterialContainerRelatedShapesIds
Get all the related shapes of the given material container.
Python C++ C# VS Server
Python
BwApi.MaterialContainerRelatedShapesIds(garmentId, materialContainerId)
C++
BwApiMaterialContainerRelatedShapesIds(garmentId, materialContainerId);
C#
BwApi.MaterialContainerRelatedShapesIds(garmentId, materialContainerId);
VS Server
{
"id": "API processing order number",
"function": "MaterialContainerRelatedShapesIds",
"params": {
"garmentId": "value",
"materialContainerId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | materialContainerId | Existing material container |
Out | shapeIds | Array of shape IDs |
Error/success code (see BwApiErrorCodes enum).
This function looks for the material in the current colorway.
MaterialContainerMaterialIdGet
Get the material ID associated with a material container.
Python C++ C# VS Server
Python
BwApi.MaterialContainerMaterialIdGet(garmentId, materialContainerId)
C++
BwApiMaterialContainerMaterialIdGet(garmentId, materialContainerId);
C#
BwApi.MaterialContainerMaterialIdGet(garmentId, materialContainerId);
VS Server
{
"id": "API processing order number",
"function": "MaterialContainerMaterialIdGet",
"params": {
"garmentId": "value",
"materialContainerId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | materialContainerId | Existing material container |
Out | materialId | Get the assigned material ID |
Error/success code (see BwApiErrorCodes enum).
This function looks for the material in the current colorway.
MaterialContainerTransformationGet
Get a material container's transformation properties.
Python C++ C# VS Server
Python
BwApi.MaterialContainerTransformationGet(garmentId, materialContainerId, shapeId, sizeId)
C++
BwApiMaterialContainerTransformationGet(garmentId, materialContainerId, shapeId, sizeId);
C#
BwApi.MaterialContainerTransformationGet(garmentId, materialContainerId, shapeId, sizeId);
VS Server
{
"id": "API processing order number",
"function": "MaterialContainerTransformationGet",
"params": {
"garmentId": "value",
"materialContainerId": "value",
"shapeId": "value",
"sizeId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | materialContainerId | Existing material container ID |
In | shapeId | Existing shape ID |
In | sizeId | Size of the garment |
Out | transformation | Transformation (see BwApiTransformation) |
Error/success code (see BwApiErrorCodes enum).
The transformation is relative to the shape with ID shapeId.
This function looks for the material in the current colorway.
MaterialContainerTransformationSet
Set a material container's transformation properties.
Python C++ C# VS Server
Python
BwApi.MaterialContainerTransformationSet(garmentId, materialContainerId, shapeId, sizeId, transformation)
C++
BwApiMaterialContainerTransformationSet(garmentId, materialContainerId, shapeId, sizeId, transformation);
C#
BwApi.MaterialContainerTransformationSet(garmentId, materialContainerId, shapeId, sizeId, transformation);
VS Server
{
"id": "API processing order number",
"function": "MaterialContainerTransformationSet",
"params": {
"garmentId": "value",
"materialContainerId": "value",
"shapeId": "value",
"sizeId": "value",
"transformation": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | materialContainerId | Existing material container ID |
In | shapeId | Existing shape ID |
In | sizeId | Size of the garment |
In | transformation | Shape transformation (see BwApiTransformation) |
Error/success code (see BwApiErrorCodes enum).
Use BwApiMaterialContainerTransformationGet first to get the current values, update the struct and only then call BwApiMaterialContainerTransformationSet with the updated struct.
The transformation is relative to the shape with ID shapeId.
This function looks for the material in the current colorway.
When transforming a material all the material containers will be affected.
To move only this specific material container call BwApiMaterialContainerAutoPositionsSet with 0 to unlink it before calling this function.
MaterialContainerAutoPositionsGet
Get material container's auto positions state.
Python C++ C#
Python
BwApi.MaterialContainerAutoPositionsGet(garmentId, materialContainerId)
C++
BwApiMaterialContainerAutoPositionsGet(garmentId, materialContainerId);
C#
BwApi.MaterialContainerAutoPositionsGet(garmentId, materialContainerId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | materialContainerId | Existing material container ID |
Out | autoPositions | 1 - material container position is linked to other in group, 0 - not linked |
Error/success code (see BwApiErrorCodes enum).
Calling TransformationSet can move other material container sizes in the same group if AutoPositions is 1 (default behaviour).
MaterialContainerAutoPositionsSet
Set material container's auto positions state.
Python C++ C#
Python
BwApi.MaterialContainerAutoPositionsSet(garmentId, materialContainerId)
C++
BwApiMaterialContainerAutoPositionsSet(garmentId, materialContainerId);
C#
BwApi.MaterialContainerAutoPositionsSet(garmentId, materialContainerId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | materialContainerId | Existing material container ID |
Out | autoPositions | 1 - material container position is linked to other in group, 0 - not linked |
Error/success code (see BwApiErrorCodes enum).
Calling TransformationSet can move other material container sizes in the same group if they are linked together.
Turning auto position off will allow setting each material container position individially.
MaterialContainerTypeGet
Gets a material container type.
Python C++ C# VS Server
Python
BwApi.MaterialContainerTypeGet(garmentId, materialContainerId)
C++
BwApiMaterialContainerTypeGet(garmentId, materialContainerId);
C#
BwApi.MaterialContainerTypeGet(garmentId, materialContainerId);
VS Server
{
"id": "API processing order number",
"function": "MaterialContainerTypeGet",
"params": {
"garmentId": "value",
"materialContainerId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | materialContainerId | Existing material container ID |
Out | type | The material container type (the result is bitwise and may contains various type: see BwApiMaterialContainerType) |
Error/success code (see BwApiErrorCodes enum).
This function looks for the material in the current colorway.
MaterialContainerTypeSet
Sets a material container type.
Python C++ C# VS Server
Python
BwApi.MaterialContainerTypeSet(garmentId, materialContainerId, type)
C++
BwApiMaterialContainerTypeSet(garmentId, materialContainerId, type);
C#
BwApi.MaterialContainerTypeSet(garmentId, materialContainerId, type);
VS Server
{
"id": "API processing order number",
"function": "MaterialContainerTypeSet",
"params": {
"garmentId": "value",
"materialContainerId": "value",
"type": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | materialContainerId | Existing material container ID |
In | type | The material container type (the result is bitwise and may contains various type: see BwApiMaterialContainerType) |
Error/success code (see BwApiErrorCodes enum).
This function looks for the material in the current colorway.
MaterialContainerShowIn2DGet
Check if material container is visible in the 2D window or not.
Python C++ C# VS Server
Python
BwApi.MaterialContainerShowIn2DGet(garmentId, materialContainerId)
C++
BwApiMaterialContainerShowIn2DGet(garmentId, materialContainerId);
C#
BwApi.MaterialContainerShowIn2DGet(garmentId, materialContainerId);
VS Server
{
"id": "API processing order number",
"function": "MaterialContainerShowIn2DGet",
"params": {
"garmentId": "value",
"materialContainerId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | materialContainerId | Existing material container ID |
Out | show | 1 - material container is visible, 0 - not visible |
Error/success code (see BwApiErrorCodes enum).
MaterialContainerShowIn2DSet
Show(1) or hide(0) the material container in the 2D window.
Python C++ C# VS Server
Python
BwApi.MaterialContainerShowIn2DSet(garmentId, materialContainerId, show)
C++
BwApiMaterialContainerShowIn2DSet(garmentId, materialContainerId, show);
C#
BwApi.MaterialContainerShowIn2DSet(garmentId, materialContainerId, show);
VS Server
{
"id": "API processing order number",
"function": "MaterialContainerShowIn2DSet",
"params": {
"garmentId": "value",
"materialContainerId": "value",
"show": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | materialContainerId | Existing shape ID |
In | show | 1 - show the material container, 0 - hide the material container |
Error/success code (see BwApiErrorCodes enum).
MaterialContainerLockGet
Check if the material container is locked(1) or unlocked(0).
Python C++ C# VS Server
Python
BwApi.MaterialContainerLockGet(garmentId, materialContainerId)
C++
BwApiMaterialContainerLockGet(garmentId, materialContainerId);
C#
BwApi.MaterialContainerLockGet(garmentId, materialContainerId);
VS Server
{
"id": "API processing order number",
"function": "MaterialContainerLockGet",
"params": {
"garmentId": "value",
"materialContainerId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | materialContainerId | Existing material container ID |
Out | lock | 1 - material container is locked, 0 - not locked |
Error/success code (see BwApiErrorCodes enum).
MaterialContainerLockSet
Lock(1) or unlock(0) the material container.
Python C++ C# VS Server
Python
BwApi.MaterialContainerLockSet(garmentId, materialContainerId, lock)
C++
BwApiMaterialContainerLockSet(garmentId, materialContainerId, lock);
C#
BwApi.MaterialContainerLockSet(garmentId, materialContainerId, lock);
VS Server
{
"id": "API processing order number",
"function": "MaterialContainerLockSet",
"params": {
"garmentId": "value",
"materialContainerId": "value",
"lock": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | materialContainerId | Existing materialContainerId ID |
In | lock | 1 - lock the materialContainerId, 0 - unlock the materialContainerId |
Error/success code (see BwApiErrorCodes enum).