getMaterials
Last updated
Returns materials assigned to a specific object.
getMaterials(objectName: string): Promise<Material[]>objectName
string
Yes
Name of the object
Promise<Material[]> — Array of materials assigned to the object.
See Material in Common Types.
const materials = await api.getMaterials("Chair");
console.log(materials.map(m => m.name));Only accepts string, not array
An object can have multiple materials assigned
Only one material is active at a time
Last updated