Garments
Garments is what you create in Browzwear applications. Use the Garment Creation API to create a garment, open a garment, dress a garment, and so on.
For more information about the feature, please visit here.
To learn more about the rest of the API, please refer to Garment in the repository.
Sample Plugin
Sample plugin for the Garment creation is available here
Open a Garment
Code Snippet
The code snippet below shows how to open a garment from file (.vsp, .vsgx, .bw or .dxf)
Python C++ C#
Python
full_path = '<full path to the garment file>' garment = BwApi.GarmentOpen(full_path)
C++
garment = BwApiGarmentOpen("full path to the garment file")C#
garment = BwApi.GarmentOpen("full path to the garment file");Dress a Garment
You can learn how to dress a garment here.
Save a Garment
Code Snippet
The code snippet below shows how to save garment to file (.bw)
Python C++ C#
Python
full_path = '<full path to the garment file to save>' BwApi.GarmentSaveAs(garmentId)
C++
BwApiGarmentSaveAs(garmentId,"full path to the garment file to save");
C#
BwApi.GarmentSaveAs(garmentId,"full path to the garment file to save");
Result
A new garment id.
Note: saving garment to file will re-load the new garment automatically, this will generate a new garment id.