File : API\scene\IMaterialsService.h Namespace : services Derived from: services::IService
Materials management service. This service creates materials and manages them with a so-called materials editor which is also implemented by the instance of this service. You can extend materials editor by either implementing your own instances of rend::IMaterial interface or by adding extensions into materials editor as child dialogs.
Materials service transparently inherits core::bind::INumericBindSource interface and your child dialogs have to implement core::bind::INumericBindTarget interface. Thus, your child dialog will be notified when user selects certain material in materials editor.
Materials in ZModeler are presented with rend::IMaterial interface and refered by zero-based material index value. This is an index of material in linear array of materials. You can assign certain material to a polygons by setting their material value to an index of destination material.
getCount | Provides amount of materials in materials service. |
getMaterial | Provides material given it's zero-based index. |
setMaterial | Sets material at given zero-based index. |
showMaterialEditor | Shows material editor with some mode. |
addEditorExtension | Adds an extension to materials editor. |
findMaterialByName | Tries to find material by name. |
createMaterial | Creates material. You can specify class name of new material, or material class will be taken from current compatibility info. You can also specify whether it's needed to add created material into a set of materials. |
deleteMaterial | Deletes material given it's zero-based index. |
insertMaterial | Inserts material at given position. |
addMaterialClass | Registers class name that implements rend::IMaterial interface. |
getMaterialClass | Provides material class info: user-friendly title and description. |
enumMaterialClasses | Enumertaes available class names that implement rend::IMaterial interface. |