PBRImporter: UtilityPlugin

This interface provides access to the PBR Importer, which enables you to create Physical Materials by loading a range of texture files. Note that only very limited functionality is currently exposed to MAXScript.

Constructor

Class instances not creatable by MAXScript 

Methods:

    <boolean>PBRImporter.Open()

Opens the PBR Importer dialog.

    <boolean>PBRImporter.Close()

Closes the PBR Importer dialog.

    <boolean>PBRImporter.Import <string array>paths

Imports materials from the textures in the array of directories specified by paths.

    <material array>PBRImporter.GetMaterials()

Returns an array of materials that have been imported. Returns an empty array if no materials have been matched/imported.

Example

-- Open PBR Import dialog, import some default Max materials
p = GetDir #maxroot + "maps\\"
PBRImporter.Open()
PBRImporter.Import #(p)
ms = PBRImporter.getMaterials()
classOf ms[1]
PBRImporter.Close()

Output:

"C:\Program Files\3dsMax 2021\maps\"
true
true
#(bricks23:PBRMetalRough, bricks24:PBRMetalRough)
PBRMetalRough
true