ProtoTwin API
    Preparing search index...

    Class CustomMaterialLibrary

    Custom material library.

    Contains custom materials created through the editor, through scripting or by importing.

    Hierarchy (View Summary)

    Index

    Properties

    Accessors

    Methods

    Properties

    materials: CustomMaterial[]

    The materials defined in the library.

    Accessors

    • get name(): string

      The library name.

      Returns string

    • get path(): string

      The unique library path.

      Returns string

    Methods

    • Creates a custom material and adds it to the library.

      Parameters

      • name: string

        The unique name for the custom material.

      Returns null | CustomMaterial

      The created custom material, or null if the material name was not unique.

    • Removes the custom material with the specified name.

      Parameters

      • name: string

        The custom material name.

      Returns boolean

      True if the custom material was removed, false otherwise.