Browzwear API

Browzwear API

  • Docs
  • GitLab

›Colorways

Introduction

  • Introduction

Getting Started

  • License and Authentication
  • Understanding the API
  • Sample Plugins
  • Creating Python plugin
  • Creating C++ plugin
  • Creating C# plugin
  • Development
  • Deployment

Asset Management

  • Asset Library
  • Colors
  • Material
  • Avatars
  • Garments

Techpack

  • Create a Tech pack
  • Tech pack output - JSON
  • Point of Measurements
  • Bill of Material

Outputs Export

  • Outputs

Garment Creation

  • Create Shape
  • Create Edge
  • Arrange Shape
  • Stitch Shapes
  • Assign Material
  • Create an Avatar
  • Dress a Garment

Colorways

  • Colorways

Smart Design

  • Configure Smart Design Template

Costing

  • Costing

Terms of Use

  • Terms of Use

Change log

  • Change log

Colorways

Colorway is a combination of color, seams, trims, fabrics, and artwork of a garment. Use the Colorway API to create multiple colorways for a garment, update colorway and so on.

For more information about the feature, please visit here.

To learn more about the rest of the API, please refer to Colorway in the repository.

Getting Colorways ids

Code Snippet

Python
C++
C#
BwApi.GarmentColorwayIds(garment_id)
BwApiGarmentColorwayIds(garmentId);
BwApi.GarmentColorwayIds(garmentId);

Result

Ids of the following colorways:

Deleting a Colorway

Code Snippet

Python
C++
C#
# assuming colorway_id is a valid colorway id
BwApi.ColorwayDelete(garment_id, colorway_id)
// assuming colorwayId is a valid colorway id
BwApiColorwayDelete(garmentId, colorwayId);
// assuming colorwayId is a valid colorway id
BwApi.ColorwayDelete(garmentId, colorwayId);

Result

Getting the Current Colorway

Code Snippet

Python
C++
C#
current_colorway = BwApi.ColorwayCurrentGet(garment_id)
int currentColorway;
BwApiColorwayCurrentGet(garmentId, &currentColorway);
BwApi.ColorwayCurrentGet(garmentId, out currentColorway);

Result

The id of the curent colorway.

Setting the Current Colorway

Code Snippet

Python
C++
C#
# assuming the colorway_id is a valid colorway id
BwApi.ColorwayCurrentSet(garment_id, colorway_id)
// assuming the colorwayId is a valid colorway id
BwApiColorwayCurrentSet(garmentId, colorwayId);
// assuming the colorwayId is a valid colorway id
BwApi.ColorwayCurrentSet(garmentId, colorwayId);


Result

Cloning a Colorway

Code Snippet


Python
C++
C#
# assuming the colorway_id is a valid colorway id
new_colorway_id = BwApi.ColorwayClone(garment_id, colorway_id)
int newColorwayId;
// assuming the colorwayId is a valid colorway id
BwApiColorwayClone(garmentId, colorwayId, &newColorwayId);
int newColorwayId;
// assuming the colorwayId is a valid colorway id
BwApi.ColorwayClone(garmentId, colorwayId, out newColorwayId);

Result

Getting the Material ids of a Colorway

Code Snippet

Python
C++
C#
# assuming the colorway_id is a valid colorway id
BwApi.ColorwayMaterialIds(garment_id, colorway_id)
  BwApiVectorInt* materialIds = BwApiVectorIntCreate();
// assuming the colorwayId is a valid colorway id
BwApiColorwayMaterialIds(garmentId, colorwayId, materialIds);
BwApiVectorInt materialIds = new BwApiVectorInt();
// assuming the colorwayId is a valid colorway id
BwApi.ColorwayMaterialIds(garmentId, colorwayId, materialIds);

Result

A list of material ids from given colorway id

Getting the Colorway Name

Code Snippet


Python
C++
C#
# assuming the colorway_id is a valid colorway id
BwApi.ColorwayNameGet(garment_id, colorway_id)
BwApiString* colorwayName = BwApiStringCreate();
// assuming the colorway_id is a valid colorway id
BwApiColorwayNameGet(garmentId, colorwayId, colorwayName);
string colorwayName;
// assuming the colorway_id is a valid colorway id
BwApi.ColorwayNameGet(garmentId, colorwayId, out colorwayName);


Result

The name of the colorway

Setting the Colorway Name

Code Snippet


Python
C++
C#
# assuming the colorway_id is a valid colorway id
BwApi.ColorwayNameSet(garment_id, colorway_id, 'colorway name')
// assuming the colorway_id is a valid colorway id
BwApiColorwayNameSet(garmentId, colorwayId, "colorway name");
string colorwayName;
// assuming the colorway_id is a valid colorway id
BwApi.ColorwayNameSet(garmentId, colorwayId, "colorway name");

Result

Getting Colors in Use

Code Snippet


Python
C++
C#
# assuming the colorway_id is a valid colorway id
colors_in_use = BwApi.ColorwayColorsInUseGet(garment_id, colorway_id)
BwApiVectorColor* colors = BwApiVectorColorCreate();
// assuming the colorwayId is a valid colorway id
BwApiColorwayColorsInUseGet(garmentId, colorwayId, colors);
BwApiVectorColor colors = new BwApiVectorColor();
// assuming the colorwayId is a valid colorway id
BwApi.ColorwayColorsInUseGet(garmentId, colorwayId, colors);


Result

The colors in use in a colorway. The return value from this function is an array of color. Note: color is represented by RGB data.

Updating Colors in Use

Code Snippet


Python
C++
C#
# assuming the colorway_id is a valid colorway id
BwApi.ColorwayColorsInUseUpdate(garment_id, colorway_id, src_color, dest_color)
// assuming the colorwayId is a valid colorway id
BwApiColorwayColorsInUseUpdate(garmentId, colorwayId, srcColor, destColor);
// assuming the colorwayId is a valid colorway id
BwApi.ColorwayColorsInUseUpdate(garmentId, colorwayId, srcColor, destColor);


← Dress a GarmentConfigure Smart Design Template →
  • Getting Colorways ids
    • Code Snippet
    • Result
  • Deleting a Colorway
    • Code Snippet
    • Result
  • Getting the Current Colorway
    • Code Snippet
    • Result
  • Setting the Current Colorway
    • Code Snippet
    • Result
  • Cloning a Colorway
    • Code Snippet
    • Result
  • Getting the Material ids of a Colorway
    • Code Snippet
    • Result
  • Getting the Colorway Name
    • Code Snippet
    • Result
  • Setting the Colorway Name
    • Code Snippet
    • Result
  • Getting Colors in Use
    • Code Snippet
    • Result
  • Updating Colors in Use
    • Code Snippet
Browzwear API
FIND US
GitLabLinkedinTwitterInstagramFacebook
Copyright © 2021 Browzwear