FormIt C++ API
v23.0.0 (2023.0.0)
|
Material Provider APIs.
Each function in this namespace takes the FormIt::LibraryType as a parameter, which identified the provider. Currently there are 2 providers : SKETCH and APPLICATION. SKETCH materials are those contained in the sketch. APPLICATION materials are default materials for users to choose from.
Functions | |
FORMIT_CORE_EXPORT size_t | CreateMaterial (FormIt::LibraryType aType, const FormIt::Materials::MaterialData &data) |
Creates a new material from the given data. More... | |
FORMIT_CORE_EXPORT bool | GetMaterialData (FormIt::LibraryType aType, size_t materialId, FormIt::Materials::MaterialData &data, bool excludeTextureData=false) |
Get the data for this material. More... | |
FORMIT_CORE_EXPORT bool | SetMaterialData (FormIt::LibraryType aType, size_t materialId, const FormIt::Materials::MaterialData &data, bool excludeTextureData=false) |
Sets the material data If the optional excludeTextureData is true, no texture data will be changed and thus can be omitted in the data argument. More... | |
FORMIT_CORE_EXPORT::vector< size_t > | GetMaterials (FormIt::LibraryType aType) |
Returns all the available materials. More... | |
FORMIT_CORE_EXPORT bool | DeleteMaterials (FormIt::LibraryType aType, const 1::vector< size_t > &aIDs) |
Deletes a list of material. More... | |
FORMIT_CORE_EXPORT bool | IsValidMaterialName (FormIt::LibraryType aType, size_t aID, const 1::string &newName, 1::string &errorMsg) |
Check if the given name is valid for a material. More... | |
FORMIT_CORE_EXPORT::string | GetNewMaterialName (FormIt::LibraryType aType, const 1::string &baseName="") |
Returns a material name that is guaranteed not to exist. More... | |
FORMIT_CORE_EXPORT bool | IsValidMaterial (FormIt::LibraryType aType, size_t aID) |
Check whether the material with the given id exists. More... | |
FORMIT_CORE_EXPORT bool | CanModify (FormIt::LibraryType aType, size_t aID) |
Returns if a given material is modifiable (in some cases a material is marked as ReadOnly) More... | |
FORMIT_CORE_EXPORT bool | GetMaterialPreviewImage (FormIt::LibraryType aType, size_t materialID, 1::vector< unsigned char > &previewImage, size_t &res) |
Get the preview image for the material. More... | |
FORMIT_CORE_EXPORT bool | GetMaterialName (FormIt::LibraryType aType, size_t materialID, 1::string &materialName) |
Get the name of the material Returns true if the operation was successful. More... | |