CopyMaterial()

Syntax

Result = CopyMaterial(#Material, #NewMaterial)
Description
Creates a #NewMaterial which is the exact copy of the specified #Material. If #PB_Any is used as '#NewMaterial' parameter, the new material number will be returned as 'Result'.

If the 'Result' is 0, the Material copy has failed. If the #NewMaterial was already created, it is automatically freed and replaced by the new one.

Supported OS

Windows, Linux

<- AddMaterialLayer() - Material Index - CountMaterialLayers() ->