# class Material

Material object that keeps material information used while rendering.

# Properties

Property Description
MaterialGUID The unique id for this node.
MaterialType The MaterialType.
UseTangentSpaceNormals The UseTangentSpaceNormals flag. If set, the normal map has tangent space normals.

# Methods

Method Description
AddMaterialChannel Add a material channel.
ChangeTexturePrefixPath Changes the prefix path (drive, directory) of all matching texture paths in the material, with the new one. This method is useful when external textures are placed in a specific folder, which needs to be moved.
ConvertHandedness Converts parameters such as UVTiling and UVOffset in shading networks.
GetClass Get the name of the Material class.
GetMaterialChannelCount Returns the number of material channels in the material.
GetMaterialChannelFromIndex Returns the name of a channel from the index. Note that by adding/removing channels the indices are changed, and this method should only be used for enumeration.
GetShadingNetwork Get which shading network to use for the material channel.
HasMaterialChannel Check if the channel exists within the material.
IsA Returns true if Material is a or is a descendant of the class named as the type parameter.
IsIdenticalTo Returns true if the material is setup identical to this material.
IsNull Returns true if the Material object is invalid.
IsTransparent Returns true if the material could be transparent.
LoadShadingNetworkFromXML Save shading network to XML.
RemoveMaterialChannel Remove a material channel.
SaveShadingNetworkToXML Save shading network to XML.
SetOpacityFromDiffuseAlpha Maps the alpha component of the diffuse channel to all the RGBA components in the opacity channel (by using a swizzle node).
SetShadingNetwork Set which shading network to use for the material channel.

# Static methods

Method Description
IsClassA Returns true if the class is a or is a descendant of the class named as the type parameter.
SafeCast SafeCast makes sure the input object is of a class that can be cast into spMaterial, and if this is the case, returns the object cast into spMaterial.

# Properties details

# MaterialGUID

The unique id for this node.

    # MaterialType

    The MaterialType.

      # UseTangentSpaceNormals

      The UseTangentSpaceNormals flag. If set, the normal map has tangent space normals.

        # Methods details

        # AddMaterialChannel

        Add a material channel.

          # ChangeTexturePrefixPath

          Changes the prefix path (drive, directory) of all matching texture paths in the material, with the new one. This method is useful when external textures are placed in a specific folder, which needs to be moved.

            # ConvertHandedness

            Converts parameters such as UVTiling and UVOffset in shading networks.

              # GetClass

              Get the name of the Material class.

                # GetMaterialChannelCount

                Returns the number of material channels in the material.

                  # GetMaterialChannelFromIndex

                  Returns the name of a channel from the index. Note that by adding/removing channels the indices are changed, and this method should only be used for enumeration.

                    # GetShadingNetwork

                    Get which shading network to use for the material channel.

                      # HasMaterialChannel

                      Check if the channel exists within the material.

                        # IsA

                        Returns true if Material is a or is a descendant of the class named as the type parameter.

                          # IsIdenticalTo

                          Returns true if the material is setup identical to this material.

                            # IsNull

                            Returns true if the Material object is invalid.

                              # IsTransparent

                              Returns true if the material could be transparent.

                                # LoadShadingNetworkFromXML

                                Save shading network to XML.

                                  # RemoveMaterialChannel

                                  Remove a material channel.

                                    # SaveShadingNetworkToXML

                                    Save shading network to XML.

                                      # SetOpacityFromDiffuseAlpha

                                      Maps the alpha component of the diffuse channel to all the RGBA components in the opacity channel (by using a swizzle node).

                                        # SetShadingNetwork

                                        Set which shading network to use for the material channel.

                                          # Static methods details

                                          # IsClassA

                                          Returns true if the class is a or is a descendant of the class named as the type parameter.

                                            # SafeCast

                                            SafeCast makes sure the input object is of a class that can be cast into spMaterial, and if this is the case, returns the object cast into spMaterial.