Material¶
-
class
Material¶ -
-
property
name¶ The name of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
group¶ The group of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
duplicate()¶ Duplicate this material.
- Returns
The duplicated material.
- Return type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
remove(force = False)¶ Delete this material
Note
By default, only not used material can be deleted (
InUseErroris raised otherwise), useforceto force deletion of used materials.- Parameters
force (bool) -- Force the deletion of the material even if it is in use.
- Raises
InUseError -- If
forceisFalseand the material is used.ReadOnlyError -- If
Databaseis in read only mode.
-
export_kmt(filename)¶ Export the material to a KMT file.
- Parameters
filename (str) -- KMT filename.
- Raises
FileNotFoundError -- If the destination directory does not exist.
-
property
AxfCPA2Material¶
-
class
AxfCPA2Material¶ Base class:
Material-
property
name¶ The name of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
group¶ The group of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
hue_shift¶ The shift applied to hue, in degrees.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a hue shift not between -180 and 180.
-
property
saturation¶ The saturation modification.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative saturation.
-
property
exposure¶ The exposure modification.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative exposure.
-
property
contrast¶ The contrast modification.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative contrast.
-
duplicate()¶ Duplicate this material.
- Returns
The duplicated material.
- Return type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
remove(force = False)¶ Delete this material
Note
By default, only not used material can be deleted (
InUseErroris raised otherwise), useforceto force deletion of used materials.- Parameters
force (bool) -- Force the deletion of the material even if it is in use.
- Raises
InUseError -- If
forceisFalseand the material is used.ReadOnlyError -- If
Databaseis in read only mode.
-
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
Databaseis in read only mode.
-
property
BumpMode¶
EnvMaterial¶
-
class
EnvMaterial¶ Base class:
Material-
property
name¶ The name of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
group¶ The group of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
intensity¶ The intensity of environment.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative intensity.
-
property
hide_surface_in_reflection¶ Whether to hide surfaces with this material in reflections. Only affects raytracing rendering.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
duplicate()¶ Duplicate this material.
- Returns
The duplicated material.
- Return type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
remove(force = False)¶ Delete this material
Note
By default, only not used material can be deleted (
InUseErroris raised otherwise), useforceto force deletion of used materials.- Parameters
force (bool) -- Force the deletion of the material even if it is in use.
- Raises
InUseError -- If
forceisFalseand the material is used.ReadOnlyError -- If
Databaseis in read only mode.
-
export_kmt(filename)¶ Export the material to a KMT file.
- Parameters
filename (str) -- KMT filename.
- Raises
FileNotFoundError -- If the destination directory does not exist.
-
property
FlakesDistribution¶
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
name¶ The name of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
group¶ The group of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
threshold¶ The threshold intensity for material transparency.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative threshold.
-
property
offset¶ The intensity offset.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
outline¶ The outline value.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative outline or a outline greater than 1.
-
property
contrast¶ The contrast value.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative contrast.
-
duplicate()¶ Duplicate this material.
- Returns
The duplicated material.
- Return type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
remove(force = False)¶ Delete this material
Note
By default, only not used material can be deleted (
InUseErroris raised otherwise), useforceto force deletion of used materials.- Parameters
force (bool) -- Force the deletion of the material even if it is in use.
- Raises
InUseError -- If
forceisFalseand the material is used.ReadOnlyError -- If
Databaseis in read only mode.
-
export_kmt(filename)¶ Export the material to a KMT file.
- Parameters
filename (str) -- KMT filename.
- Raises
FileNotFoundError -- If the destination directory does not exist.
-
property
MirrorMaterial¶
-
class
MirrorMaterial¶ Base class:
Material-
property
name¶ The name of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
group¶ The group of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
reflection¶ The reflection color of the mirror.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
transparency_enabled¶ Whether transparency is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
transparency¶ The transparency color of the mirror. It only has effect if
transparencyEnabledisTrue.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
inter_reflection¶ The inter-reflection color of the mirror.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
outbound_type¶ The type of outbound color to use when the mirror does not reflect any surfaces.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
reflected_surface_tag_enabled¶ Whether only surfaces with tag set in
reflectedSurfaceTagare reflected.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
reflected_surface_tag¶ The tag surfaces must have to be reflected, if
reflectedSurfaceTagEnabledisTrue.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
duplicate()¶ Duplicate this material.
- Returns
The duplicated material.
- Return type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
remove(force = False)¶ Delete this material
Note
By default, only not used material can be deleted (
InUseErroris raised otherwise), useforceto force deletion of used materials.- Parameters
force (bool) -- Force the deletion of the material even if it is in use.
- Raises
InUseError -- If
forceisFalseand the material is used.ReadOnlyError -- If
Databaseis in read only mode.
-
export_kmt(filename)¶ Export the material to a KMT file.
- Parameters
filename (str) -- KMT filename.
- Raises
FileNotFoundError -- If the destination directory does not exist.
-
property
MirrorMaterialOutboundType¶
MultiLayerMaterial¶
-
class
MultiLayerMaterial¶ Base class:
Material-
property
name¶ The name of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
group¶ The group of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_relief_depth¶ The depth of relief bump.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
link_transformations¶ Whether texture transfomations are linked.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
always_use_as_label¶ Whether to always use this material as label.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
label_repeat_override¶ Whether
labelRepeatUandlabelRepeatVcontrol the material repetition when used as label.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
label_repeat_u¶ The repetition mode in U direction, when
labelRepeatOverrideisTrue.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
label_repeat_v¶ The repetition mode in V direction, when
labelRepeatOverrideisTrue.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
raytrace_reflection_roughness_enabled¶ Whether to raytrace the reflection roughness of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
raytrace_reflection_roughness_sampling¶ The number of samples to use when raytrace reflection roughness is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a sampling less than 1.
-
property
overwrite_specular_in_shadow¶ Whether
specularInShadowis used as specular value when raytracing.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
specular_in_shadow¶ The specular value to use when raytracing, when
overwriteSpecularInShadowisTrue.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a specular value less than -1 or greater than 1.
-
property
overwrite_refraction_index¶ Whether
raytracingRefractionIndexis used. Affects only the bottom layer.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
raytracing_refraction_index¶ The refraction index to use when raytracing transmission when
overwriteRefractionIndexis enabled. Affects only the bottom layer.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative index.
-
property
overwrite_transparency_filter¶ Whether
raytracingTransparencyFilterandraytracingTransparencyFilterFactorare used. Affects only the bottom layer.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
raytracing_transparency_filter¶ The transparency filter to use when raytracing when
overwriteTransparencyFilteris enabled. Affects only the bottom layer.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
raytracing_transparency_filter_factor¶ The transparency filter factor to use when raytracing when
overwriteTransparencyFilteris enabled. Affects only the bottom layer.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative factor or a factor greater than 1.
-
property
volume_absorption_enabled¶ Whether volume absorption is enabled. Affects only the bottom layer.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
volume_absorption_fade_distance¶ The fade distance in meters when
volumeAbsorptionEnabledis enabled. Affects only the bottom layer.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative distance.
-
property
raytrace_transmission_roughness_enabled¶ Whether to raytrace the transmission roughness of the material. Affects only the bottom layer.
- Type
- Raises
ReadOnlyError -- If
Databaseis 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
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative roughness or a roughness greater than 16.
-
property
raytrace_transmission_roughness_sampling¶ The number of samples to use when raytrace transmission roughness is enabled. Affects only the bottom layer.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a sampling less than 1.
-
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 inendOfCourseColoris used.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
end_of_course_color¶ The color to use when the reflected/refracted ray does not hit anything else and
endOfCourseUseEnvironmentisFalse.- Type
- Raises
ReadOnlyError -- If
Databaseis 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
endOfCourseUseEnvironmentisTrue.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative intensity.
-
property
hide_surface_in_reflection¶ Whether to hide surfaces with this material in reflections. Only affects raytracing rendering.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
duplicate()¶ Duplicate this material.
- Returns
The duplicated material.
- Return type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
remove(force = False)¶ Delete this material
Note
By default, only not used material can be deleted (
InUseErroris raised otherwise), useforceto force deletion of used materials.- Parameters
force (bool) -- Force the deletion of the material even if it is in use.
- Raises
InUseError -- If
forceisFalseand the material is used.ReadOnlyError -- If
Databaseis in read only mode.
-
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
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
create_specular_layer()¶ Create a new specular layer on top of the stack.
- Returns
The newly created layer.
- Return type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
create_illumination_layer()¶ Create a new illumination layer on top of the stack.
- Returns
The newly created layer.
- Return type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
create_flakes_layer()¶ Create a new flakes layer on top of the stack.
- Returns
The newly created layer.
- Return type
- Raises
ReadOnlyError -- If
Databaseis 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
-
property
MultiLayerMaterialLayer¶
-
class
MultiLayerMaterialLayer¶ -
-
property
name¶ The name of the layer.
- Type
- Raises
ReadOnlyError -- If
Databaseis 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
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
enabled¶ Whether the layer is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
duplicate()¶ Duplicate this layer.
- Returns
The duplicated layer.
- Return type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
remove()¶ Delete this layer.
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
MultiLayerMaterialDiffuseLayer¶
-
class
MultiLayerMaterialDiffuseLayer¶ Base class:
MultiLayerMaterialLayer-
property
name¶ The name of the layer.
- Type
- Raises
ReadOnlyError -- If
Databaseis 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
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
enabled¶ Whether the layer is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
color¶ The color of the diffuse layer.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
intensity¶ The intensity of the diffuse layer.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative intensity.
-
property
ambient_color¶ The ambient color of the diffuse layer.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_map¶ The diffuse map of the layer or
Noneif there is no map assigned.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_map_enabled¶ Whether the diffuse map is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_map_width¶ The physical width of the diffuse texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative width.
-
property
diffuse_map_height¶ The physical height of the diffuse texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative height.
-
property
diffuse_map_offset_u¶ The diffuse texture offset in U direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_map_offset_v¶ The diffuse texture offset in V direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_map_rotation¶ The diffuse texture rotation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_map_repeat_u¶ The diffuse texture repetition mode in U direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_map_repeat_v¶ The diffuse texture repetition mode in V direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_map_keep_aspect¶ Whether to keep aspect ratio for diffuse map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
use_relief_map¶ Whether the relief map is used instead of the bump map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_depth¶ The depth of bump.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map¶ The bump/normal map of the layer or
Noneif there is no map assigned.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_enabled¶ Whether the bump/normal map is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_mode¶ The type of bump map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_width¶ The physical width of the bump texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative width.
-
property
bump_map_height¶ The physical height of the bump texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative height.
-
property
bump_map_offset_u¶ The bump texture offset in U direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_offset_v¶ The bump texture offset in V direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_rotation¶ The bump texture rotation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_repeat_u¶ The bump texture repetition mode in U direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_repeat_v¶ The bump texture repetition mode in V direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_keep_aspect¶ Whether to keep aspect ratio for bump map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
opacity¶ The opacity modulator of the diffuse layer.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative opacity or an opacity greater than 1.
-
property
alpha_map¶ The alpha map of the layer or
Noneif there is no map assigned.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
alpha_map_enabled¶ Whether the alpha map is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
alpha_map_width¶ The physical width of the alpha texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative width.
-
property
alpha_map_height¶ The physical height of the alpha texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative height.
-
property
alpha_map_offset_u¶ The alpha texture offset in U direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
alpha_map_offset_v¶ The alpha texture offset in V direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
alpha_map_rotation¶ The alpha texture rotation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
alpha_map_repeat_u¶ The alpha texture repetition mode in U direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
alpha_map_repeat_v¶ The alpha texture repetition mode in V direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
alpha_map_keep_aspect¶ Whether to keep aspect ratio for alpha map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
use_diffuse_map_alpha¶ Whether the diffuse map alpha is used.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
gradient_ramp_enabled¶ Whether the diffuse gradient ramp is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
gradient_map¶ The gradient map of the layer or
Noneif there is no map assigned.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
gradient_map_enabled¶ Whether the diffuse gradient map is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
duplicate()¶ Duplicate this layer.
- Returns
The duplicated layer.
- Return type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
remove()¶ Delete this layer.
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
MultiLayerMaterialFlakesLayer¶
-
class
MultiLayerMaterialFlakesLayer¶ Base class:
MultiLayerMaterialLayer-
property
name¶ The name of the layer.
- Type
- Raises
ReadOnlyError -- If
Databaseis 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
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
enabled¶ Whether the layer is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
update_textures_automatically¶ Whether the flakes textures are updated autmatically on property change.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
flakes_color¶ The color of the flakes
Note
Only used when
flakesColorUseSingleisTrue.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
flakes_color_use_single¶ Whether the flakes use a single color (
flakesColor).- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
flakes_color_sd¶ The color standard deviation (in Lab space).
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
flakes_size¶ The size of flakes (radius) in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative size.
-
property
flakes_size_sd¶ The size of flakes (radius) standard deviation in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
flakes_density¶ The number of flakes by square meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative density.
-
property
flakes_orientation¶ The deviation of flakes normal from the surface normal in degrees.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative orientation or an orientation greater than 90.
-
property
flakes_orientation_sd¶ The flakes orientation standard deviation in degrees.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
flakes_sides¶ The number of sides of flakes polygons.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a number of sides less than 3 or a number of sides greater than 8.
-
property
normal_depth¶ The depth modulation of flakes normal map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative depth.
-
property
texture_size¶ The texture size in pixels.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a texture size less than 1.
-
property
seed¶ The seed to use for random number generator.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative seed.
-
property
distribution¶ The random distribution of flakes to use.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
texture_offset_u¶ The flakes texture offset in U direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
texture_offset_v¶ The flakes texture offset in V direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
texture_rotation¶ The flakes texture rotation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
specular_color¶ The specular color of the flakes.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
specular_intensity¶ The specular intensity of the flakes.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative intensity.
-
property
fresnel¶ Whether to use Fresnel effect.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
refraction_index¶ The refraction index of Fresnel effect.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative index.
-
property
extinction_coefficient¶ The extinction coefficient of Fresnel effect.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative coefficient.
-
property
roughness_enabled¶ Whether the roughness is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness¶ The roughness of the flakes, in 0 to 16 range.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative roughness or a roughness greater than 16.
-
property
roughness_map¶ The roughness map of the layer or
Noneif there is no map assigned.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_enabled¶ Whether the roughness map is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_mode¶ The type of roughness map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_width¶ The physical width of the roughness texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative width.
-
property
roughness_map_height¶ The physical height of the roughness texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative height.
-
property
roughness_map_offset_u¶ The roughness texture offset in U direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_offset_v¶ The roughness texture offset in V direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_rotation¶ The roughness texture rotation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_repeat_u¶ The roughness texture repetition mode in U direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_repeat_v¶ The roughness texture repetition mode in V direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_keep_aspect¶ Whether to keep aspect ratio for roughness map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
in_shadow¶ The value to add to
specularIntensitywhen in shadow.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_filter¶ The diffuse filter of the layer.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_attenuation¶ Whether the diffuse attenuation is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
duplicate()¶ Duplicate this layer.
- Returns
The duplicated layer.
- Return type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
remove()¶ Delete this layer.
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
MultiLayerMaterialIlluminationLayer¶
-
class
MultiLayerMaterialIlluminationLayer¶ Base class:
MultiLayerMaterialLayer-
property
name¶ The name of the layer.
- Type
- Raises
ReadOnlyError -- If
Databaseis 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
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
enabled¶ Whether the layer is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
color¶ The color of the illumination layer.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
intensity¶ The intensity of the illumination layer.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative intensity.
-
property
in_shadow¶ The value to add to
intensitywhen in shadow.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
modulation_map¶ The modulation map of the layer or
Noneif there is no map assigned.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
modulation_map_enabled¶ Whether the modulation map is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
modulation_map_width¶ The physical width of the modulation texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative width.
-
property
modulation_map_height¶ The physical height of the modulation texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative height.
-
property
modulation_map_offset_u¶ The modulation texture offset in U direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
modulation_map_offset_v¶ The modulation texture offset in V direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
modulation_map_rotation¶ The modulation texture rotation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
modulation_map_repeat_u¶ The modulation texture repetition mode in U direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
modulation_map_repeat_v¶ The modulation texture repetition mode in V direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
modulation_map_keep_aspect¶ Whether to keep aspect ratio for modulation map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
velvet_effect_factor¶ The velvet effect factor.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
gradient_ramp_enabled¶ Whether the velvet gradient ramp is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
gradient_map¶ The velvet gradient map of the layer or
Noneif there is no map assigned.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
gradient_map_enabled¶ Whether the velvet gradient map is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
velvet_use_modulation_map¶ Whether the velvet effect uses the modulation map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
use_relief_map¶ Whether the relief map is used instead of the bump map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_depth¶ The depth of bump.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map¶ The bump/normal map of the layer or
Noneif there is no map assigned.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_enabled¶ Whether the bump/normal map is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_mode¶ The type of bump map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_width¶ The physical width of the bump texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative width.
-
property
bump_map_height¶ The physical height of the bump texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative height.
-
property
bump_map_offset_u¶ The bump texture offset in U direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_offset_v¶ The bump texture offset in V direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_rotation¶ The bump texture rotation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_repeat_u¶ The bump texture repetition mode in U direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_repeat_v¶ The bump texture repetition mode in V direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_keep_aspect¶ Whether to keep aspect ratio for bump map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
duplicate()¶ Duplicate this layer.
- Returns
The duplicated layer.
- Return type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
remove()¶ Delete this layer.
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
MultiLayerMaterialSpecularLayer¶
-
class
MultiLayerMaterialSpecularLayer¶ Base class:
MultiLayerMaterialLayer-
property
name¶ The name of the layer.
- Type
- Raises
ReadOnlyError -- If
Databaseis 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
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
enabled¶ Whether the layer is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
color¶ The color of the specular layer.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
intensity¶ The intensity of the specular layer.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative intensity.
-
property
gradient_ramp_enabled¶ Whether the diffuse gradient ramp is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
fresnel¶ Whether to use Fresnel effect.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
refraction_index¶ The refraction index of Fresnel effect.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative index.
-
property
extinction_coefficient¶ The extinction coefficient of Fresnel effect.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative coefficient.
-
property
specular_map¶ The specular map of the layer or
Noneif there is no map assigned.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
specular_map_enabled¶ Whether the specular map is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
specular_map_width¶ The physical width of the specular texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative width.
-
property
specular_map_height¶ The physical height of the specular texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative height.
-
property
specular_map_offset_u¶ The specular texture offset in U direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
specular_map_offset_v¶ The specular texture offset in V direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
specular_map_rotation¶ The specular texture rotation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
specular_map_repeat_u¶ The specular texture repetition mode in U direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
specular_map_repeat_v¶ The specular texture repetition mode in V direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
specular_map_keep_aspect¶ Whether to keep aspect ratio for specular map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_enabled¶ Whether the roughness is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness¶ The roughness of the layer, in 0 to 16 range.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative roughness or a roughness greater than 16.
-
property
roughness_map¶ The roughness map of the layer or
Noneif there is no map assigned.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_enabled¶ Whether the roughness map is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_mode¶ The type of roughness map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_width¶ The physical width of the roughness texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative width.
-
property
roughness_map_height¶ The physical height of the roughness texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative height.
-
property
roughness_map_offset_u¶ The roughness texture offset in U direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_offset_v¶ The roughness texture offset in V direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_rotation¶ The roughness texture rotation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_repeat_u¶ The roughness texture repetition mode in U direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_repeat_v¶ The roughness texture repetition mode in V direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_keep_aspect¶ Whether to keep aspect ratio for roughness map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
use_relief_map¶ Whether the relief map is used instead of the bump map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_depth¶ The depth of bump.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map¶ The bump/normal map of the layer or
Noneif there is no map assigned.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_enabled¶ Whether the bump/normal map is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_mode¶ The type of bump map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_width¶ The physical width of the bump texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative width.
-
property
bump_map_height¶ The physical height of the bump texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative height.
-
property
bump_map_offset_u¶ The bump texture offset in U direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_offset_v¶ The bump texture offset in V direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_rotation¶ The bump texture rotation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_repeat_u¶ The bump texture repetition mode in U direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_repeat_v¶ The bump texture repetition mode in V direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_keep_aspect¶ Whether to keep aspect ratio for bump map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
in_shadow¶ The value to add to
intensitywhen in shadow.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_filter¶ The diffuse filter of the layer.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_attenuation¶ Whether the diffuse attenuation is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
duplicate()¶ Duplicate this layer.
- Returns
The duplicated layer.
- Return type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
remove()¶ Delete this layer.
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
RepetitionMode¶
RoughnessMode¶
SeamMaterial¶
-
class
SeamMaterial¶ Base class:
Material-
property
name¶ The name of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
group¶ The group of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
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
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
remove(force = False)¶ Delete this material
Note
By default, only not used material can be deleted (
InUseErroris raised otherwise), useforceto force deletion of used materials.- Parameters
force (bool) -- Force the deletion of the material even if it is in use.
- Raises
InUseError -- If
forceisFalseand the material is used.ReadOnlyError -- If
Databaseis in read only mode.
-
export_kmt(filename)¶ Export the material to a KMT file.
- Parameters
filename (str) -- KMT filename.
- Raises
FileNotFoundError -- If the destination directory does not exist.
-
property
StandardMaterial¶
-
class
StandardMaterial¶ Base class:
Material-
property
name¶ The name of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
group¶ The group of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
type¶ The type of standard material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
link_transformations¶ Whether texture transfomations are linked.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_color¶ The diffuse color of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_intensity¶ The diffuse intensity of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative intensity.
-
property
diffuse_map¶ The diffuse map of the material or
Noneif there is no map assigned.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_map_enabled¶ Whether the diffuse map is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_map_width¶ The physical width of the diffuse texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative width.
-
property
diffuse_map_height¶ The physical height of the diffuse texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative height.
-
property
diffuse_map_offset_u¶ The diffuse texture offset in U direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_map_offset_v¶ The diffuse texture offset in V direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_map_rotation¶ The diffuse texture rotation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_map_repeat_u¶ The diffuse texture repetition mode in U direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_map_repeat_v¶ The diffuse texture repetition mode in V direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_map_keep_aspect¶ Whether to keep aspect ratio for diffuse map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
opacity¶ The opacity modulator of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative opacity or an opacity greater than 1.
-
property
alpha_map¶ The alpha map of the material or
Noneif there is no map assigned.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
alpha_map_enabled¶ Whether the alpha map is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
alpha_map_width¶ The physical width of the alpha texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative width.
-
property
alpha_map_height¶ The physical height of the alpha texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative height.
-
property
alpha_map_offset_u¶ The alpha texture offset in U direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
alpha_map_offset_v¶ The alpha texture offset in V direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
alpha_map_rotation¶ The alpha texture rotation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
alpha_map_repeat_u¶ The alpha texture repetition mode in U direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
alpha_map_repeat_v¶ The alpha texture repetition mode in V direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
alpha_map_keep_aspect¶ Whether to keep aspect ratio for alpha map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
use_diffuse_map_alpha¶ Whether the diffuse map alpha is used.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
ambient_color¶ The ambient color of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
illumination_color¶ The illumination color of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
illumination_intensity¶ The illumination intensity of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_gradient_ramp_enabled¶ Whether the diffuse gradient ramp is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_gradient_map¶ The diffuse gradient map of the material or
Noneif there is no map assigned.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_gradient_map_enabled¶ Whether the diffuse gradient map is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
reflection_color¶ The reflection color of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
reflection_intensity¶ The reflection intensity of the material.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative intensity.
-
property
fresnel¶ Whether to use Fresnel effect.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
refraction_index¶ The refraction index of Fresnel effect.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative index.
-
property
extinction_coefficient¶ The extinction coefficient of Fresnel effect.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative coefficient.
-
property
specular_map¶ The specular map of the material or
Noneif there is no map assigned.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
specular_map_enabled¶ Whether the specular map is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
specular_map_width¶ The physical width of the specular texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative width.
-
property
specular_map_height¶ The physical height of the specular texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative height.
-
property
specular_map_offset_u¶ The specular texture offset in U direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
specular_map_offset_v¶ The specular texture offset in V direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
specular_map_rotation¶ The specular texture rotation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
specular_map_repeat_u¶ The specular texture repetition mode in U direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
specular_map_repeat_v¶ The specular texture repetition mode in V direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
specular_map_keep_aspect¶ Whether to keep aspect ratio for specular map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_enabled¶ Whether the roughness is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness¶ The roughness of the material, in 0 to 16 range.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative roughness or a roughness greater than 16.
-
property
roughness_map¶ The roughness map of the material or
Noneif there is no map assigned.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_enabled¶ Whether the roughness map is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_mode¶ The type of roughness map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_width¶ The physical width of the roughness texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative width.
-
property
roughness_map_height¶ The physical height of the roughness texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative height.
-
property
roughness_map_offset_u¶ The roughness texture offset in U direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_offset_v¶ The roughness texture offset in V direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_rotation¶ The roughness texture rotation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_repeat_u¶ The roughness texture repetition mode in U direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_repeat_v¶ The roughness texture repetition mode in V direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
roughness_map_keep_aspect¶ Whether to keep aspect ratio for roughness map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
in_shadow¶ The value to add to
reflectionIntensitywhen in shadow.- Type
- Raises
ReadOnlyError -- If
Databaseis 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
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
diffuse_attenuation¶ Whether the diffuse attenuation is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
velvet_effect¶ Whether the velvet effect is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
velvet_effect_factor¶ The velvet effect factor.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
velvet_gradient_ramp_enabled¶ Whether the velvet gradient ramp is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
velvet_gradient_map¶ The velvet gradient map of the material or
Noneif there is no map assigned.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
velvet_gradient_map_enabled¶ Whether the velvet gradient map is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
velvet_use_specular_map¶ Whether the velvet effect uses the specular map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_diffuse¶ Whether the diffuse bump is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_diffuse_depth¶ The depth of diffuse bump.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_reflection¶ Whether the reflection bump is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_reflection_depth¶ The depth of reflection bump.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_relief¶ Whether the relief bump is enabled.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_relief_depth¶ The depth of relief bump.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map¶ The bump/normal map of the material or
Noneif there is no map assigned.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_mode¶ The type of bump map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_width¶ The physical width of the bump texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative width.
-
property
bump_map_height¶ The physical height of the bump texture, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative height.
-
property
bump_map_offset_u¶ The bump texture offset in U direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_offset_v¶ The bump texture offset in V direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_rotation¶ The bump texture rotation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_repeat_u¶ The bump texture repetition mode in U direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_repeat_v¶ The bump texture repetition mode in V direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
bump_map_keep_aspect¶ Whether to keep aspect ratio for bump map.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
always_use_as_label¶ Whether to always use this material as label.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
label_blend_mode¶ The blending mode to use.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
label_blend_factor¶ The blending factor to use.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
label_repeat_u¶ The repetition mode in U direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
label_repeat_v¶ The repetition mode in V direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis 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
- Raises
ReadOnlyError -- If
Databaseis 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
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a sampling less than 1.
-
property
overwrite_specular_in_shadow¶ Whether
specularInShadowis used as specular value when raytracing. Not used when the type of material isDIFFUSE.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
specular_in_shadow¶ The specular value to use when raytracing, when
overwriteSpecularInShadowisTrue. Not used when the type of material isDIFFUSE.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a specular value less than -1 or greater than 1.
-
property
overwrite_transparency_filter¶ Whether
raytracingTransparencyFilterandraytracingTransparencyFilterFactorare used. Not used when the type of material isDIFFUSEorDIFFUSE_REFLECTION.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
raytracing_transparency_filter¶ The transparency filter to use when raytracing when
overwriteTransparencyFilteris enabled. Not used when the type of material isDIFFUSEorDIFFUSE_REFLECTION.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
raytracing_transparency_filter_factor¶ The transparency filter factor to use when raytracing when
overwriteTransparencyFilteris enabled. Not used when the type of material isDIFFUSEorDIFFUSE_REFLECTION.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative factor or a factor greater than 1.
-
property
volume_absorption_enabled¶ Whether volume absorption is enabled. Not used when the type of material is
DIFFUSEorDIFFUSE_REFLECTION.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
volume_absorption_fade_distance¶ The fade distance in meters when
volumeAbsorptionEnabledis enabled. Not used when the type of material isDIFFUSEorDIFFUSE_REFLECTION.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative distance.
-
property
raytrace_transmission_roughness_enabled¶ Whether to raytrace the transmission roughness of the material. Not used when the type of material is
DIFFUSEorDIFFUSE_REFLECTION.- Type
- Raises
ReadOnlyError -- If
Databaseis 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
DIFFUSEorDIFFUSE_REFLECTION.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative roughness or a roughness greater than 16.
-
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
DIFFUSEorDIFFUSE_REFLECTION.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a sampling less than 1.
-
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 inendOfCourseColoris used.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
end_of_course_color¶ The color to use when the reflected/refracted ray does not hit anything else and
endOfCourseUseEnvironmentisFalse.- Type
- Raises
ReadOnlyError -- If
Databaseis 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
endOfCourseUseEnvironmentisTrue.- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative intensity.
-
property
hide_surface_in_reflection¶ Whether to hide surfaces with this material in reflections. Only affects raytracing rendering.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
duplicate()¶ Duplicate this material.
- Returns
The duplicated material.
- Return type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
remove(force = False)¶ Delete this material
Note
By default, only not used material can be deleted (
InUseErroris raised otherwise), useforceto force deletion of used materials.- Parameters
force (bool) -- Force the deletion of the material even if it is in use.
- Raises
InUseError -- If
forceisFalseand the material is used.ReadOnlyError -- If
Databaseis in read only mode.
-
export_kmt(filename)¶ Export the material to a KMT file.
- Parameters
filename (str) -- KMT filename.
- Raises
FileNotFoundError -- If the destination directory does not exist.
-
property