Material

class Material
property id

The id of the material.

Type

str, read-only

property name

The name of the material.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property group

The group of the material.

Type

MaterialGroup

Raises

ReadOnlyError -- If Database is in read only mode.

duplicate()

Duplicate this material.

Returns

The duplicated material.

Return type

Material

Raises

ReadOnlyError -- If Database is in read only mode.

remove(force = False)

Delete this material

Note

By default, only not used material can be deleted (InUseError is raised otherwise), use force to force deletion of used materials.

Parameters

force (bool) -- Force the deletion of the material even if it is in use.

Raises
export_kmt(filename)

Export the material to a KMT file.

Parameters

filename (str) -- KMT filename.

Raises

FileNotFoundError -- If the destination directory does not exist.

AxfCPA2Material

class AxfCPA2Material

Base class: Material

property id

The id of the material.

Type

str, read-only

property name

The name of the material.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property group

The group of the material.

Type

MaterialGroup

Raises

ReadOnlyError -- If Database is in read only mode.

property hue_shift

The shift applied to hue, in degrees.

Type

float

Raises
property saturation

The saturation modification.

Type

float

Raises
property exposure

The exposure modification.

Type

float

Raises
property contrast

The contrast modification.

Type

float

Raises
duplicate()

Duplicate this material.

Returns

The duplicated material.

Return type

Material

Raises

ReadOnlyError -- If Database is in read only mode.

remove(force = False)

Delete this material

Note

By default, only not used material can be deleted (InUseError is raised otherwise), use force to force deletion of used materials.

Parameters

force (bool) -- Force the deletion of the material even if it is in use.

Raises
export_kmt(filename)

Export the material to a KMT file.

Parameters

filename (str) -- KMT filename.

Raises

FileNotFoundError -- If the destination directory does not exist.

reset()

Reset this material to default values.

Raises

ReadOnlyError -- If Database is in read only mode.

BumpMode

class BumpMode
HEIGHT = 0

Height map.

NORMAL = 1

Normal map.

EnvMaterial

class EnvMaterial

Base class: Material

property id

The id of the material.

Type

str, read-only

property name

The name of the material.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property group

The group of the material.

Type

MaterialGroup

Raises

ReadOnlyError -- If Database is in read only mode.

property intensity

The intensity of environment.

Type

float

Raises
property hide_surface_in_reflection

Whether to hide surfaces with this material in reflections. Only affects raytracing rendering.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

duplicate()

Duplicate this material.

Returns

The duplicated material.

Return type

Material

Raises

ReadOnlyError -- If Database is in read only mode.

remove(force = False)

Delete this material

Note

By default, only not used material can be deleted (InUseError is raised otherwise), use force to force deletion of used materials.

Parameters

force (bool) -- Force the deletion of the material even if it is in use.

Raises
export_kmt(filename)

Export the material to a KMT file.

Parameters

filename (str) -- KMT filename.

Raises

FileNotFoundError -- If the destination directory does not exist.

FlakesDistribution

class FlakesDistribution
EVEN = 0

Even flakes distribution, usually better for low density of flakes.

RANDOM = 1

Random flakes distribution, usually better for high density of flakes.

LabelMode

class LabelMode
MIX = 0

Mix the label with the material underneath \(Label \times Factor + (1 - Factor) \times Underneath\ Material\).

MULTIPLY = 1

Multiply the label with the material underneath \(Label \times Factor \times Underneath\ Material\).

ADD = 2

Add the label with the material underneath \(Label \times Factor + Underneath\ Material\).

MatteMaterial

class MatteMaterial

Base class: Material

property id

The id of the material.

Type

str, read-only

property name

The name of the material.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property group

The group of the material.

Type

MaterialGroup

Raises

ReadOnlyError -- If Database is in read only mode.

property threshold

The threshold intensity for material transparency.

Type

float

Raises
property offset

The intensity offset.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property outline

The outline value.

Type

float

Raises
property contrast

The contrast value.

Type

float

Raises
duplicate()

Duplicate this material.

Returns

The duplicated material.

Return type

Material

Raises

ReadOnlyError -- If Database is in read only mode.

remove(force = False)

Delete this material

Note

By default, only not used material can be deleted (InUseError is raised otherwise), use force to force deletion of used materials.

Parameters

force (bool) -- Force the deletion of the material even if it is in use.

Raises
export_kmt(filename)

Export the material to a KMT file.

Parameters

filename (str) -- KMT filename.

Raises

FileNotFoundError -- If the destination directory does not exist.

MirrorMaterial

class MirrorMaterial

Base class: Material

property id

The id of the material.

Type

str, read-only

property name

The name of the material.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property group

The group of the material.

Type

MaterialGroup

Raises

ReadOnlyError -- If Database is in read only mode.

property reflection

The reflection color of the mirror.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property transparency_enabled

Whether transparency is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property transparency

The transparency color of the mirror. It only has effect if transparencyEnabled is True.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property inter_reflection

The inter-reflection color of the mirror.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property outbound_type

The type of outbound color to use when the mirror does not reflect any surfaces.

Type

MirrorMaterialOutboundType

Raises

ReadOnlyError -- If Database is in read only mode.

property reflected_surface_tag_enabled

Whether only surfaces with tag set in reflectedSurfaceTag are reflected.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property reflected_surface_tag

The tag surfaces must have to be reflected, if reflectedSurfaceTagEnabled is True.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

duplicate()

Duplicate this material.

Returns

The duplicated material.

Return type

Material

Raises

ReadOnlyError -- If Database is in read only mode.

remove(force = False)

Delete this material

Note

By default, only not used material can be deleted (InUseError is raised otherwise), use force to force deletion of used materials.

Parameters

force (bool) -- Force the deletion of the material even if it is in use.

Raises
export_kmt(filename)

Export the material to a KMT file.

Parameters

filename (str) -- KMT filename.

Raises

FileNotFoundError -- If the destination directory does not exist.

MirrorMaterialOutboundType

class MirrorMaterialOutboundType
BLACK = 0

Black color.

BACKGROUND = 1

Use current background.

ENVIRONMENT = 2

Use current environment.

MultiLayerMaterial

class MultiLayerMaterial

Base class: Material

property id

The id of the material.

Type

str, read-only

property name

The name of the material.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property group

The group of the material.

Type

MaterialGroup

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_relief_depth

The depth of relief bump.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

Whether texture transfomations are linked.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property always_use_as_label

Whether to always use this material as label.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property label_repeat_override

Whether labelRepeatU and labelRepeatV control the material repetition when used as label.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property label_repeat_u

The repetition mode in U direction, when labelRepeatOverride is True.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property label_repeat_v

The repetition mode in V direction, when labelRepeatOverride is True.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property raytrace_reflection_roughness_enabled

Whether to raytrace the reflection roughness of the material.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property raytrace_reflection_roughness_sampling

The number of samples to use when raytrace reflection roughness is enabled.

Type

int

Raises
property overwrite_specular_in_shadow

Whether specularInShadow is used as specular value when raytracing.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_in_shadow

The specular value to use when raytracing, when overwriteSpecularInShadow is True.

Type

float

Raises
property overwrite_refraction_index

Whether raytracingRefractionIndex is used. Affects only the bottom layer.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property raytracing_refraction_index

The refraction index to use when raytracing transmission when overwriteRefractionIndex is enabled. Affects only the bottom layer.

Type

float

Raises
property overwrite_transparency_filter

Whether raytracingTransparencyFilter and raytracingTransparencyFilterFactor are used. Affects only the bottom layer.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property raytracing_transparency_filter

The transparency filter to use when raytracing when overwriteTransparencyFilter is enabled. Affects only the bottom layer.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property raytracing_transparency_filter_factor

The transparency filter factor to use when raytracing when overwriteTransparencyFilter is enabled. Affects only the bottom layer.

Type

float

Raises
property volume_absorption_enabled

Whether volume absorption is enabled. Affects only the bottom layer.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property volume_absorption_fade_distance

The fade distance in meters when volumeAbsorptionEnabled is enabled. Affects only the bottom layer.

Type

float

Raises
property raytrace_transmission_roughness_enabled

Whether to raytrace the transmission roughness of the material. Affects only the bottom layer.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property raytrace_transmission_roughness

The roughness to use when raytrace transmission roughness is enabled, in 0 to 16 range. Affects only the bottom layer.

Type

float

Raises
property raytrace_transmission_roughness_sampling

The number of samples to use when raytrace transmission roughness is enabled. Affects only the bottom layer.

Type

int

Raises
property end_of_course_use_environment

Whether to use the environment when the reflected/refracted ray does not hit anything else. If False, the color specified in endOfCourseColor is used.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property end_of_course_color

The color to use when the reflected/refracted ray does not hit anything else and endOfCourseUseEnvironment is False.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property end_of_course_environment_intensity

The intensity of environment when the reflected/refracted ray does not hit anything else and endOfCourseUseEnvironment is True.

Type

float

Raises
property hide_surface_in_reflection

Whether to hide surfaces with this material in reflections. Only affects raytracing rendering.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

duplicate()

Duplicate this material.

Returns

The duplicated material.

Return type

Material

Raises

ReadOnlyError -- If Database is in read only mode.

remove(force = False)

Delete this material

Note

By default, only not used material can be deleted (InUseError is raised otherwise), use force to force deletion of used materials.

Parameters

force (bool) -- Force the deletion of the material even if it is in use.

Raises
export_kmt(filename)

Export the material to a KMT file.

Parameters

filename (str) -- KMT filename.

Raises

FileNotFoundError -- If the destination directory does not exist.

create_diffuse_layer()

Create a new diffuse layer on top of the stack.

Returns

The newly created layer.

Return type

MultiLayerMaterialDiffuseLayer

Raises

ReadOnlyError -- If Database is in read only mode.

create_specular_layer()

Create a new specular layer on top of the stack.

Returns

The newly created layer.

Return type

MultiLayerMaterialSpecularLayer

Raises

ReadOnlyError -- If Database is in read only mode.

create_illumination_layer()

Create a new illumination layer on top of the stack.

Returns

The newly created layer.

Return type

MultiLayerMaterialIlluminationLayer

Raises

ReadOnlyError -- If Database is in read only mode.

create_flakes_layer()

Create a new flakes layer on top of the stack.

Returns

The newly created layer.

Return type

MultiLayerMaterialFlakesLayer

Raises

ReadOnlyError -- If Database is in read only mode.

list_layers()

List the layers of this material, in bottom to top order.

Returns

The list of layers in the material.

Return type

list(MultiLayerMaterialLayer)

MultiLayerMaterialLayer

class MultiLayerMaterialLayer
property id

The id of the layer.

Type

str, read-only

property name

The name of the layer.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property material

The parent multi layer material.

Type

MultiLayerMaterial, read-only

property index

The index of this layer in the layer list.

Type

int

Raises

ReadOnlyError -- If Database is in read only mode.

property enabled

Whether the layer is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

duplicate()

Duplicate this layer.

Returns

The duplicated layer.

Return type

MultiLayerMaterialLayer

Raises

ReadOnlyError -- If Database is in read only mode.

remove()

Delete this layer.

Raises

ReadOnlyError -- If Database is in read only mode.

MultiLayerMaterialDiffuseLayer

class MultiLayerMaterialDiffuseLayer

Base class: MultiLayerMaterialLayer

property id

The id of the layer.

Type

str, read-only

property name

The name of the layer.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property material

The parent multi layer material.

Type

MultiLayerMaterial, read-only

property index

The index of this layer in the layer list.

Type

int

Raises

ReadOnlyError -- If Database is in read only mode.

property enabled

Whether the layer is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property color

The color of the diffuse layer.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property intensity

The intensity of the diffuse layer.

Type

float

Raises
property ambient_color

The ambient color of the diffuse layer.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_map

The diffuse map of the layer or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_map_enabled

Whether the diffuse map is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_map_width

The physical width of the diffuse texture, in meters.

Type

float

Raises
property diffuse_map_height

The physical height of the diffuse texture, in meters.

Type

float

Raises
property diffuse_map_offset_u

The diffuse texture offset in U direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_map_offset_v

The diffuse texture offset in V direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_map_rotation

The diffuse texture rotation, in degrees.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_map_repeat_u

The diffuse texture repetition mode in U direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_map_repeat_v

The diffuse texture repetition mode in V direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_map_keep_aspect

Whether to keep aspect ratio for diffuse map.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property use_relief_map

Whether the relief map is used instead of the bump map.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_depth

The depth of bump.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map

The bump/normal map of the layer or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_enabled

Whether the bump/normal map is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_mode

The type of bump map.

Type

BumpMode

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_width

The physical width of the bump texture, in meters.

Type

float

Raises
property bump_map_height

The physical height of the bump texture, in meters.

Type

float

Raises
property bump_map_offset_u

The bump texture offset in U direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_offset_v

The bump texture offset in V direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_rotation

The bump texture rotation, in degrees.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_repeat_u

The bump texture repetition mode in U direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_repeat_v

The bump texture repetition mode in V direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_keep_aspect

Whether to keep aspect ratio for bump map.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property opacity

The opacity modulator of the diffuse layer.

Type

float

Raises
property alpha_map

The alpha map of the layer or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property alpha_map_enabled

Whether the alpha map is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property alpha_map_width

The physical width of the alpha texture, in meters.

Type

float

Raises
property alpha_map_height

The physical height of the alpha texture, in meters.

Type

float

Raises
property alpha_map_offset_u

The alpha texture offset in U direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property alpha_map_offset_v

The alpha texture offset in V direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property alpha_map_rotation

The alpha texture rotation, in degrees.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property alpha_map_repeat_u

The alpha texture repetition mode in U direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property alpha_map_repeat_v

The alpha texture repetition mode in V direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property alpha_map_keep_aspect

Whether to keep aspect ratio for alpha map.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property use_diffuse_map_alpha

Whether the diffuse map alpha is used.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property gradient_ramp_enabled

Whether the diffuse gradient ramp is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property gradient_map

The gradient map of the layer or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property gradient_map_enabled

Whether the diffuse gradient map is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

duplicate()

Duplicate this layer.

Returns

The duplicated layer.

Return type

MultiLayerMaterialLayer

Raises

ReadOnlyError -- If Database is in read only mode.

remove()

Delete this layer.

Raises

ReadOnlyError -- If Database is in read only mode.

MultiLayerMaterialFlakesLayer

class MultiLayerMaterialFlakesLayer

Base class: MultiLayerMaterialLayer

property id

The id of the layer.

Type

str, read-only

property name

The name of the layer.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property material

The parent multi layer material.

Type

MultiLayerMaterial, read-only

property index

The index of this layer in the layer list.

Type

int

Raises

ReadOnlyError -- If Database is in read only mode.

property enabled

Whether the layer is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property update_textures_automatically

Whether the flakes textures are updated autmatically on property change.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property flakes_color

The color of the flakes

Note

Only used when flakesColorUseSingle is True.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property flakes_color_use_single

Whether the flakes use a single color (flakesColor).

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property flakes_color_sd

The color standard deviation (in Lab space).

Type

ColorLab

Raises

ReadOnlyError -- If Database is in read only mode.

property flakes_size

The size of flakes (radius) in meters.

Type

float

Raises
property flakes_size_sd

The size of flakes (radius) standard deviation in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property flakes_density

The number of flakes by square meters.

Type

float

Raises
property flakes_orientation

The deviation of flakes normal from the surface normal in degrees.

Type

float

Raises
property flakes_orientation_sd

The flakes orientation standard deviation in degrees.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property flakes_sides

The number of sides of flakes polygons.

Type

int

Raises
property normal_depth

The depth modulation of flakes normal map.

Type

float

Raises
property texture_size

The texture size in pixels.

Type

int

Raises
property seed

The seed to use for random number generator.

Type

int

Raises
property distribution

The random distribution of flakes to use.

Type

FlakesDistribution

Raises

ReadOnlyError -- If Database is in read only mode.

property texture_offset_u

The flakes texture offset in U direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property texture_offset_v

The flakes texture offset in V direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property texture_rotation

The flakes texture rotation, in degrees.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_color

The specular color of the flakes.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_intensity

The specular intensity of the flakes.

Type

float

Raises
property fresnel

Whether to use Fresnel effect.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property refraction_index

The refraction index of Fresnel effect.

Type

float

Raises
property extinction_coefficient

The extinction coefficient of Fresnel effect.

Type

float

Raises
property roughness_enabled

Whether the roughness is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness

The roughness of the flakes, in 0 to 16 range.

Type

float

Raises
property roughness_map

The roughness map of the layer or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_enabled

Whether the roughness map is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_mode

The type of roughness map.

Type

RoughnessMode

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_width

The physical width of the roughness texture, in meters.

Type

float

Raises
property roughness_map_height

The physical height of the roughness texture, in meters.

Type

float

Raises
property roughness_map_offset_u

The roughness texture offset in U direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_offset_v

The roughness texture offset in V direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_rotation

The roughness texture rotation, in degrees.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_repeat_u

The roughness texture repetition mode in U direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_repeat_v

The roughness texture repetition mode in V direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_keep_aspect

Whether to keep aspect ratio for roughness map.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property in_shadow

The value to add to specularIntensity when in shadow.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_filter

The diffuse filter of the layer.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_attenuation

Whether the diffuse attenuation is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

duplicate()

Duplicate this layer.

Returns

The duplicated layer.

Return type

MultiLayerMaterialLayer

Raises

ReadOnlyError -- If Database is in read only mode.

remove()

Delete this layer.

Raises

ReadOnlyError -- If Database is in read only mode.

MultiLayerMaterialIlluminationLayer

class MultiLayerMaterialIlluminationLayer

Base class: MultiLayerMaterialLayer

property id

The id of the layer.

Type

str, read-only

property name

The name of the layer.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property material

The parent multi layer material.

Type

MultiLayerMaterial, read-only

property index

The index of this layer in the layer list.

Type

int

Raises

ReadOnlyError -- If Database is in read only mode.

property enabled

Whether the layer is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property color

The color of the illumination layer.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property intensity

The intensity of the illumination layer.

Type

float

Raises
property in_shadow

The value to add to intensity when in shadow.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property modulation_map

The modulation map of the layer or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property modulation_map_enabled

Whether the modulation map is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property modulation_map_width

The physical width of the modulation texture, in meters.

Type

float

Raises
property modulation_map_height

The physical height of the modulation texture, in meters.

Type

float

Raises
property modulation_map_offset_u

The modulation texture offset in U direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property modulation_map_offset_v

The modulation texture offset in V direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property modulation_map_rotation

The modulation texture rotation, in degrees.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property modulation_map_repeat_u

The modulation texture repetition mode in U direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property modulation_map_repeat_v

The modulation texture repetition mode in V direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property modulation_map_keep_aspect

Whether to keep aspect ratio for modulation map.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property velvet_effect_factor

The velvet effect factor.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property gradient_ramp_enabled

Whether the velvet gradient ramp is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property gradient_map

The velvet gradient map of the layer or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property gradient_map_enabled

Whether the velvet gradient map is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property velvet_use_modulation_map

Whether the velvet effect uses the modulation map.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property use_relief_map

Whether the relief map is used instead of the bump map.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_depth

The depth of bump.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map

The bump/normal map of the layer or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_enabled

Whether the bump/normal map is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_mode

The type of bump map.

Type

BumpMode

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_width

The physical width of the bump texture, in meters.

Type

float

Raises
property bump_map_height

The physical height of the bump texture, in meters.

Type

float

Raises
property bump_map_offset_u

The bump texture offset in U direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_offset_v

The bump texture offset in V direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_rotation

The bump texture rotation, in degrees.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_repeat_u

The bump texture repetition mode in U direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_repeat_v

The bump texture repetition mode in V direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_keep_aspect

Whether to keep aspect ratio for bump map.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

duplicate()

Duplicate this layer.

Returns

The duplicated layer.

Return type

MultiLayerMaterialLayer

Raises

ReadOnlyError -- If Database is in read only mode.

remove()

Delete this layer.

Raises

ReadOnlyError -- If Database is in read only mode.

MultiLayerMaterialSpecularLayer

class MultiLayerMaterialSpecularLayer

Base class: MultiLayerMaterialLayer

property id

The id of the layer.

Type

str, read-only

property name

The name of the layer.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property material

The parent multi layer material.

Type

MultiLayerMaterial, read-only

property index

The index of this layer in the layer list.

Type

int

Raises

ReadOnlyError -- If Database is in read only mode.

property enabled

Whether the layer is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property color

The color of the specular layer.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property intensity

The intensity of the specular layer.

Type

float

Raises
property gradient_ramp_enabled

Whether the diffuse gradient ramp is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property fresnel

Whether to use Fresnel effect.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property refraction_index

The refraction index of Fresnel effect.

Type

float

Raises
property extinction_coefficient

The extinction coefficient of Fresnel effect.

Type

float

Raises
property specular_map

The specular map of the layer or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_map_enabled

Whether the specular map is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_map_width

The physical width of the specular texture, in meters.

Type

float

Raises
property specular_map_height

The physical height of the specular texture, in meters.

Type

float

Raises
property specular_map_offset_u

The specular texture offset in U direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_map_offset_v

The specular texture offset in V direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_map_rotation

The specular texture rotation, in degrees.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_map_repeat_u

The specular texture repetition mode in U direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_map_repeat_v

The specular texture repetition mode in V direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_map_keep_aspect

Whether to keep aspect ratio for specular map.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_enabled

Whether the roughness is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness

The roughness of the layer, in 0 to 16 range.

Type

float

Raises
property roughness_map

The roughness map of the layer or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_enabled

Whether the roughness map is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_mode

The type of roughness map.

Type

RoughnessMode

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_width

The physical width of the roughness texture, in meters.

Type

float

Raises
property roughness_map_height

The physical height of the roughness texture, in meters.

Type

float

Raises
property roughness_map_offset_u

The roughness texture offset in U direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_offset_v

The roughness texture offset in V direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_rotation

The roughness texture rotation, in degrees.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_repeat_u

The roughness texture repetition mode in U direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_repeat_v

The roughness texture repetition mode in V direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_keep_aspect

Whether to keep aspect ratio for roughness map.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property use_relief_map

Whether the relief map is used instead of the bump map.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_depth

The depth of bump.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map

The bump/normal map of the layer or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_enabled

Whether the bump/normal map is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_mode

The type of bump map.

Type

BumpMode

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_width

The physical width of the bump texture, in meters.

Type

float

Raises
property bump_map_height

The physical height of the bump texture, in meters.

Type

float

Raises
property bump_map_offset_u

The bump texture offset in U direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_offset_v

The bump texture offset in V direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_rotation

The bump texture rotation, in degrees.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_repeat_u

The bump texture repetition mode in U direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_repeat_v

The bump texture repetition mode in V direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_keep_aspect

Whether to keep aspect ratio for bump map.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property in_shadow

The value to add to intensity when in shadow.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_filter

The diffuse filter of the layer.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_attenuation

Whether the diffuse attenuation is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

duplicate()

Duplicate this layer.

Returns

The duplicated layer.

Return type

MultiLayerMaterialLayer

Raises

ReadOnlyError -- If Database is in read only mode.

remove()

Delete this layer.

Raises

ReadOnlyError -- If Database is in read only mode.

RepetitionMode

class RepetitionMode
NO_REPEAT = 0

No repetition.

REPEAT = 1

Repetition.

REPEAT_MIRRORED = 2

Mirrored repetition.

RoughnessMode

class RoughnessMode
ROUGHNESS = 0

Roughness map.

GLOSS = 1

Gloss map.

SeamMaterial

class SeamMaterial

Base class: Material

property id

The id of the material.

Type

str, read-only

property name

The name of the material.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property group

The group of the material.

Type

MaterialGroup

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_color

The diffuse color of the material.

Type

ColorRgb, read-only

property diffuse_intensity

The diffuse intensity of the material.

Type

float, read-only

property diffuse_map

The diffuse map of the material or None if there is no map assigned.

Type

Texture or None, read-only

property diffuse_map_enabled

Whether the diffuse map is enabled.

Type

bool, read-only

property ambient_color

The ambient color of the material.

Type

ColorRgb, read-only

property reflection_color

The reflection color of the material.

Type

ColorRgb, read-only

property reflection_intensity

The reflection intensity of the material.

Type

float, read-only

property roughness

The roughness of the material, in 0 to 16 range.

Type

float, read-only

property diffuse_filter

The diffuse filter of the material.

Type

ColorRgb, read-only

property pleat_map

The pleat map of the material or None if there is no map assigned.

Type

Texture or None, read-only

property pleat_map_enabled

Whether the pleat map is enabled.

Type

bool, read-only

property pleat_diffuse_bump_depth

The depth diffuse bump for pleat map.

Type

float, read-only

property seam_map

The seam map of the material or None if there is no map assigned.

Type

Texture or None, read-only

property seam_map_enabled

Whether the seam map is enabled.

Type

bool, read-only

property seam_diffuse_bump

Whether the diffuse bump is enabled for seam map.

Type

bool, read-only

property seam_diffuse_bump_depth

The depth of diffuse bump for seam map.

Type

float, read-only

property seam_reflection_bump

Whether the reflection bump is enabled for seam map.

Type

bool, read-only

property seam_reflection_bump_depth

The depth of reflection bump for seam map.

Type

float, read-only

duplicate()

Duplicate this material.

Returns

The duplicated material.

Return type

Material

Raises

ReadOnlyError -- If Database is in read only mode.

remove(force = False)

Delete this material

Note

By default, only not used material can be deleted (InUseError is raised otherwise), use force to force deletion of used materials.

Parameters

force (bool) -- Force the deletion of the material even if it is in use.

Raises
export_kmt(filename)

Export the material to a KMT file.

Parameters

filename (str) -- KMT filename.

Raises

FileNotFoundError -- If the destination directory does not exist.

StandardMaterial

class StandardMaterial

Base class: Material

property id

The id of the material.

Type

str, read-only

property name

The name of the material.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property group

The group of the material.

Type

MaterialGroup

Raises

ReadOnlyError -- If Database is in read only mode.

property type

The type of standard material.

Type

StandardMaterialType

Raises

ReadOnlyError -- If Database is in read only mode.

Whether texture transfomations are linked.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_color

The diffuse color of the material.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_intensity

The diffuse intensity of the material.

Type

float

Raises
property diffuse_map

The diffuse map of the material or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_map_enabled

Whether the diffuse map is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_map_width

The physical width of the diffuse texture, in meters.

Type

float

Raises
property diffuse_map_height

The physical height of the diffuse texture, in meters.

Type

float

Raises
property diffuse_map_offset_u

The diffuse texture offset in U direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_map_offset_v

The diffuse texture offset in V direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_map_rotation

The diffuse texture rotation, in degrees.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_map_repeat_u

The diffuse texture repetition mode in U direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_map_repeat_v

The diffuse texture repetition mode in V direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_map_keep_aspect

Whether to keep aspect ratio for diffuse map.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property opacity

The opacity modulator of the material.

Type

float

Raises
property alpha_map

The alpha map of the material or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property alpha_map_enabled

Whether the alpha map is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property alpha_map_width

The physical width of the alpha texture, in meters.

Type

float

Raises
property alpha_map_height

The physical height of the alpha texture, in meters.

Type

float

Raises
property alpha_map_offset_u

The alpha texture offset in U direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property alpha_map_offset_v

The alpha texture offset in V direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property alpha_map_rotation

The alpha texture rotation, in degrees.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property alpha_map_repeat_u

The alpha texture repetition mode in U direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property alpha_map_repeat_v

The alpha texture repetition mode in V direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property alpha_map_keep_aspect

Whether to keep aspect ratio for alpha map.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property use_diffuse_map_alpha

Whether the diffuse map alpha is used.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property ambient_color

The ambient color of the material.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property illumination_color

The illumination color of the material.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property illumination_intensity

The illumination intensity of the material.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_gradient_ramp_enabled

Whether the diffuse gradient ramp is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_gradient_map

The diffuse gradient map of the material or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_gradient_map_enabled

Whether the diffuse gradient map is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property reflection_color

The reflection color of the material.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property reflection_intensity

The reflection intensity of the material.

Type

float

Raises
property fresnel

Whether to use Fresnel effect.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property refraction_index

The refraction index of Fresnel effect.

Type

float

Raises
property extinction_coefficient

The extinction coefficient of Fresnel effect.

Type

float

Raises
property specular_map

The specular map of the material or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_map_enabled

Whether the specular map is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_map_width

The physical width of the specular texture, in meters.

Type

float

Raises
property specular_map_height

The physical height of the specular texture, in meters.

Type

float

Raises
property specular_map_offset_u

The specular texture offset in U direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_map_offset_v

The specular texture offset in V direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_map_rotation

The specular texture rotation, in degrees.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_map_repeat_u

The specular texture repetition mode in U direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_map_repeat_v

The specular texture repetition mode in V direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_map_keep_aspect

Whether to keep aspect ratio for specular map.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_enabled

Whether the roughness is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness

The roughness of the material, in 0 to 16 range.

Type

float

Raises
property roughness_map

The roughness map of the material or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_enabled

Whether the roughness map is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_mode

The type of roughness map.

Type

RoughnessMode

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_width

The physical width of the roughness texture, in meters.

Type

float

Raises
property roughness_map_height

The physical height of the roughness texture, in meters.

Type

float

Raises
property roughness_map_offset_u

The roughness texture offset in U direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_offset_v

The roughness texture offset in V direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_rotation

The roughness texture rotation, in degrees.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_repeat_u

The roughness texture repetition mode in U direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_repeat_v

The roughness texture repetition mode in V direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property roughness_map_keep_aspect

Whether to keep aspect ratio for roughness map.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property in_shadow

The value to add to reflectionIntensity when in shadow.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_filter

The diffuse filter of the material

Note

In case of a transparent material, it also correspond to the transparent filter of the material.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_attenuation

Whether the diffuse attenuation is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property velvet_effect

Whether the velvet effect is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property velvet_effect_factor

The velvet effect factor.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property velvet_gradient_ramp_enabled

Whether the velvet gradient ramp is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property velvet_gradient_map

The velvet gradient map of the material or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property velvet_gradient_map_enabled

Whether the velvet gradient map is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property velvet_use_specular_map

Whether the velvet effect uses the specular map.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_diffuse

Whether the diffuse bump is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_diffuse_depth

The depth of diffuse bump.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_reflection

Whether the reflection bump is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_reflection_depth

The depth of reflection bump.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_relief

Whether the relief bump is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_relief_depth

The depth of relief bump.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map

The bump/normal map of the material or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_mode

The type of bump map.

Type

BumpMode

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_width

The physical width of the bump texture, in meters.

Type

float

Raises
property bump_map_height

The physical height of the bump texture, in meters.

Type

float

Raises
property bump_map_offset_u

The bump texture offset in U direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_offset_v

The bump texture offset in V direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_rotation

The bump texture rotation, in degrees.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_repeat_u

The bump texture repetition mode in U direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_repeat_v

The bump texture repetition mode in V direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property bump_map_keep_aspect

Whether to keep aspect ratio for bump map.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property always_use_as_label

Whether to always use this material as label.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property label_blend_mode

The blending mode to use.

Type

LabelMode

Raises

ReadOnlyError -- If Database is in read only mode.

property label_blend_factor

The blending factor to use.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property label_repeat_u

The repetition mode in U direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property label_repeat_v

The repetition mode in V direction.

Type

RepetitionMode

Raises

ReadOnlyError -- If Database is in read only mode.

property raytrace_reflection_roughness_enabled

Whether to raytrace the reflection roughness of the material. Not used when the type of material is DIFFUSE.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property raytrace_reflection_roughness_sampling

The number of samples to use when raytrace reflection roughness is enabled. Not used when the type of material is DIFFUSE.

Type

int

Raises
property overwrite_specular_in_shadow

Whether specularInShadow is used as specular value when raytracing. Not used when the type of material is DIFFUSE.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_in_shadow

The specular value to use when raytracing, when overwriteSpecularInShadow is True. Not used when the type of material is DIFFUSE.

Type

float

Raises
property overwrite_transparency_filter

Whether raytracingTransparencyFilter and raytracingTransparencyFilterFactor are used. Not used when the type of material is DIFFUSE or DIFFUSE_REFLECTION.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property raytracing_transparency_filter

The transparency filter to use when raytracing when overwriteTransparencyFilter is enabled. Not used when the type of material is DIFFUSE or DIFFUSE_REFLECTION.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property raytracing_transparency_filter_factor

The transparency filter factor to use when raytracing when overwriteTransparencyFilter is enabled. Not used when the type of material is DIFFUSE or DIFFUSE_REFLECTION.

Type

float

Raises
property volume_absorption_enabled

Whether volume absorption is enabled. Not used when the type of material is DIFFUSE or DIFFUSE_REFLECTION.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property volume_absorption_fade_distance

The fade distance in meters when volumeAbsorptionEnabled is enabled. Not used when the type of material is DIFFUSE or DIFFUSE_REFLECTION.

Type

float

Raises
property raytrace_transmission_roughness_enabled

Whether to raytrace the transmission roughness of the material. Not used when the type of material is DIFFUSE or DIFFUSE_REFLECTION.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property raytrace_transmission_roughness

The roughness to use when raytrace transmission roughness is enabled, in 0 to 16 range. Not used when the type of material is DIFFUSE or DIFFUSE_REFLECTION.

Type

float

Raises
property raytrace_transmission_roughness_sampling

The number of samples to use when raytrace transmission roughness is enabled. Not used when the type of material is DIFFUSE or DIFFUSE_REFLECTION.

Type

int

Raises
property end_of_course_use_environment

Whether to use the environment when the reflected/refracted ray does not hit anything else. If False, the color specified in endOfCourseColor is used.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property end_of_course_color

The color to use when the reflected/refracted ray does not hit anything else and endOfCourseUseEnvironment is False.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property end_of_course_environment_intensity

The intensity of environment when the reflected/refracted ray does not hit anything else and endOfCourseUseEnvironment is True.

Type

float

Raises
property hide_surface_in_reflection

Whether to hide surfaces with this material in reflections. Only affects raytracing rendering.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

duplicate()

Duplicate this material.

Returns

The duplicated material.

Return type

Material

Raises

ReadOnlyError -- If Database is in read only mode.

remove(force = False)

Delete this material

Note

By default, only not used material can be deleted (InUseError is raised otherwise), use force to force deletion of used materials.

Parameters

force (bool) -- Force the deletion of the material even if it is in use.

Raises
export_kmt(filename)

Export the material to a KMT file.

Parameters

filename (str) -- KMT filename.

Raises

FileNotFoundError -- If the destination directory does not exist.

StandardMaterialType

class StandardMaterialType
DIFFUSE = 0

Diffuse only.

DIFFUSE_REFLECTION = 1

Diffuse and reflection.

TRANSPARENT = 2

Transparent filter.