Garment
This file contains garment functionality, you can create new garment, get shapes, cluster, stitches etc... from the active garment.
BwApiGarmentCreate
Creates a new empty garment.
Python
BwApi.GarmentCreate(name)
C++
BwApiGarmentCreate(name, garmentIdOut);
C#
BwApi.GarmentCreate(name);
Parameters
Param | Variable | Description |
In | name | The name of the new garment. |
Out | garmentIdOut | The created garment ID. |
Returns: Error/success code (see BwApiErrorCodes enum).
Note: This function prompts the user to closes any open garments.
---
BwApiGarmentOpen
Open a garment from a file (.vsp, .vsgx, .bw or .dxf).
Python
BwApi.GarmentOpen(path)
C++
BwApiGarmentOpen(path);
C#
BwApi.GarmentOpen(path);
Parameters
Param | Variable | Description |
In | path | Full path to the garment file. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentImport
Open a garment from a file with settings (.vsp, .dxf).
Python
BwApi.GarmentImport(path, settings)
C++
BwApiGarmentImport(path, settings);
C#
BwApi.GarmentImport(path, settings);
Parameters
Param | Variable | Description |
In | path | Full path to the garment vsp or dxf file. |
In | settings | Settings for open (see import_settings.json) |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentSave
Save the garment changes to the current used file.
Python
BwApi.GarmentSave(garmentId)
C++
BwApiGarmentSave(garmentId);
C#
BwApi.GarmentSave(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Returns: Error/success code (see BwApiErrorCodes enum).
Note: If the garment was not saved before calling this function, it will fail.
---
BwApiGarmentSaveAs
Save the garment to file (.bw, .vsgx).
Python
BwApi.GarmentSaveAs(garmentId, path)
C++
BwApiGarmentSaveAs(garmentId, path);
C#
BwApi.GarmentSaveAs(garmentId, path);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | path | Full path to the garment file to save. |
Returns: Error/success code (see BwApiErrorCodes enum).
Note: If the path already exists a message will be displayed to user.
---
BwApiGarmentSaveAsFinalDesign
Save the garment as a final design (.bw, .vsgx).
Python
BwApi.GarmentSaveAsFinalDesign(garmentId, path)
C++
BwApiGarmentSaveAsFinalDesign(garmentId, path);
C#
BwApi.GarmentSaveAsFinalDesign(garmentId, path);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | path | Full path to the garment file to save. |
Returns: Error/success code (see BwApiErrorCodes enum).
Note: Relevant only for SmartDesign templates.
---
BwApiGarmentExport
DEPRECATED - Use BwApiGarmentExportEx_v2.
Python
BwApi.GarmentExport()
C++
BwApiGarmentExport();
C#
BwApi.GarmentExport();
---
BwApiGarmentExportEx_v2
Export the garment to file (.dxf).
Python
BwApi.GarmentExportEx_v2(garmentId, path, settings)
C++
BwApiGarmentExportEx_v2(garmentId, path, settings);
C#
BwApi.GarmentExportEx_v2(garmentId, path, settings);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | path | Full path to save the garment (extension must be .dxf). |
In | settings | Settings for export (see export_settings.json). By default (when using BwApiGarmentExport) this parameter will be 1. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentMerge
Merge the existing garment with an external .dxf file.
Python
BwApi.GarmentMerge(garmentId, path)
C++
BwApiGarmentMerge(garmentId, path);
C#
BwApi.GarmentMerge(garmentId, path);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | path | Full path to .dxf file. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentPathGet
Get the current garment working directory.
Python
BwApi.GarmentPathGet(garmentId)
C++
BwApiGarmentPathGet(garmentId, path);
C#
BwApi.GarmentPathGet(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | path | The garment's path. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentClose
Close the existing garment.
Python
BwApi.GarmentClose(garmentId, discardChanges)
C++
BwApiGarmentClose(garmentId, discardChanges);
C#
BwApi.GarmentClose(garmentId, discardChanges);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | discardChanges | 0 - Prompt message to user whether to discard or save changes if garment was changed from last save. 1 - Discard pending changes without prompting anything to the user. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentCloseEx
Close existing garment
Python
BwApi.GarmentCloseEx(garmentId, closeInfo)
C++
BwApiGarmentCloseEx(garmentId, closeInfo);
C#
BwApi.GarmentCloseEx(garmentId, closeInfo);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | closeInfo | Garment close info (see garment_close_info.json) |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentId
Gets the ID of the current active garment.
Python
BwApi.GarmentId()
C++
BwApiGarmentId(garmentIdOut);
C#
BwApi.GarmentId();
Parameters
Param | Variable | Description |
Out | garmentIdOut | Existing garment ID. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentNameGet
Get the name of the current active garment.
Python
BwApi.GarmentNameGet(garmentId)
C++
BwApiGarmentNameGet(garmentId, name);
C#
BwApi.GarmentNameGet(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | name | The garment name. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentNameSet
Set the name of the current active garment.
Python
BwApi.GarmentNameSet(garmentId, name)
C++
BwApiGarmentNameSet(garmentId, name);
C#
BwApi.GarmentNameSet(garmentId, name);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | name | The garment name. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentShapeIds
Gets the shape IDs of the current active garment.
Python
BwApi.GarmentShapeIds(garmentId)
C++
BwApiGarmentShapeIds(garmentId, shapeIds);
C#
BwApi.GarmentShapeIds(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | shapeIds | Array of int containig the shape IDs. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentZipperIds
Gets the zipper IDs of the current active garment.
Python
BwApi.GarmentZipperIds(garmentId)
C++
BwApiGarmentZipperIds(garmentId, zipperIds);
C#
BwApi.GarmentZipperIds(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | zipperIds | Array of int containing the zipper IDs. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentButtonIds
Gets the button IDs of the current active garment.
Python
BwApi.GarmentButtonIds(garmentId)
C++
BwApiGarmentButtonIds(garmentId, buttonIds);
C#
BwApi.GarmentButtonIds(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | buttonIds | Array of int containing the button IDs. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentClusterIds
Gets the cluster IDs of the current VStitcher active garment.
Python
BwApi.GarmentClusterIds(garmentId)
C++
BwApiGarmentClusterIds(garmentId, clusterIds);
C#
BwApi.GarmentClusterIds(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | clusterIds | Array of int containing the cluster IDs. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentStitchIds
Gets the stitch IDs of the current active garment.
Python
BwApi.GarmentStitchIds(garmentId)
C++
BwApiGarmentStitchIds(garmentId, stitchIds);
C#
BwApi.GarmentStitchIds(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | stitchIds | Array of int containing the stitch IDs. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentSizeIds
Gets the size IDs of the current active garment.
Python
BwApi.GarmentSizeIds(garmentId)
C++
BwApiGarmentSizeIds(garmentId, sizeIds);
C#
BwApi.GarmentSizeIds(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Axisting garment ID. |
Out | sizeIds | Array of int containing the size IDs. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentColorwayIds
Gets the colorway IDs of the current active garment.
Python
BwApi.GarmentColorwayIds(garmentId)
C++
BwApiGarmentColorwayIds(garmentId, colorwayIds);
C#
BwApi.GarmentColorwayIds(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | colorwayIds | Array of int containing the colorway IDs. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentColorwayReorderIds
Sets the order of the colorway for the current active garment.
Python
BwApi.GarmentColorwayReorderIds(garmentId)
C++
BwApiGarmentColorwayReorderIds(garmentId, colorwayIds);
C#
BwApi.GarmentColorwayReorderIds(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | colorwayIds | Array of int containing the colorway IDs. |
Returns: Error/success code (see BwApiErrorCodes enum).
Note: the array of the colorway IDs must be a permutation of the current garment colorway IDs.
---
BwApiGarmentWorkspaceGet
Gets the current workspace name.
Python
BwApi.GarmentWorkspaceGet(garmentId)
C++
BwApiGarmentWorkspaceGet(garmentId, workspaceName);
C#
BwApi.GarmentWorkspaceGet(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | workspaceName | Current workspace name. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentWorkspaceSet
Sets the current workspace.
Python
BwApi.GarmentWorkspaceSet(garmentId, workspaceName)
C++
BwApiGarmentWorkspaceSet(garmentId, workspaceName);
C#
BwApi.GarmentWorkspaceSet(garmentId, workspaceName);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | workspaceName | Workspace name - "home"/"colorways"/"animation". |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentLayerGet
Gets the layer of the current active garment.
Python
BwApi.GarmentLayerGet(garmentId)
C++
BwApiGarmentLayerGet(garmentId, garmentLayer);
C#
BwApi.GarmentLayerGet(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | garmentLayer | Garment layer ID (see garmentLayers enum). |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentLayerSet
Sets the layer of the current VStitcher active garment.
Python
BwApi.GarmentLayerSet(garmentId, garmentLayer)
C++
BwApiGarmentLayerSet(garmentId, garmentLayer);
C#
BwApi.GarmentLayerSet(garmentId, garmentLayer);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | garmentLayer | Garment layer ID (see garmentLayers enum). |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentCrotchCoverRemoveGet
Gets the remove crotch cover state of the current active garment.
Python
BwApi.GarmentCrotchCoverRemoveGet(garmentId)
C++
BwApiGarmentCrotchCoverRemoveGet(garmentId, remove);
C#
BwApi.GarmentCrotchCoverRemoveGet(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | remove | Boolean (1/0) that represents the sate. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentCrotchCoverRemoveSet
Sets the remove crotch cover state of the current active garment.
Python
BwApi.GarmentCrotchCoverRemoveSet(garmentId, remove)
C++
BwApiGarmentCrotchCoverRemoveSet(garmentId, remove);
C#
BwApi.GarmentCrotchCoverRemoveSet(garmentId, remove);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | remove | Boolean (1/0) that represents the sate. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentHandsCoverRemoveGet
Gets the remove hands cover state of the current active garment.
Python
BwApi.GarmentHandsCoverRemoveGet(garmentId)
C++
BwApiGarmentHandsCoverRemoveGet(garmentId, remove);
C#
BwApi.GarmentHandsCoverRemoveGet(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | remove | Boolean (1/0) that represents the sate. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentHandsCoverRemoveSet
Sets the remove hands cover state of the current VStitcher active garment.
Python
BwApi.GarmentHandsCoverRemoveSet(garmentId, remove)
C++
BwApiGarmentHandsCoverRemoveSet(garmentId, remove);
C#
BwApi.GarmentHandsCoverRemoveSet(garmentId, remove);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | remove | Boolean (1/0) that represents the sate. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentDBId
Gets the database location ID of the current active garment.
Python
BwApi.GarmentDBId(garmentId)
C++
BwApiGarmentDBId(garmentId, dbId);
C#
BwApi.GarmentDBId(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | existing garment ID. |
Out | dbId | int that represents the database ID used to create the garment. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentInfoGet
DEPRECATED - Use BwApiGarmentInfoGetEx.
Python
BwApi.GarmentInfoGet()
C++
BwApiGarmentInfoGet();
C#
BwApi.GarmentInfoGet();
---
BwApiGarmentInfoSet
DEPRECATED - Use BwApiGarmentInfoSetEx.
Python
BwApi.GarmentInfoSet()
C++
BwApiGarmentInfoSet();
C#
BwApi.GarmentInfoSet();
---
BwApiGarmentInfoGetEx
Gets garment info by key.
Python
BwApi.GarmentInfoGetEx(garmentId, key)
C++
BwApiGarmentInfoGetEx(garmentId, key, dataJSON);
C#
BwApi.GarmentInfoGetEx(garmentId, key);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | key | The key to use for setting and getting this garment info item. |
Out | dataJSON | Garment info item data (see garment_info.json). |
Returns: Error/success code (see BwApiErrorCodes enum).
Note: Browzwear automatically set the following keys: season, category, style_id, style_name, match_style, pattern_id, designer, import_source.
---
BwApiGarmentInfoSetEx
Sets / updates garment info by key.
Python
BwApi.GarmentInfoSetEx(garmentId, key, dataJSON)
C++
BwApiGarmentInfoSetEx(garmentId, key, dataJSON);
C#
BwApi.GarmentInfoSetEx(garmentId, key, dataJSON);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | key | The key to use for setting and getting this garment info item. |
In | dataJSON | Garment info item data (see garment_info.json). |
Returns: Error/success code (see BwApiErrorCodes enum).
Note: If the key already exist, caption and readonly fields will be ignored.
---
BwApiGarmentUserDataGet
Gets the garment user data that was previously stored by calling BwApiGarmentUserDataSet.
Python
BwApi.GarmentUserDataGet(garmentId, pluginSection, key)
C++
BwApiGarmentUserDataGet(garmentId, pluginSection, key, buffer);
C#
BwApi.GarmentUserDataGet(garmentId, pluginSection, key);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | pluginSection | Specific vendor or plugin identifier. This key will help VStitcher to retrieve the correct data for the appropriate plugin. (You can specify as many sections as needed. A section is not limited to one per vendor). |
In | key | Key for specific property (e.g. "creation date", "plugin version" etc'). |
Out | buffer | Allocated buffer object to fill with the data previously stored by calling to BwApiGarmentUserDataSet. The returned buffer is a copy of the stored buffer so you are expected to release the buffer when you finish to use it. |
Returns: Error/success code (see BwApiErrorCodes enum). C++:
---
BwApiGarmentUserDataSet
Sets the garment user data
Python
BwApi.GarmentUserDataSet(garmentId, pluginSection, key, buffer)
C++
BwApiGarmentUserDataSet(garmentId, pluginSection, key, buffer);
C#
BwApi.GarmentUserDataSet(garmentId, pluginSection, key, buffer);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | pluginSection | Specific vendor or plugin identifier. This key will help VStitcher to retrieve the correct data for the appropriate plugin. (You can specify as many sections as needed. A section is not limited to one per vendor). |
In | key | key for specific property (e.g. "creation date", "plugin version" etc'). |
In | buffer | buffer to store in VStitcher. VStitcher will create a copy of this buffer so you are expected to release it after calling to this function. |
Returns: Error/success code (see BwApiErrorCodes enum). C++:
---
BwApiGarmentUserDataStrGet
Gets the garment's user data that was previously stored by calling BwApiGarmentUserDataStrSet.
Python
BwApi.GarmentUserDataStrGet(garmentId, key)
C++
BwApiGarmentUserDataStrGet(garmentId, key, userDataStr);
C#
BwApi.GarmentUserDataStrGet(garmentId, key);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | key | Key for specific property (e.g. "creation date", "plugin version" etc'). |
Out | userDataStr | The string that was stored in the user data. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentUserDataStrSet
Sets the garment's user data.
Python
BwApi.GarmentUserDataStrSet(garmentId, key, userDataStr)
C++
BwApiGarmentUserDataStrSet(garmentId, key, userDataStr);
C#
BwApi.GarmentUserDataStrSet(garmentId, key, userDataStr);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | key | Key for specific property (e.g. "creation date", "plugin version" etc'). |
In | userDataStr | The string to store in the user data. |
Returns: Error/success code (see BwApiErrorCodes enum).
Note: If userDataStr is NULL (or None in Python) then the key will be erased.
---
BwApiGarmentImportSourceGet_DEPRECATED
Get the old VStitcher 6.9 import source from loaded garment.
Python
BwApi.GarmentImportSourceGet_DEPRECATED(garmentId)
C++
BwApiGarmentImportSourceGet_DEPRECATED(garmentId, path);
C#
BwApi.GarmentImportSourceGet_DEPRECATED(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | path | Import source path |
Returns: Error/success code (see BwApiErrorCodes enum).
Note: You should use this function only to retrieve import source location from old VStitcher files (6.9 and below)
---
BwApiGarmentPrepare
Start a garment prepare simulation on the current avatar.
Python
BwApi.GarmentPrepare(garmentId)
C++
BwApiGarmentPrepare(garmentId);
C#
BwApi.GarmentPrepare(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentDress
Start a garment dress simulation on the current avatar.
Python
BwApi.GarmentDress(garmentId)
C++
BwApiGarmentDress(garmentId);
C#
BwApi.GarmentDress(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentDressEx
Start a garment dress simulation on the current avatar with options.
Python
BwApi.GarmentDressEx(garmentId, simulationInfo)
C++
BwApiGarmentDressEx(garmentId, simulationInfo);
C#
BwApi.GarmentDressEx(garmentId, simulationInfo);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | simulationInfo | Simulation info (see simulation.json). |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentUndress
Undress the current avatar.
Python
BwApi.GarmentUndress(garmentId)
C++
BwApiGarmentUndress(garmentId);
C#
BwApi.GarmentUndress(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentVisibleIn3D
Check if the garment is visible in 3D or not.
Python
BwApi.GarmentVisibleIn3D(garmentId)
C++
BwApiGarmentVisibleIn3D(garmentId, isVisible);
C#
BwApi.GarmentVisibleIn3D(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | isVisible | Boolean (1/0) that represents the state of the garment in 3D. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentFinish
Finish the simulation of the current avatar.
Python
BwApi.GarmentFinish(garmentId)
C++
BwApiGarmentFinish(garmentId);
C#
BwApi.GarmentFinish(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentTechpackExport
Export a tech pack for the garment.
Python
BwApi.GarmentTechpackExport(garmentId, presetName)
C++
BwApiGarmentTechpackExport(garmentId, presetName, outputFolder);
C#
BwApi.GarmentTechpackExport(garmentId, presetName);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | presetName | Preset file name to use (will be loaded from %LOCALAPPDATA%\Browzwear\VStitcher\TechPackPresets\{PRESET_MAME}.tpp). |
Out | outputFolder | Folder to save the tech pack materials (if exist, files will be overwritten). @warning This function is blocking and may take few seconds to complete |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentCostGet
Get the current estimated cost information for this garment.
Python
BwApi.GarmentCostGet(garmentId)
C++
BwApiGarmentCostGet(garmentId, costJSON);
C#
BwApi.GarmentCostGet(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | costJSON | JSON object as string that represent the current estimated cost information (see costing.json). |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentCostSet
Set the current estimated cost information for this garment.
Python
BwApi.GarmentCostSet(garmentId)
C++
BwApiGarmentCostSet(garmentId, costJSON);
C#
BwApi.GarmentCostSet(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | costJSON | JSON object as string that represent the new estimated cost information (see costing.json). |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentCostUpdate
Update the current estimated cost information for this garment.
Python
BwApi.GarmentCostUpdate(garmentId)
C++
BwApiGarmentCostUpdate(garmentId, costJSON);
C#
BwApi.GarmentCostUpdate(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | costJSON | JSON object as string that represents the updated estimated cost information (see costing.json) |
Returns: Error/success code (see BwApiErrorCodes enum).
Note: Use this function to partially update cost information (i.e: update value, state, description etc...)
---
BwApiGarmentSnapshotIdsEx
Get the snapshots IDs for the current active garment (automatic and manual snapshots).
Python
BwApi.GarmentSnapshotIdsEx(garmentId)
C++
BwApiGarmentSnapshotIdsEx(garmentId, snapshotIds);
C#
BwApi.GarmentSnapshotIdsEx(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | snapshotIds | List of all the saved snapshots in the garment. |
Returns: Error/success code (see BwApiErrorCodes enum).
Note: Change of colorway will change the snapshot's ID. After changing the colorway use this function to get the new snapshot's ID.
---
BwApiGarmentClipIds
Gets the clip IDs of the current active garment.
Python
BwApi.GarmentClipIds(garmentId)
C++
BwApiGarmentClipIds(garmentId, clipIds);
C#
BwApi.GarmentClipIds(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | clipIds | List of all the clips in the garment. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentSettingsGet
Get the settings of the garment.
Python
BwApi.GarmentSettingsGet(garmentId)
C++
BwApiGarmentSettingsGet(garmentId, settings);
C#
BwApi.GarmentSettingsGet(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | settings | Settings JSON object as string containing all the garment settings information (see garment_settings.json schema). |
---
BwApiGarmentSettingsUpdate
Update the settings of the garment.
Python
BwApi.GarmentSettingsUpdate(garmentId, settings)
C++
BwApiGarmentSettingsUpdate(garmentId, settings);
C#
BwApi.GarmentSettingsUpdate(garmentId, settings);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | settings | Settings JSON object as string containing all the garment settings information (see garment_settings.json schema). |
---
BwApiGarmentResourceExtract
Get the resource from BW file.
Python
BwApi.GarmentResourceExtract(garmentId, resourcePath, path)
C++
BwApiGarmentResourceExtract(garmentId, resourcePath, path);
C#
BwApi.GarmentResourceExtract(garmentId, resourcePath, path);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
In | resourcePath | The relative path to the BW resource. |
In | path | The path to extract the file. |
---
BwApiGarmentGuidelineIds
Get the IDs of guidelines in the garment.
Python
BwApi.GarmentGuidelineIds(garmentId)
C++
BwApiGarmentGuidelineIds(garmentId, guidelineIds);
C#
BwApi.GarmentGuidelineIds(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | guidelineIds | Array of int containig the guideline IDs. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmentUpdateMaterialsFromSourceFiles
Update the garment materials to match source files if available.
Python
BwApi.GarmentUpdateMaterialsFromSourceFiles(garmentId)
C++
BwApiGarmentUpdateMaterialsFromSourceFiles(garmentId);
C#
BwApi.GarmentUpdateMaterialsFromSourceFiles(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Returns: Error/success code (see BwApiErrorCodes enum).
---
BwApiGarmenIdsHistoryGet
Exports the histort of garment ID's of the current active garment in JSON format.
Python
BwApi.GarmenIdsHistoryGet(garmentId)
C++
BwApiGarmenIdsHistoryGet(garmentId, dataJSON);
C#
BwApi.GarmenIdsHistoryGet(garmentId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID. |
Out | dataJSON | Garment Ids history JSON |
Returns: Error/success code (see BwApiErrorCodes enum).
---