c4d.Material

class c4d.Material

The material with the Mmaterial type.

See Mmaterial.h for container IDs.

Methods Signatures

Material.__init__(self)

rtype

c4d.Material

Material.GetChannelState(self, channel)

Get the state of a channel (if it is enabled or disabled).

Material.SetChannelState(self, channel, state)

Set the state of a channel (if it is enabled or disabled).

Material.AddReflectionLayer(self)

Adds a reflection/specular layer.

Material.GetReflectionLayerID(self, id)

Retrieves a reflection/specular layer by ID.

Material.GetReflectionLayerIndex(self, index)

Retrieves a reflection/specular layer by index.

Material.GetReflectionLayerTrans(self)

Retrieves the transparency layer.

Material.GetReflectionLayerCount(self)

Retrieves the number of reflection/specular layers.

Material.RemoveReflectionLayerID(self, id)

Removes a reflection/specular layer by ID.

Material.RemoveReflectionLayerIndex(self, index)

Removes a reflection/specular layer by index.

Material.RemoveReflectionAllLayers(self)

Deletes all reflection/specular layers.

Material.GetAllReflectionShaders(self)

Retrieves all the reflection/specular shaders.

Material.GetReflectionPrimaryLayers(self)

Retrieves the indices to the primary reflection and specular layers (can be -1 for empty).

Inheritance

Parent Class:

Methods Documentation

Material.__init__(self)
Return type

c4d.Material

Returns

The new material.

Material.GetChannelState(self, channel)

Get the state of a channel (if it is enabled or disabled).

Parameters

channel (int) –

The type of channel:

CHANNEL_COLOR

The color channel of a material.

CHANNEL_LUMINANCE

The luminance channel of a material.

CHANNEL_TRANSPARENCY

The transparency channel of a material.

CHANNEL_REFLECTION

The reflection channel of a material.

CHANNEL_ENVIRONMENT

The environment channel of a material.

CHANNEL_FOG

The fog channel of a material.

CHANNEL_BUMP

The bump channel of a material.

CHANNEL_ALPHA

The alpha channel of a material.

CHANNEL_SPECULAR

The specular channel of a material.

CHANNEL_SPECULARCOLOR

The specular color channel of a material.

CHANNEL_GLOW

The glow channel of a material.

CHANNEL_DISPLACEMENT

The displacement channel of a material.

CHANNEL_DIFFUSION

The diffusion channel of a material.

CHANNEL_NORMAL

The normal channel of a material.

CHANNEL_ANY

An unlabeled plugin channel.

Return type

bool

Returns

True if the channel is enabled.

Material.SetChannelState(self, channel, state)

Set the state of a channel (if it is enabled or disabled).

Parameters
  • channel (int) –

    The type of channel to change:

    CHANNEL_COLOR

    The color channel of a material.

    CHANNEL_LUMINANCE

    The luminance channel of a material.

    CHANNEL_TRANSPARENCY

    The transparency channel of a material.

    CHANNEL_REFLECTION

    The reflection channel of a material.

    CHANNEL_ENVIRONMENT

    The environment channel of a material.

    CHANNEL_FOG

    The fog channel of a material.

    CHANNEL_BUMP

    The bump channel of a material.

    CHANNEL_ALPHA

    The alpha channel of a material.

    CHANNEL_SPECULAR

    The specular channel of a material.

    CHANNEL_SPECULARCOLOR

    The specular color channel of a material.

    CHANNEL_GLOW

    The glow channel of a material.

    CHANNEL_DISPLACEMENT

    The displacement channel of a material.

    CHANNEL_DIFFUSION

    The diffusion channel of a material.

    CHANNEL_NORMAL

    The normal channel of a material.

    CHANNEL_ANY

    An unlabeled plugin channel.

  • state (bool) – True to enable the channel.

Material.AddReflectionLayer(self)

Adds a reflection/specular layer.

New in version R17.032.

Return type

c4d.ReflectionLayer

Returns

The added reflection/specular layer.

Material.GetReflectionLayerID(self, id)

Retrieves a reflection/specular layer by ID.

New in version R17.032.

Parameters

id (int) – The layer ID.

Return type

c4d.ReflectionLayer

Returns

The reflection/specular layer.

Material.GetReflectionLayerIndex(self, index)

Retrieves a reflection/specular layer by index.

New in version R17.032.

Parameters

index (int) – The layer index.

Return type

c4d.ReflectionLayer

Returns

The reflection/specular layer.

Material.GetReflectionLayerTrans(self)

Retrieves the transparency layer.

New in version R17.032.

Return type

c4d.ReflectionLayer

Returns

The transparency layer, or None if not available.

Material.GetReflectionLayerCount(self)

Retrieves the number of reflection/specular layers.

New in version R17.032.

Return type

int

Returns

The reflection/specular layers’ count.

Material.RemoveReflectionLayerID(self, id)

Removes a reflection/specular layer by ID.

New in version R17.032.

Parameters

id (int) – The layer ID.

Material.RemoveReflectionLayerIndex(self, index)

Removes a reflection/specular layer by index.

New in version R17.032.

Parameters

index (int) – The layer index.

Material.RemoveReflectionAllLayers(self)

Deletes all reflection/specular layers.

New in version R17.032.

Material.GetAllReflectionShaders(self)

Retrieves all the reflection/specular shaders.

New in version R17.032.

Return type

list of BaseShader

Returns

The reflection/specular shaders.

Material.GetReflectionPrimaryLayers(self)

Retrieves the indices to the primary reflection and specular layers (can be -1 for empty).

New in version R17.032.

Return type

tuple(int, int)

Returns

The most significant reflection and specular layers.