Skip to main content

Material

Material

This file contains all the material functionality, you can create fabric, seam, artwork, trim and add them to a colorway table.

BwApiMaterialCreate

Create a new material.

Python

BwApi.MaterialCreate(garmentId, colorwayId, materialJson)

C++

BwApiMaterialCreate(garmentId, colorwayId, materialJson, materialId);

C#

BwApi.MaterialCreate(garmentId, colorwayId, materialJson);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialJson

JSON object as string that represent a material object (see Schema/u3m/1.1/u3m_schema.json schema).

Out

materialId

Newly created material ID.

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

---

BwApiMaterialClone

Clone a material.

Python

BwApi.MaterialClone(garmentId, colorwayId, materialId, destColorwayId)

C++

BwApiMaterialClone(garmentId, colorwayId, materialId, destColorwayId, newMaterialId);

C#

BwApi.MaterialClone(garmentId, colorwayId, materialId, destColorwayId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID of the existing material.

In

materialId

Existing material ID to clone.

In

destColorwayId

Destination colorway ID of the cloned material (colorway must be exist. the value can be the same as colorwayId param to clone to the same colorway).

Out

newMaterialId

Newly cloned material ID.

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

---

BwApiMaterialDelete

Delete a material.

Python

BwApi.MaterialDelete(garmentId, colorwayId, materialId)

C++

BwApiMaterialDelete(garmentId, colorwayId, materialId);

C#

BwApi.MaterialDelete(garmentId, colorwayId, materialId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialId

Existing material ID to delete.

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

---

BwApiMaterialGet

Get a material object.

Python

BwApi.MaterialGet(garmentId, colorwayId, materialId)

C++

BwApiMaterialGet(garmentId, colorwayId, materialId, materialJson);

C#

BwApi.MaterialGet(garmentId, colorwayId, materialId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialId

Existing material ID.

Out

materialJson

Material JSON object as string containing all the material's information (see Schema/u3m/1.1/u3m_schema.json schema).

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

---

BwApiMaterialUpdate

Update a material object.

Python

BwApi.MaterialUpdate(garmentId, colorwayId, materialId, materialJson)

C++

BwApiMaterialUpdate(garmentId, colorwayId, materialId, materialJson);

C#

BwApi.MaterialUpdate(garmentId, colorwayId, materialId, materialJson);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialId

Existing material ID.

In

materialJson

Material JSON object as string containing all the material's information (see Schema/u3m/1.1/u3m_schema.json schema).

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

---

BwApiMaterialSurfaceAreaGet

Get the total surface area for all visible shapes using this fabric type material.

Python

BwApi.MaterialSurfaceAreaGet(garmentId, colorwayId, materialId, size)

C++

BwApiMaterialSurfaceAreaGet(garmentId, colorwayId, materialId, size, area);

C#

BwApi.MaterialSurfaceAreaGet(garmentId, colorwayId, materialId, size);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialId

Existing material ID.

In

size

Size of the garment.

Out

area

Area of the material in total.

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

Note: If a shape is intersect by a Design Line and every part of the shape is in diffrent fabric, Only the relevant area are taking into account in the material surface area calculation.

---

BwApiMaterialLengthGet

Get the material's length and depth for all visible seam type materials.

Python

BwApi.MaterialLengthGet(garmentId, colorwayId, materialId, size)

C++

BwApiMaterialLengthGet(garmentId, colorwayId, materialId, size, length, depth);

C#

BwApi.MaterialLengthGet(garmentId, colorwayId, materialId, size);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialId

Existing material ID.

In

size

Size of the garment.

Out

length

Length of the material.

Out

depth

Depth of the material.

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

Note: Use this method for edge fabrics (seam).

---

BwApiMaterialBoundingBoxGet

Get the material's width, height and count for all visible artwork type materials / trim (3D object).

Python

BwApi.MaterialBoundingBoxGet(garmentId, colorwayId, materialId, sizeId)

C++

BwApiMaterialBoundingBoxGet(garmentId, colorwayId, materialId, sizeId, width, height, count);

C#

BwApi.MaterialBoundingBoxGet(garmentId, colorwayId, materialId, sizeId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialId

Existing material ID.

In

sizeId

Size of the garment.

Out

width

Width of the material.

Out

height

Height of the material.

Out

count

Count of this material.

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

Note: Use this method for artwork and trims (3D object).

---

BwApiMaterialGroup

Check if a material is group material or not.

Python

BwApi.MaterialGroup(garmentId, colorwayId, materialId)

C++

BwApiMaterialGroup(garmentId, colorwayId, materialId, group);

C#

BwApi.MaterialGroup(garmentId, colorwayId, materialId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialId

Existing material ID.

Out

group

Whether this material is group material or not.

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

---

BwApiMaterialGroupCreate

Creates a new group material.

Python

BwApi.MaterialGroupCreate(garmentId, colorwayId, materialGroupJson)

C++

BwApiMaterialGroupCreate(garmentId, colorwayId, materialGroupJson, materialGroupId);

C#

BwApi.MaterialGroupCreate(garmentId, colorwayId, materialGroupJson);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialGroupJson

JSON material group JSON object as string containing all the material's group information (see Schema/u3m/1.0/group.json schema).

Out

materialGroupId

Newly created group material ID.

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

Note: Physics of group material default is the first material.

---

BwApiMaterialGroupDelete

Delete a group material.

Python

BwApi.MaterialGroupDelete(garmentId, colorwayId, materialGroupId)

C++

BwApiMaterialGroupDelete(garmentId, colorwayId, materialGroupId);

C#

BwApi.MaterialGroupDelete(garmentId, colorwayId, materialGroupId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialGroupId

Existing group material ID to delete.

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

Note: Delete all materials.

---

BwApiMaterialGroupGet

Get a material group object.

Python

BwApi.MaterialGroupGet(garmentId, colorwayId, materialGroupId)

C++

BwApiMaterialGroupGet(garmentId, colorwayId, materialGroupId, materialGroupJson);

C#

BwApi.MaterialGroupGet(garmentId, colorwayId, materialGroupId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialGroupId

Existing material ID.

Out

materialGroupJson

JSON material group JSON object as string containing all the material's group information (see Schema/u3m/1.0/group.json schema).

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

---

BwApiMaterialGroupUpdate

Update a group material object.

Python

BwApi.MaterialGroupUpdate(garmentId, colorwayId, materialGroupId, materialGroupJson)

C++

BwApiMaterialGroupUpdate(garmentId, colorwayId, materialGroupId, materialGroupJson);

C#

BwApi.MaterialGroupUpdate(garmentId, colorwayId, materialGroupId, materialGroupJson);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialGroupId

Existing material ID.

In

materialGroupJson

JSON material group JSON object as string containing all the material's group information (see Schema/u3m/1.0/group.json schema). @warning This function doesn't update group materials and group type.

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

---

BwApiMaterialGroupItemAdd

Add a material item to a group material.

Python

BwApi.MaterialGroupItemAdd(garmentId, colorwayId, materialGroupId, materialId, role)

C++

BwApiMaterialGroupItemAdd(garmentId, colorwayId, materialGroupId, materialId, role);

C#

BwApi.MaterialGroupItemAdd(garmentId, colorwayId, materialGroupId, materialId, role);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialGroupId

Existing group material.

In

materialId

Existing material ID to add to group.

In

role

The role of the material. Can be passed as none (i.e. role can be pullcord for zipper).

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

Note: Always place the material at the end of the materials.

---

BwApiMaterialGroupItemGet

Get a material as JSON from the given group or a section incase of a trim3d.

Python

BwApi.MaterialGroupItemGet(garmentId, colorwayId, materialGroupId, materialId)

C++

BwApiMaterialGroupItemGet(garmentId, colorwayId, materialGroupId, materialId, materialJson);

C#

BwApi.MaterialGroupItemGet(garmentId, colorwayId, materialGroupId, materialId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialGroupId

Existing group material.

In

materialId

Existing material ID to get from the group or the section ID incase of trim3d.

Out

materialJson

JSON object as string that represent a material object (see Schema/u3m/1.1/u3m_schema.json schema).

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

---

BwApiMaterialGroupItemUpdate

Update a material item in a group material or a section incase of a trim3d.

Python

BwApi.MaterialGroupItemUpdate(garmentId, colorwayId, materialGroupId, materialId, materialJson)

C++

BwApiMaterialGroupItemUpdate(garmentId, colorwayId, materialGroupId, materialId, materialJson);

C#

BwApi.MaterialGroupItemUpdate(garmentId, colorwayId, materialGroupId, materialId, materialJson);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialGroupId

Existing group material.

In

materialId

Existing material ID to add to group or section ID incase of trim3d.

In

materialJson

JSON object as string that represent a material object (see material_group_item.json schema).

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

---

BwApiMaterialGroupItemRemove

Remove a material from the group.

Python

BwApi.MaterialGroupItemRemove(garmentId, colorwayId, materialGroupId, materialId)

C++

BwApiMaterialGroupItemRemove(garmentId, colorwayId, materialGroupId, materialId);

C#

BwApi.MaterialGroupItemRemove(garmentId, colorwayId, materialGroupId, materialId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialGroupId

Existing group material.

In

materialId

Existing group material ID to remove.

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

Note: Section cannot be removed from a trim3D.

---

BwApiMaterialGroupItemIds

Get a material group material IDs or the section IDs incase of trim3d.

Python

BwApi.MaterialGroupItemIds(garmentId, colorwayId, materialGroupId)

C++

BwApiMaterialGroupItemIds(garmentId, colorwayId, materialGroupId, materialIds);

C#

BwApi.MaterialGroupItemIds(garmentId, colorwayId, materialGroupId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialGroupId

Existing group material.

Out

materialIds

Existing group material IDs or sections IDs incase of trim3d.

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

---

BwApiMaterialTrim3d

Checks if a material is a Trim 3D material or not.

Python

BwApi.MaterialTrim3d(garmentId, colorwayId, materialId)

C++

BwApiMaterialTrim3d(garmentId, colorwayId, materialId, isTrim3D);

C#

BwApi.MaterialTrim3d(garmentId, colorwayId, materialId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialId

Existing material ID.

Out

isTrim3D

Whether this material is trim 3d material or not.

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

---

BwApiMaterialTrim3dSectionsCount

Gets the amount of sections in Trim 3D.

Python

BwApi.MaterialTrim3dSectionsCount(garmentId, colorwayId, materialId)

C++

BwApiMaterialTrim3dSectionsCount(garmentId, colorwayId, materialId, sectionsCount);

C#

BwApi.MaterialTrim3dSectionsCount(garmentId, colorwayId, materialId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialId

Existing material ID.

Out

sectionsCount

The amount of sections in the Trim 3d.

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

---

BwApiMaterialTrim3dSectionNameGet

Gets the name of section in Trim 3D.

Python

BwApi.MaterialTrim3dSectionNameGet(garmentId, colorwayId, materialId, sectionIndex)

C++

BwApiMaterialTrim3dSectionNameGet(garmentId, colorwayId, materialId, sectionIndex, sectionName);

C#

BwApi.MaterialTrim3dSectionNameGet(garmentId, colorwayId, materialId, sectionIndex);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialId

Existing material ID.

In

sectionIndex

Section Index.

Out

sectionName

The name of the entry.

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

---

BwApiMaterialTrim3dSectionDiffuseColorGet

Gets the diffuse color of section in Trim 3D.

Python

BwApi.MaterialTrim3dSectionDiffuseColorGet(garmentId, colorwayId, materialId, sectionIndex)

C++

BwApiMaterialTrim3dSectionDiffuseColorGet(garmentId, colorwayId, materialId, sectionIndex, diffuseColor);

C#

BwApi.MaterialTrim3dSectionDiffuseColorGet(garmentId, colorwayId, materialId, sectionIndex);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialId

Existing material ID.

In

sectionIndex

Section Index.

Out

diffuseColor

The diffuse color of the entry.

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

---

BwApiMaterialTrim3dSectionDiffuseColorSet

Sets the diffuse color of section in Trim 3D.

Python

BwApi.MaterialTrim3dSectionDiffuseColorSet(garmentId, colorwayId, materialId, sectionIndex, diffuseColor)

C++

BwApiMaterialTrim3dSectionDiffuseColorSet(garmentId, colorwayId, materialId, sectionIndex, diffuseColor);

C#

BwApi.MaterialTrim3dSectionDiffuseColorSet(garmentId, colorwayId, materialId, sectionIndex, diffuseColor);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialId

Existing material ID.

In

sectionIndex

Section Index.

In

diffuseColor

The diffuse color to set.

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

---

BwApiMaterialGroupItemTrim3d

Checks if a material in the group is a Trim 3D.

Python

BwApi.MaterialGroupItemTrim3d(garmentId, colorwayId, materialGroupId, materialId)

C++

BwApiMaterialGroupItemTrim3d(garmentId, colorwayId, materialGroupId, materialId, isTrim3D);

C#

BwApi.MaterialGroupItemTrim3d(garmentId, colorwayId, materialGroupId, materialId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialGroupId

Existing group material ID.

In

materialId

Existing material ID.

Out

isTrim3D

Whether this material is trim 3d material or not.

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

---

BwApiMaterialGroupItemTrim3dSectionsCount

Gets the amount of sections in Trim 3D of the material in a group.

Python

BwApi.MaterialGroupItemTrim3dSectionsCount(garmentId, colorwayId, materialGroupId, materialId)

C++

BwApiMaterialGroupItemTrim3dSectionsCount(garmentId, colorwayId, materialGroupId, materialId, sectionsCount);

C#

BwApi.MaterialGroupItemTrim3dSectionsCount(garmentId, colorwayId, materialGroupId, materialId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialGroupId

Existing group material ID.

In

materialId

Existing material ID.

Out

sectionsCount

The amount of entries in the trim 3d.

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

---

BwApiMaterialGroupItemTrim3dSectionNameGet

Gets the name of the section in Trim 3D of the material in the group.

Python

BwApi.MaterialGroupItemTrim3dSectionNameGet(garmentId, colorwayId, materialGroupId, materialId, sectionIndex)

C++

BwApiMaterialGroupItemTrim3dSectionNameGet(garmentId, colorwayId, materialGroupId, materialId, sectionIndex, sectionName);

C#

BwApi.MaterialGroupItemTrim3dSectionNameGet(garmentId, colorwayId, materialGroupId, materialId, sectionIndex);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialGroupId

Existing group material ID.

In

materialId

Existing material ID.

In

sectionIndex

Section Index.

Out

sectionName

The name of the entry.

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

---

BwApiMaterialGroupItemTrim3dSectionDiffuseColorGet

Gets the deiffuse color of the section in Trim 3D of the material in the group.

Python

BwApi.MaterialGroupItemTrim3dSectionDiffuseColorGet(garmentId, colorwayId, materialGroupId, materialId, sectionIndex)

C++

BwApiMaterialGroupItemTrim3dSectionDiffuseColorGet(garmentId, colorwayId, materialGroupId, materialId, sectionIndex, diffuseColor);

C#

BwApi.MaterialGroupItemTrim3dSectionDiffuseColorGet(garmentId, colorwayId, materialGroupId, materialId, sectionIndex);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialGroupId

Existing group material ID..

In

materialId

Existing material ID.

In

sectionIndex

Section Index.

Out

diffuseColor

The diffuse color of the entry.

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

---

BwApiMaterialGroupItemTrim3dSectionDiffuseColorSet

Sets the deiffuse color of the section in Trim 3D of the material in the group.

Python

BwApi.MaterialGroupItemTrim3dSectionDiffuseColorSet(garmentId, colorwayId, materialGroupId, materialId, sectionIndex, diffuseColor)

C++

BwApiMaterialGroupItemTrim3dSectionDiffuseColorSet(garmentId, colorwayId, materialGroupId, materialId, sectionIndex, diffuseColor);

C#

BwApi.MaterialGroupItemTrim3dSectionDiffuseColorSet(garmentId, colorwayId, materialGroupId, materialId, sectionIndex, diffuseColor);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialGroupId

Existing group material ID.

In

materialId

Existing material ID.

In

sectionIndex

Section Index.

In

diffuseColor

The diffuse color to set.

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

---

BwApiMaterialImport

Import a U3M, JSON(group) file into a garment.

Python

BwApi.MaterialImport(garmentId, colorwayId, fullPath)

C++

BwApiMaterialImport(garmentId, colorwayId, fullPath, materialIds);

C#

BwApi.MaterialImport(garmentId, colorwayId, fullPath);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

fullPath

Full path to the file to be imported.

Out

materialIds

The material IDs that were imported to the garment.

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

---

BwApiMaterialExport

Export a material.

Python

BwApi.MaterialExport(garmentId, colorwayId, materialId, path)

C++

BwApiMaterialExport(garmentId, colorwayId, materialId, path);

C#

BwApi.MaterialExport(garmentId, colorwayId, materialId, path);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialId

Material ID to export.

In

path

The path to be exported to,it musts end with U3MA extension.

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

---

BwApiMaterialUpdateFromFile

Update a material with a U3M file.

Python

BwApi.MaterialUpdateFromFile(garmentId, colorwayId, materialId, fullPath)

C++

BwApiMaterialUpdateFromFile(garmentId, colorwayId, materialId, fullPath);

C#

BwApi.MaterialUpdateFromFile(garmentId, colorwayId, materialId, fullPath);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialId

Existing material ID.

In

fullPath

Full path to the file to be imported.

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

Note: The U3M type and the designated materail must have the same type.

---

BwApiMaterialAssign

Assign a material to another material.

Python

BwApi.MaterialAssign(garmentId, colorwayId, materialId, destColorwayId, destMaterialId, assignOption)

C++

BwApiMaterialAssign(garmentId, colorwayId, materialId, destColorwayId, destMaterialId, assignOption);

C#

BwApi.MaterialAssign(garmentId, colorwayId, materialId, destColorwayId, destMaterialId, assignOption);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialId

Existing material ID.

In

destColorwayId

Existing colorway ID.

In

destMaterialId

Existing material ID.

In

assignOption

Assign type to use (see BwApiAssignOption).

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

Note: Please refer the UI to see which paste material operation are allowed.

---

BwApiMaterialLinksGet

Get a material links material across the colorways.

Python

BwApi.MaterialLinksGet(garmentId, colorwayId)

C++

BwApiMaterialLinksGet(garmentId, colorwayId, colorwayIds, materialIds);

C#

BwApi.MaterialLinksGet(garmentId, colorwayId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

Out

colorwayIds

Array of int containing the colorway IDs.

Out

materialIds

Array of int containing the material IDs.

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

Note: For every index i in materialIds, materialIds[i] is located at colorwayIds[i].

---

BwApiMaterialLinksSet

Link materials across the colorways.

Python

BwApi.MaterialLinksSet(garmentId, colorwayIds, materialIds)

C++

BwApiMaterialLinksSet(garmentId, colorwayIds, materialIds);

C#

BwApi.MaterialLinksSet(garmentId, colorwayIds, materialIds);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayIds

Array of int containing the colorway IDs.

In

materialIds

Array of int containing the material IDs.

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

Note: For every index i in materialIds, materialIds[i] need to be located at colorwayIds[i].

---

BwApiMaterialUnLink

Unlink a material.

Python

BwApi.MaterialUnLink(garmentId, colorwayId, materialId)

C++

BwApiMaterialUnLink(garmentId, colorwayId, materialId);

C#

BwApi.MaterialUnLink(garmentId, colorwayId, materialId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialId

Existing material ID.

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

---

BwApiMaterialNameGet

Returns the name of the material.

Python

BwApi.MaterialNameGet(garmentId, colorwayId, materialId)

C++

BwApiMaterialNameGet(garmentId, colorwayId, materialId, materialName);

C#

BwApi.MaterialNameGet(garmentId, colorwayId, materialId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialId

Existing material ID.

Out

materialName

The name of the material.

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

---

BwApiMaterialModeGet

Returns the mode of the material.

Python

BwApi.MaterialModeGet(garmentId, colorwayId, materialId)

C++

BwApiMaterialModeGet(garmentId, colorwayId, materialId, materialMode);

C#

BwApi.MaterialModeGet(garmentId, colorwayId, materialId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

materialId

Existing material ID.

Out

materialMode

The mode of the material.

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

---

BwApiMaterialImportEx

Import a U3M, JSON(group), sbsar file into a garment.

Python

BwApi.MaterialImportEx(garmentId, colorwayId, fullPath, importOptionsJson)

C++

BwApiMaterialImportEx(garmentId, colorwayId, fullPath, importOptionsJson, materialIds);

C#

BwApi.MaterialImportEx(garmentId, colorwayId, fullPath, importOptionsJson);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

colorwayId

Existing colorway ID.

In

fullPath

Full path to the file to be imported.

In

importOptionsJson

The options for the import (see import_ex_options.json schema)

Out

materialIds

The material IDs that were imported to the garment.

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

---

Did this answer your question?