FormIt Plugin API
v23.0.0 (2023.0.0)
|
Functions | |
json | FormIt.MaterialProvider.MaterialData (color, textureData, scale, useAlpha, materialName, materialIdentifier, textureName, aAdditionalRenderData, aAdditionalTextures) |
json | FormIt.MaterialProvider.CreateMaterial (libraryType, materialData) |
Creates a new material from the given data. More... | |
json | FormIt.MaterialProvider.GetMaterialData (libraryType, materialId, excludeTextureData) |
Get the material data for the given material id. More... | |
json | FormIt.MaterialProvider.SetMaterialData (libraryType, materialId, materialData, excludeTextureData) |
Sets the material data. More... | |
json | FormIt.MaterialProvider.GetMaterialName (libraryType, materialId) |
Get the material name for the given material id. More... | |
json | FormIt.MaterialProvider.GetMaterials (libraryType) |
GetMaterials returns all the available materials. More... | |
json | FormIt.MaterialProvider.DeleteMaterials (libraryType, materialIds) |
Deletes a list of given materials. More... | |
json | FormIt.MaterialProvider.GetMaterialPreviewImage (libraryType, materialId) |
Get the preview image for the material. More... | |
json | FormIt.MaterialProvider.IsValidMaterialName (libraryType, materialId, newName, errorMsg) |
json | FormIt.MaterialProvider.GetNewMaterialName (libraryType, baseName) |
Returns a material name that is guaranteed not to exist. More... | |
json | FormIt.MaterialProvider.IsValidMaterial (libraryType, materialId) |
Check whether the material with the given id exists. More... | |
json | FormIt.MaterialProvider.CanModify (libraryType, materialId) |
Returns if a given material is modifiable (in some cases a material is marked as ReadOnly). More... | |
json FormIt.MaterialProvider.CanModify | ( | libraryType | , |
materialId | |||
) |
Returns if a given material is modifiable (in some cases a material is marked as ReadOnly).
[in] | libraryType | FormIt.LibraryType FormIt.LibraryType.SKETCH FormIt.LibraryType.APPLICATION |
[in] | materialId | int |
json FormIt.MaterialProvider.CreateMaterial | ( | libraryType | , |
materialData | |||
) |
Creates a new material from the given data.
[in] | libraryType | FormIt.LibraryType FormIt.LibraryType.SKETCH FormIt.LibraryType.APPLICATION |
[in] | materialData | FormIt.Materials.MaterialData |
json FormIt.MaterialProvider.DeleteMaterials | ( | libraryType | , |
materialIds | |||
) |
Deletes a list of given materials.
[in] | libraryType | FormIt.LibraryType FormIt.LibraryType.SKETCH FormIt.LibraryType.APPLICATION |
[in] | materialIds | Array of material ids |
json FormIt.MaterialProvider.GetMaterialData | ( | libraryType | , |
materialId | , | ||
excludeTextureData | |||
) |
Get the material data for the given material id.
[in] | libraryType | FormIt.LibraryType FormIt.LibraryType.SKETCH FormIt.LibraryType.APPLICATION |
[in] | materialId | |
[in] | excludeTextureData | If true, no texture data is returned. This will speed up the call, if texture data is not needed. |
json FormIt.MaterialProvider.GetMaterialName | ( | libraryType | , |
materialId | |||
) |
Get the material name for the given material id.
[in] | libraryType | FormIt.LibraryType FormIt.LibraryType.SKETCH FormIt.LibraryType.APPLICATION |
[in] | materialId |
json FormIt.MaterialProvider.GetMaterialPreviewImage | ( | libraryType | , |
materialId | |||
) |
Get the preview image for the material.
The returned vector contains png formatted rgb pixel values. The preview image is square with a resolution of res.
[in] | libraryType | FormIt.LibraryType FormIt.LibraryType.SKETCH FormIt.LibraryType.APPLICATION |
[in] | materialId |
json FormIt.MaterialProvider.GetMaterials | ( | libraryType | ) |
GetMaterials returns all the available materials.
[in] | libraryType | FormIt.LibraryType FormIt.LibraryType.SKETCH FormIt.LibraryType.APPLICATION |
json FormIt.MaterialProvider.GetNewMaterialName | ( | libraryType | , |
baseName | |||
) |
Returns a material name that is guaranteed not to exist.
Can be used to create a new material without having to check for materials with the same name. If the base name is passed in, it is used to create the unique new name. Otherwise some generic name is the base (such as "Material").
[in] | libraryType | FormIt.LibraryType FormIt.LibraryType.SKETCH FormIt.LibraryType.APPLICATION |
[in] | baseName | String |
json FormIt.MaterialProvider.IsValidMaterial | ( | libraryType | , |
materialId | |||
) |
Check whether the material with the given id exists.
[in] | libraryType | FormIt.LibraryType FormIt.LibraryType.SKETCH FormIt.LibraryType.APPLICATION |
[in] | materialId | int |
json FormIt.MaterialProvider.IsValidMaterialName | ( | libraryType | , |
materialId | , | ||
newName | , | ||
errorMsg | |||
) |
json FormIt.MaterialProvider.MaterialData | ( | color | , |
textureData | , | ||
scale | , | ||
useAlpha | , | ||
materialName | , | ||
materialIdentifier | , | ||
textureName | , | ||
aAdditionalRenderData | , | ||
aAdditionalTextures | |||
) |
json FormIt.MaterialProvider.SetMaterialData | ( | libraryType | , |
materialId | , | ||
materialData | , | ||
excludeTextureData | |||
) |
Sets the material data.
[in] | libraryType | FormIt.LibraryType FormIt.LibraryType.SKETCH FormIt.LibraryType.APPLICATION |
[in] | materialId | |
[in] | materialData | FormIt.Materials.MaterialData |
[in] | excludeTextureData | If true, no texture data will be changed and thus can be omitted in the data argument. |