======== Material ======== .. py:currentmodule:: p3dsdk .. py:class:: Material .. py:method:: id :property: The id of the material. :type: str, read-only .. py:method:: name :property: The name of the material. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: group :property: The group of the material. :type: MaterialGroup :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: duplicate() Duplicate this material. :returns: The duplicated material. :rtype: Material :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove(force = False) Delete this material .. note:: By default, only not used material can be deleted (:py:obj:`InUseError` is raised otherwise), use ``force`` to force deletion of used materials. :param force: Force the deletion of the material even if it is in use. :type force: bool :raises InUseError: If ``force`` is :py:obj:`False` and the material is used. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: export_kmt(filename) Export the material to a KMT file. :param filename: KMT filename. :type filename: str :raises FileNotFoundError: If the destination directory does not exist. .. py:method:: export_kdm(filename) Export the material to a KDM file. :param filename: KDM filename. :type filename: str :raises FileNotFoundError: If the destination directory does not exist. AxfCPA2Material --------------- .. py:class:: AxfCPA2Material Base class: :py:class:`Material` .. py:method:: id :property: The id of the material. :type: str, read-only .. py:method:: name :property: The name of the material. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: group :property: The group of the material. :type: MaterialGroup :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: hue_shift :property: The shift applied to hue, in degrees. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a hue shift not between -180 and 180. .. py:method:: saturation :property: The saturation modification. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative saturation. .. py:method:: exposure :property: The exposure modification. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative exposure. .. py:method:: contrast :property: The contrast modification. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative contrast. .. py:method:: duplicate() Duplicate this material. :returns: The duplicated material. :rtype: Material :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove(force = False) Delete this material .. note:: By default, only not used material can be deleted (:py:obj:`InUseError` is raised otherwise), use ``force`` to force deletion of used materials. :param force: Force the deletion of the material even if it is in use. :type force: bool :raises InUseError: If ``force`` is :py:obj:`False` and the material is used. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: export_kmt(filename) Export the material to a KMT file. :param filename: KMT filename. :type filename: str :raises FileNotFoundError: If the destination directory does not exist. .. py:method:: export_kdm(filename) Export the material to a KDM file. :param filename: KDM filename. :type filename: str :raises FileNotFoundError: If the destination directory does not exist. .. py:method:: reset() Reset this material to default values. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. BumpMode -------- .. py:class:: BumpMode .. py:attribute:: HEIGHT :annotation: = 0 Height map. .. py:attribute:: NORMAL :annotation: = 1 Normal map. EnvMaterial ----------- .. py:class:: EnvMaterial Base class: :py:class:`Material` .. py:method:: id :property: The id of the material. :type: str, read-only .. py:method:: name :property: The name of the material. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: group :property: The group of the material. :type: MaterialGroup :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: intensity :property: The intensity of environment. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative intensity. .. py:method:: hide_surface_in_reflection :property: Whether to hide surfaces with this material in reflections. Only affects raytracing rendering. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: duplicate() Duplicate this material. :returns: The duplicated material. :rtype: Material :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove(force = False) Delete this material .. note:: By default, only not used material can be deleted (:py:obj:`InUseError` is raised otherwise), use ``force`` to force deletion of used materials. :param force: Force the deletion of the material even if it is in use. :type force: bool :raises InUseError: If ``force`` is :py:obj:`False` and the material is used. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: export_kmt(filename) Export the material to a KMT file. :param filename: KMT filename. :type filename: str :raises FileNotFoundError: If the destination directory does not exist. .. py:method:: export_kdm(filename) Export the material to a KDM file. :param filename: KDM filename. :type filename: str :raises FileNotFoundError: If the destination directory does not exist. FlakesDistribution ------------------ .. py:class:: FlakesDistribution .. py:attribute:: EVEN :annotation: = 0 Even flakes distribution, usually better for low density of flakes. .. py:attribute:: RANDOM :annotation: = 1 Random flakes distribution, usually better for high density of flakes. LabelMode --------- .. py:class:: LabelMode .. py:attribute:: MIX :annotation: = 0 Mix the label with the material underneath :math:`Label \times Factor + (1 - Factor) \times Underneath\ Material`. .. py:attribute:: MULTIPLY :annotation: = 1 Multiply the label with the material underneath :math:`Label \times Factor \times Underneath\ Material`. .. py:attribute:: ADD :annotation: = 2 Add the label with the material underneath :math:`Label \times Factor + Underneath\ Material`. MatteMaterial ------------- .. py:class:: MatteMaterial Base class: :py:class:`Material` .. py:method:: id :property: The id of the material. :type: str, read-only .. py:method:: name :property: The name of the material. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: group :property: The group of the material. :type: MaterialGroup :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: threshold :property: The threshold intensity for material transparency. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative threshold. .. py:method:: offset :property: The intensity offset. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: outline :property: The outline value. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative outline or a outline greater than 1. .. py:method:: contrast :property: The contrast value. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative contrast. .. py:method:: duplicate() Duplicate this material. :returns: The duplicated material. :rtype: Material :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove(force = False) Delete this material .. note:: By default, only not used material can be deleted (:py:obj:`InUseError` is raised otherwise), use ``force`` to force deletion of used materials. :param force: Force the deletion of the material even if it is in use. :type force: bool :raises InUseError: If ``force`` is :py:obj:`False` and the material is used. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: export_kmt(filename) Export the material to a KMT file. :param filename: KMT filename. :type filename: str :raises FileNotFoundError: If the destination directory does not exist. .. py:method:: export_kdm(filename) Export the material to a KDM file. :param filename: KDM filename. :type filename: str :raises FileNotFoundError: If the destination directory does not exist. MirrorMaterial -------------- .. py:class:: MirrorMaterial Base class: :py:class:`Material` .. py:method:: id :property: The id of the material. :type: str, read-only .. py:method:: name :property: The name of the material. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: group :property: The group of the material. :type: MaterialGroup :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: reflection :property: The reflection color of the mirror. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: transparency_enabled :property: Whether transparency is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: transparency :property: The transparency color of the mirror. It only has effect if :py:obj:`transparencyEnabled` is :py:obj:`True`. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: inter_reflection :property: The inter-reflection color of the mirror. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: outbound_type :property: The type of outbound color to use when the mirror does not reflect any surfaces. :type: MirrorMaterialOutboundType :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: reflected_surface_tag_enabled :property: Whether only surfaces with tag set in :py:obj:`reflectedSurfaceTag` are reflected. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: reflected_surface_tag :property: The tag surfaces must have to be reflected, if :py:obj:`reflectedSurfaceTagEnabled` is :py:obj:`True`. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: duplicate() Duplicate this material. :returns: The duplicated material. :rtype: Material :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove(force = False) Delete this material .. note:: By default, only not used material can be deleted (:py:obj:`InUseError` is raised otherwise), use ``force`` to force deletion of used materials. :param force: Force the deletion of the material even if it is in use. :type force: bool :raises InUseError: If ``force`` is :py:obj:`False` and the material is used. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: export_kmt(filename) Export the material to a KMT file. :param filename: KMT filename. :type filename: str :raises FileNotFoundError: If the destination directory does not exist. .. py:method:: export_kdm(filename) Export the material to a KDM file. :param filename: KDM filename. :type filename: str :raises FileNotFoundError: If the destination directory does not exist. MirrorMaterialOutboundType -------------------------- .. py:class:: MirrorMaterialOutboundType .. py:attribute:: BLACK :annotation: = 0 Black color. .. py:attribute:: BACKGROUND :annotation: = 1 Use current background. .. py:attribute:: ENVIRONMENT :annotation: = 2 Use current environment. MultiLayerMaterial ------------------ .. py:class:: MultiLayerMaterial Base class: :py:class:`Material` .. py:method:: id :property: The id of the material. :type: str, read-only .. py:method:: name :property: The name of the material. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: group :property: The group of the material. :type: MaterialGroup :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_relief_depth :property: The depth of relief bump. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: link_transformations :property: Whether texture transfomations are linked. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: always_use_as_label :property: Whether to always use this material as label. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: label_repeat_override :property: Whether :py:obj:`labelRepeatU` and :py:obj:`labelRepeatV` control the material repetition when used as label. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: label_repeat_u :property: The repetition mode in U direction, when :py:obj:`labelRepeatOverride` is :py:obj:`True`. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: label_repeat_v :property: The repetition mode in V direction, when :py:obj:`labelRepeatOverride` is :py:obj:`True`. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: raytrace_reflection_roughness_enabled :property: Whether to raytrace the reflection roughness of the material. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: raytrace_reflection_roughness_sampling :property: The number of samples to use when raytrace reflection roughness is enabled. :type: int :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a sampling less than 1. .. py:method:: overwrite_specular_in_shadow :property: Whether :py:obj:`specularInShadow` is used as specular value when raytracing. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: specular_in_shadow :property: The specular value to use when raytracing, when :py:obj:`overwriteSpecularInShadow` is :py:obj:`True`. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a specular value less than -1 or greater than 1. .. py:method:: overwrite_refraction_index :property: Whether :py:obj:`raytracingRefractionIndex` is used. Affects only the bottom layer. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: raytracing_refraction_index :property: The refraction index to use when raytracing transmission when :py:obj:`overwriteRefractionIndex` is enabled. Affects only the bottom layer. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative index. .. py:method:: overwrite_transparency_filter :property: Whether :py:obj:`raytracingTransparencyFilter` and :py:obj:`raytracingTransparencyFilterFactor` are used. Affects only the bottom layer. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: raytracing_transparency_filter :property: The transparency filter to use when raytracing when :py:obj:`overwriteTransparencyFilter` is enabled. Affects only the bottom layer. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: raytracing_transparency_filter_factor :property: The transparency filter factor to use when raytracing when :py:obj:`overwriteTransparencyFilter` is enabled. Affects only the bottom layer. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative factor or a factor greater than 1. .. py:method:: volume_absorption_enabled :property: Whether volume absorption is enabled. Affects only the bottom layer. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: volume_absorption_fade_distance :property: The fade distance in meters when :py:obj:`volumeAbsorptionEnabled` is enabled. Affects only the bottom layer. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative distance. .. py:method:: raytrace_transmission_roughness_enabled :property: Whether to raytrace the transmission roughness of the material. Affects only the bottom layer. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: raytrace_transmission_roughness :property: The roughness to use when raytrace transmission roughness is enabled, in 0 to 16 range. Affects only the bottom layer. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative roughness or a roughness greater than 16. .. py:method:: raytrace_transmission_roughness_sampling :property: The number of samples to use when raytrace transmission roughness is enabled. Affects only the bottom layer. :type: int :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a sampling less than 1. .. py:method:: end_of_course_use_environment :property: Whether to use the environment when the reflected/refracted ray does not hit anything else. If :py:obj:`False`, the color specified in :py:obj:`endOfCourseColor` is used. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: end_of_course_color :property: The color to use when the reflected/refracted ray does not hit anything else and :py:obj:`endOfCourseUseEnvironment` is :py:obj:`False`. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: end_of_course_environment_intensity :property: The intensity of environment when the reflected/refracted ray does not hit anything else and :py:obj:`endOfCourseUseEnvironment` is :py:obj:`True`. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative intensity. .. py:method:: hide_surface_in_reflection :property: Whether to hide surfaces with this material in reflections. Only affects raytracing rendering. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: duplicate() Duplicate this material. :returns: The duplicated material. :rtype: Material :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove(force = False) Delete this material .. note:: By default, only not used material can be deleted (:py:obj:`InUseError` is raised otherwise), use ``force`` to force deletion of used materials. :param force: Force the deletion of the material even if it is in use. :type force: bool :raises InUseError: If ``force`` is :py:obj:`False` and the material is used. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: export_kmt(filename) Export the material to a KMT file. :param filename: KMT filename. :type filename: str :raises FileNotFoundError: If the destination directory does not exist. .. py:method:: export_kdm(filename) Export the material to a KDM file. :param filename: KDM filename. :type filename: str :raises FileNotFoundError: If the destination directory does not exist. .. py:method:: create_diffuse_layer() Create a new diffuse layer on top of the stack. :returns: The newly created layer. :rtype: MultiLayerMaterialDiffuseLayer :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: create_specular_layer() Create a new specular layer on top of the stack. :returns: The newly created layer. :rtype: MultiLayerMaterialSpecularLayer :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: create_illumination_layer() Create a new illumination layer on top of the stack. :returns: The newly created layer. :rtype: MultiLayerMaterialIlluminationLayer :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: create_flakes_layer() Create a new flakes layer on top of the stack. :returns: The newly created layer. :rtype: MultiLayerMaterialFlakesLayer :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: list_layers() List the layers of this material, in bottom to top order. :returns: The list of layers in the material. :rtype: list(MultiLayerMaterialLayer) MultiLayerMaterialLayer ----------------------- .. py:class:: MultiLayerMaterialLayer .. py:method:: id :property: The id of the layer. :type: str, read-only .. py:method:: name :property: The name of the layer. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: material :property: The parent multi layer material. :type: MultiLayerMaterial, read-only .. py:method:: index :property: The index of this layer in the layer list. :type: int :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: enabled :property: Whether the layer is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: duplicate() Duplicate this layer. :returns: The duplicated layer. :rtype: MultiLayerMaterialLayer :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove() Delete this layer. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. MultiLayerMaterialDiffuseLayer ------------------------------ .. py:class:: MultiLayerMaterialDiffuseLayer Base class: :py:class:`MultiLayerMaterialLayer` .. py:method:: id :property: The id of the layer. :type: str, read-only .. py:method:: name :property: The name of the layer. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: material :property: The parent multi layer material. :type: MultiLayerMaterial, read-only .. py:method:: index :property: The index of this layer in the layer list. :type: int :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: enabled :property: Whether the layer is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: color :property: The color of the diffuse layer. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: intensity :property: The intensity of the diffuse layer. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative intensity. .. py:method:: ambient_color :property: The ambient color of the diffuse layer. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_map :property: The diffuse map of the layer or :py:obj:`None` if there is no map assigned. :type: Texture or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_map_enabled :property: Whether the diffuse map is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_map_width :property: The physical width of the diffuse texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative width. .. py:method:: diffuse_map_height :property: The physical height of the diffuse texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative height. .. py:method:: diffuse_map_offset_u :property: The diffuse texture offset in U direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_map_offset_v :property: The diffuse texture offset in V direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_map_rotation :property: The diffuse texture rotation, in degrees. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_map_repeat_u :property: The diffuse texture repetition mode in U direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_map_repeat_v :property: The diffuse texture repetition mode in V direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_map_keep_aspect :property: Whether to keep aspect ratio for diffuse map. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: use_relief_map :property: Whether the relief map is used instead of the bump map. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_depth :property: The depth of bump. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map :property: The bump/normal map of the layer or :py:obj:`None` if there is no map assigned. :type: Texture or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_enabled :property: Whether the bump/normal map is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_mode :property: The type of bump map. :type: BumpMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_width :property: The physical width of the bump texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative width. .. py:method:: bump_map_height :property: The physical height of the bump texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative height. .. py:method:: bump_map_offset_u :property: The bump texture offset in U direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_offset_v :property: The bump texture offset in V direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_rotation :property: The bump texture rotation, in degrees. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_repeat_u :property: The bump texture repetition mode in U direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_repeat_v :property: The bump texture repetition mode in V direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_keep_aspect :property: Whether to keep aspect ratio for bump map. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: opacity :property: The opacity modulator of the diffuse layer. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative opacity or an opacity greater than 1. .. py:method:: alpha_map :property: The alpha map of the layer or :py:obj:`None` if there is no map assigned. :type: Texture or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: alpha_map_enabled :property: Whether the alpha map is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: alpha_map_width :property: The physical width of the alpha texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative width. .. py:method:: alpha_map_height :property: The physical height of the alpha texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative height. .. py:method:: alpha_map_offset_u :property: The alpha texture offset in U direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: alpha_map_offset_v :property: The alpha texture offset in V direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: alpha_map_rotation :property: The alpha texture rotation, in degrees. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: alpha_map_repeat_u :property: The alpha texture repetition mode in U direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: alpha_map_repeat_v :property: The alpha texture repetition mode in V direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: alpha_map_keep_aspect :property: Whether to keep aspect ratio for alpha map. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: use_diffuse_map_alpha :property: Whether the diffuse map alpha is used. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: gradient_ramp_enabled :property: Whether the diffuse gradient ramp is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: gradient_map :property: The gradient map of the layer or :py:obj:`None` if there is no map assigned. :type: Texture or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: gradient_map_enabled :property: Whether the diffuse gradient map is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: duplicate() Duplicate this layer. :returns: The duplicated layer. :rtype: MultiLayerMaterialLayer :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove() Delete this layer. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. MultiLayerMaterialFlakesLayer ----------------------------- .. py:class:: MultiLayerMaterialFlakesLayer Base class: :py:class:`MultiLayerMaterialLayer` .. py:method:: id :property: The id of the layer. :type: str, read-only .. py:method:: name :property: The name of the layer. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: material :property: The parent multi layer material. :type: MultiLayerMaterial, read-only .. py:method:: index :property: The index of this layer in the layer list. :type: int :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: enabled :property: Whether the layer is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: update_textures_automatically :property: Whether the flakes textures are updated autmatically on property change. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: flakes_color :property: The color of the flakes .. note:: Only used when :py:obj:`flakesColorUseSingle` is :py:obj:`True`. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: flakes_color_use_single :property: Whether the flakes use a single color (:py:obj:`flakesColor)`. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: flakes_color_sd :property: The color standard deviation (in Lab space). :type: ColorLab :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: flakes_size :property: The size of flakes (radius) in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative size. .. py:method:: flakes_size_sd :property: The size of flakes (radius) standard deviation in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: flakes_density :property: The number of flakes by square meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative density. .. py:method:: flakes_orientation :property: The deviation of flakes normal from the surface normal in degrees. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative orientation or an orientation greater than 90. .. py:method:: flakes_orientation_sd :property: The flakes orientation standard deviation in degrees. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: flakes_sides :property: The number of sides of flakes polygons. :type: int :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a number of sides less than 3 or a number of sides greater than 8. .. py:method:: normal_depth :property: The depth modulation of flakes normal map. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative depth. .. py:method:: texture_size :property: The texture size in pixels. :type: int :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a texture size less than 1. .. py:method:: seed :property: The seed to use for random number generator. :type: int :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative seed. .. py:method:: distribution :property: The random distribution of flakes to use. :type: FlakesDistribution :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: texture_offset_u :property: The flakes texture offset in U direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: texture_offset_v :property: The flakes texture offset in V direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: texture_rotation :property: The flakes texture rotation, in degrees. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: specular_color :property: The specular color of the flakes. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: specular_intensity :property: The specular intensity of the flakes. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative intensity. .. py:method:: fresnel :property: Whether to use Fresnel effect. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: refraction_index :property: The refraction index of Fresnel effect. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative index. .. py:method:: extinction_coefficient :property: The extinction coefficient of Fresnel effect. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative coefficient. .. py:method:: roughness_enabled :property: Whether the roughness is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness :property: The roughness of the flakes, in 0 to 16 range. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative roughness or a roughness greater than 16. .. py:method:: roughness_map :property: The roughness map of the layer or :py:obj:`None` if there is no map assigned. :type: Texture or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_enabled :property: Whether the roughness map is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_mode :property: The type of roughness map. :type: RoughnessMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_width :property: The physical width of the roughness texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative width. .. py:method:: roughness_map_height :property: The physical height of the roughness texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative height. .. py:method:: roughness_map_offset_u :property: The roughness texture offset in U direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_offset_v :property: The roughness texture offset in V direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_rotation :property: The roughness texture rotation, in degrees. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_repeat_u :property: The roughness texture repetition mode in U direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_repeat_v :property: The roughness texture repetition mode in V direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_keep_aspect :property: Whether to keep aspect ratio for roughness map. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: in_shadow :property: The value to add to :py:obj:`specularIntensity` when in shadow. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_filter :property: The diffuse filter of the layer. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_attenuation :property: Whether the diffuse attenuation is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: duplicate() Duplicate this layer. :returns: The duplicated layer. :rtype: MultiLayerMaterialLayer :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove() Delete this layer. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. MultiLayerMaterialIlluminationLayer ----------------------------------- .. py:class:: MultiLayerMaterialIlluminationLayer Base class: :py:class:`MultiLayerMaterialLayer` .. py:method:: id :property: The id of the layer. :type: str, read-only .. py:method:: name :property: The name of the layer. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: material :property: The parent multi layer material. :type: MultiLayerMaterial, read-only .. py:method:: index :property: The index of this layer in the layer list. :type: int :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: enabled :property: Whether the layer is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: color :property: The color of the illumination layer. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: intensity :property: The intensity of the illumination layer. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative intensity. .. py:method:: in_shadow :property: The value to add to ``intensity`` when in shadow. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: modulation_map :property: The modulation map of the layer or :py:obj:`None` if there is no map assigned. :type: Texture or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: modulation_map_enabled :property: Whether the modulation map is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: modulation_map_width :property: The physical width of the modulation texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative width. .. py:method:: modulation_map_height :property: The physical height of the modulation texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative height. .. py:method:: modulation_map_offset_u :property: The modulation texture offset in U direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: modulation_map_offset_v :property: The modulation texture offset in V direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: modulation_map_rotation :property: The modulation texture rotation, in degrees. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: modulation_map_repeat_u :property: The modulation texture repetition mode in U direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: modulation_map_repeat_v :property: The modulation texture repetition mode in V direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: modulation_map_keep_aspect :property: Whether to keep aspect ratio for modulation map. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: velvet_effect_factor :property: The velvet effect factor. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: gradient_ramp_enabled :property: Whether the velvet gradient ramp is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: gradient_map :property: The velvet gradient map of the layer or :py:obj:`None` if there is no map assigned. :type: Texture or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: gradient_map_enabled :property: Whether the velvet gradient map is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: velvet_use_modulation_map :property: Whether the velvet effect uses the modulation map. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: use_relief_map :property: Whether the relief map is used instead of the bump map. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_depth :property: The depth of bump. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map :property: The bump/normal map of the layer or :py:obj:`None` if there is no map assigned. :type: Texture or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_enabled :property: Whether the bump/normal map is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_mode :property: The type of bump map. :type: BumpMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_width :property: The physical width of the bump texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative width. .. py:method:: bump_map_height :property: The physical height of the bump texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative height. .. py:method:: bump_map_offset_u :property: The bump texture offset in U direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_offset_v :property: The bump texture offset in V direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_rotation :property: The bump texture rotation, in degrees. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_repeat_u :property: The bump texture repetition mode in U direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_repeat_v :property: The bump texture repetition mode in V direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_keep_aspect :property: Whether to keep aspect ratio for bump map. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: duplicate() Duplicate this layer. :returns: The duplicated layer. :rtype: MultiLayerMaterialLayer :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove() Delete this layer. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. MultiLayerMaterialSpecularLayer ------------------------------- .. py:class:: MultiLayerMaterialSpecularLayer Base class: :py:class:`MultiLayerMaterialLayer` .. py:method:: id :property: The id of the layer. :type: str, read-only .. py:method:: name :property: The name of the layer. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: material :property: The parent multi layer material. :type: MultiLayerMaterial, read-only .. py:method:: index :property: The index of this layer in the layer list. :type: int :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: enabled :property: Whether the layer is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: color :property: The color of the specular layer. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: intensity :property: The intensity of the specular layer. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative intensity. .. py:method:: gradient_ramp_enabled :property: Whether the diffuse gradient ramp is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: fresnel :property: Whether to use Fresnel effect. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: refraction_index :property: The refraction index of Fresnel effect. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative index. .. py:method:: extinction_coefficient :property: The extinction coefficient of Fresnel effect. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative coefficient. .. py:method:: specular_map :property: The specular map of the layer or :py:obj:`None` if there is no map assigned. :type: Texture or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: specular_map_enabled :property: Whether the specular map is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: specular_map_width :property: The physical width of the specular texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative width. .. py:method:: specular_map_height :property: The physical height of the specular texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative height. .. py:method:: specular_map_offset_u :property: The specular texture offset in U direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: specular_map_offset_v :property: The specular texture offset in V direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: specular_map_rotation :property: The specular texture rotation, in degrees. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: specular_map_repeat_u :property: The specular texture repetition mode in U direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: specular_map_repeat_v :property: The specular texture repetition mode in V direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: specular_map_keep_aspect :property: Whether to keep aspect ratio for specular map. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_enabled :property: Whether the roughness is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness :property: The roughness of the layer, in 0 to 16 range. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative roughness or a roughness greater than 16. .. py:method:: roughness_map :property: The roughness map of the layer or :py:obj:`None` if there is no map assigned. :type: Texture or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_enabled :property: Whether the roughness map is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_mode :property: The type of roughness map. :type: RoughnessMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_width :property: The physical width of the roughness texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative width. .. py:method:: roughness_map_height :property: The physical height of the roughness texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative height. .. py:method:: roughness_map_offset_u :property: The roughness texture offset in U direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_offset_v :property: The roughness texture offset in V direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_rotation :property: The roughness texture rotation, in degrees. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_repeat_u :property: The roughness texture repetition mode in U direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_repeat_v :property: The roughness texture repetition mode in V direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_keep_aspect :property: Whether to keep aspect ratio for roughness map. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: use_relief_map :property: Whether the relief map is used instead of the bump map. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_depth :property: The depth of bump. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map :property: The bump/normal map of the layer or :py:obj:`None` if there is no map assigned. :type: Texture or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_enabled :property: Whether the bump/normal map is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_mode :property: The type of bump map. :type: BumpMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_width :property: The physical width of the bump texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative width. .. py:method:: bump_map_height :property: The physical height of the bump texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative height. .. py:method:: bump_map_offset_u :property: The bump texture offset in U direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_offset_v :property: The bump texture offset in V direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_rotation :property: The bump texture rotation, in degrees. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_repeat_u :property: The bump texture repetition mode in U direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_repeat_v :property: The bump texture repetition mode in V direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_keep_aspect :property: Whether to keep aspect ratio for bump map. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: in_shadow :property: The value to add to ``intensity`` when in shadow. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_filter :property: The diffuse filter of the layer. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_attenuation :property: Whether the diffuse attenuation is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: duplicate() Duplicate this layer. :returns: The duplicated layer. :rtype: MultiLayerMaterialLayer :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove() Delete this layer. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. RepetitionMode -------------- .. py:class:: RepetitionMode .. py:attribute:: NO_REPEAT :annotation: = 0 No repetition. .. py:attribute:: REPEAT :annotation: = 1 Repetition. .. py:attribute:: REPEAT_MIRRORED :annotation: = 2 Mirrored repetition. RoughnessMode ------------- .. py:class:: RoughnessMode .. py:attribute:: ROUGHNESS :annotation: = 0 Roughness map. .. py:attribute:: GLOSS :annotation: = 1 Gloss map. SeamMaterial ------------ .. py:class:: SeamMaterial Base class: :py:class:`Material` .. py:method:: id :property: The id of the material. :type: str, read-only .. py:method:: name :property: The name of the material. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: group :property: The group of the material. :type: MaterialGroup :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_color :property: The diffuse color of the material. :type: ColorRgb, read-only .. py:method:: diffuse_intensity :property: The diffuse intensity of the material. :type: float, read-only .. py:method:: diffuse_map :property: The diffuse map of the material or :py:obj:`None` if there is no map assigned. :type: Texture or None, read-only .. py:method:: diffuse_map_enabled :property: Whether the diffuse map is enabled. :type: bool, read-only .. py:method:: ambient_color :property: The ambient color of the material. :type: ColorRgb, read-only .. py:method:: reflection_color :property: The reflection color of the material. :type: ColorRgb, read-only .. py:method:: reflection_intensity :property: The reflection intensity of the material. :type: float, read-only .. py:method:: roughness :property: The roughness of the material, in 0 to 16 range. :type: float, read-only .. py:method:: diffuse_filter :property: The diffuse filter of the material. :type: ColorRgb, read-only .. py:method:: pleat_map :property: The pleat map of the material or :py:obj:`None` if there is no map assigned. :type: Texture or None, read-only .. py:method:: pleat_map_enabled :property: Whether the pleat map is enabled. :type: bool, read-only .. py:method:: pleat_diffuse_bump_depth :property: The depth diffuse bump for pleat map. :type: float, read-only .. py:method:: seam_map :property: The seam map of the material or :py:obj:`None` if there is no map assigned. :type: Texture or None, read-only .. py:method:: seam_map_enabled :property: Whether the seam map is enabled. :type: bool, read-only .. py:method:: seam_diffuse_bump :property: Whether the diffuse bump is enabled for seam map. :type: bool, read-only .. py:method:: seam_diffuse_bump_depth :property: The depth of diffuse bump for seam map. :type: float, read-only .. py:method:: seam_reflection_bump :property: Whether the reflection bump is enabled for seam map. :type: bool, read-only .. py:method:: seam_reflection_bump_depth :property: The depth of reflection bump for seam map. :type: float, read-only .. py:method:: duplicate() Duplicate this material. :returns: The duplicated material. :rtype: Material :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove(force = False) Delete this material .. note:: By default, only not used material can be deleted (:py:obj:`InUseError` is raised otherwise), use ``force`` to force deletion of used materials. :param force: Force the deletion of the material even if it is in use. :type force: bool :raises InUseError: If ``force`` is :py:obj:`False` and the material is used. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: export_kmt(filename) Export the material to a KMT file. :param filename: KMT filename. :type filename: str :raises FileNotFoundError: If the destination directory does not exist. .. py:method:: export_kdm(filename) Export the material to a KDM file. :param filename: KDM filename. :type filename: str :raises FileNotFoundError: If the destination directory does not exist. StandardMaterial ---------------- .. py:class:: StandardMaterial Base class: :py:class:`Material` .. py:method:: id :property: The id of the material. :type: str, read-only .. py:method:: name :property: The name of the material. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: group :property: The group of the material. :type: MaterialGroup :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: type :property: The type of standard material. :type: StandardMaterialType :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: link_transformations :property: Whether texture transfomations are linked. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_color :property: The diffuse color of the material. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_intensity :property: The diffuse intensity of the material. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative intensity. .. py:method:: diffuse_map :property: The diffuse map of the material or :py:obj:`None` if there is no map assigned. :type: Texture or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_map_enabled :property: Whether the diffuse map is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_map_width :property: The physical width of the diffuse texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative width. .. py:method:: diffuse_map_height :property: The physical height of the diffuse texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative height. .. py:method:: diffuse_map_offset_u :property: The diffuse texture offset in U direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_map_offset_v :property: The diffuse texture offset in V direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_map_rotation :property: The diffuse texture rotation, in degrees. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_map_repeat_u :property: The diffuse texture repetition mode in U direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_map_repeat_v :property: The diffuse texture repetition mode in V direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_map_keep_aspect :property: Whether to keep aspect ratio for diffuse map. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: opacity :property: The opacity modulator of the material. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative opacity or an opacity greater than 1. .. py:method:: alpha_map :property: The alpha map of the material or :py:obj:`None` if there is no map assigned. :type: Texture or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: alpha_map_enabled :property: Whether the alpha map is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: alpha_map_width :property: The physical width of the alpha texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative width. .. py:method:: alpha_map_height :property: The physical height of the alpha texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative height. .. py:method:: alpha_map_offset_u :property: The alpha texture offset in U direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: alpha_map_offset_v :property: The alpha texture offset in V direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: alpha_map_rotation :property: The alpha texture rotation, in degrees. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: alpha_map_repeat_u :property: The alpha texture repetition mode in U direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: alpha_map_repeat_v :property: The alpha texture repetition mode in V direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: alpha_map_keep_aspect :property: Whether to keep aspect ratio for alpha map. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: use_diffuse_map_alpha :property: Whether the diffuse map alpha is used. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: ambient_color :property: The ambient color of the material. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: illumination_color :property: The illumination color of the material. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: illumination_intensity :property: The illumination intensity of the material. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_gradient_ramp_enabled :property: Whether the diffuse gradient ramp is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_gradient_map :property: The diffuse gradient map of the material or :py:obj:`None` if there is no map assigned. :type: Texture or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_gradient_map_enabled :property: Whether the diffuse gradient map is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: reflection_color :property: The reflection color of the material. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: reflection_intensity :property: The reflection intensity of the material. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative intensity. .. py:method:: fresnel :property: Whether to use Fresnel effect. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: refraction_index :property: The refraction index of Fresnel effect. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative index. .. py:method:: extinction_coefficient :property: The extinction coefficient of Fresnel effect. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative coefficient. .. py:method:: specular_map :property: The specular map of the material or :py:obj:`None` if there is no map assigned. :type: Texture or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: specular_map_enabled :property: Whether the specular map is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: specular_map_width :property: The physical width of the specular texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative width. .. py:method:: specular_map_height :property: The physical height of the specular texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative height. .. py:method:: specular_map_offset_u :property: The specular texture offset in U direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: specular_map_offset_v :property: The specular texture offset in V direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: specular_map_rotation :property: The specular texture rotation, in degrees. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: specular_map_repeat_u :property: The specular texture repetition mode in U direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: specular_map_repeat_v :property: The specular texture repetition mode in V direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: specular_map_keep_aspect :property: Whether to keep aspect ratio for specular map. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_enabled :property: Whether the roughness is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness :property: The roughness of the material, in 0 to 16 range. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative roughness or a roughness greater than 16. .. py:method:: roughness_map :property: The roughness map of the material or :py:obj:`None` if there is no map assigned. :type: Texture or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_enabled :property: Whether the roughness map is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_mode :property: The type of roughness map. :type: RoughnessMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_width :property: The physical width of the roughness texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative width. .. py:method:: roughness_map_height :property: The physical height of the roughness texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative height. .. py:method:: roughness_map_offset_u :property: The roughness texture offset in U direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_offset_v :property: The roughness texture offset in V direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_rotation :property: The roughness texture rotation, in degrees. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_repeat_u :property: The roughness texture repetition mode in U direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_repeat_v :property: The roughness texture repetition mode in V direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: roughness_map_keep_aspect :property: Whether to keep aspect ratio for roughness map. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: in_shadow :property: The value to add to :py:obj:`reflectionIntensity` when in shadow. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: diffuse_filter :property: 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 :py:obj:`Database` is in read only mode. .. py:method:: diffuse_attenuation :property: Whether the diffuse attenuation is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: velvet_effect :property: Whether the velvet effect is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: velvet_effect_factor :property: The velvet effect factor. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: velvet_gradient_ramp_enabled :property: Whether the velvet gradient ramp is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: velvet_gradient_map :property: The velvet gradient map of the material or :py:obj:`None` if there is no map assigned. :type: Texture or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: velvet_gradient_map_enabled :property: Whether the velvet gradient map is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: velvet_use_specular_map :property: Whether the velvet effect uses the specular map. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_diffuse :property: Whether the diffuse bump is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_diffuse_depth :property: The depth of diffuse bump. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_reflection :property: Whether the reflection bump is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_reflection_depth :property: The depth of reflection bump. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_relief :property: Whether the relief bump is enabled. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_relief_depth :property: The depth of relief bump. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map :property: The bump/normal map of the material or :py:obj:`None` if there is no map assigned. :type: Texture or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_mode :property: The type of bump map. :type: BumpMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_width :property: The physical width of the bump texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative width. .. py:method:: bump_map_height :property: The physical height of the bump texture, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative height. .. py:method:: bump_map_offset_u :property: The bump texture offset in U direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_offset_v :property: The bump texture offset in V direction, in meters. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_rotation :property: The bump texture rotation, in degrees. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_repeat_u :property: The bump texture repetition mode in U direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_repeat_v :property: The bump texture repetition mode in V direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: bump_map_keep_aspect :property: Whether to keep aspect ratio for bump map. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: always_use_as_label :property: Whether to always use this material as label. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: label_blend_mode :property: The blending mode to use. :type: LabelMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: label_blend_factor :property: The blending factor to use. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: label_repeat_u :property: The repetition mode in U direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: label_repeat_v :property: The repetition mode in V direction. :type: RepetitionMode :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: raytrace_reflection_roughness_enabled :property: Whether to raytrace the reflection roughness of the material. Not used when the type of material is :py:obj:`DIFFUSE`. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: raytrace_reflection_roughness_sampling :property: The number of samples to use when raytrace reflection roughness is enabled. Not used when the type of material is :py:obj:`DIFFUSE`. :type: int :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a sampling less than 1. .. py:method:: overwrite_specular_in_shadow :property: Whether :py:obj:`specularInShadow` is used as specular value when raytracing. Not used when the type of material is :py:obj:`DIFFUSE`. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: specular_in_shadow :property: The specular value to use when raytracing, when :py:obj:`overwriteSpecularInShadow` is :py:obj:`True`. Not used when the type of material is :py:obj:`DIFFUSE`. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a specular value less than -1 or greater than 1. .. py:method:: overwrite_transparency_filter :property: Whether :py:obj:`raytracingTransparencyFilter` and :py:obj:`raytracingTransparencyFilterFactor` are used. Not used when the type of material is :py:obj:`DIFFUSE` or :py:obj:`DIFFUSE_REFLECTION`. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: raytracing_transparency_filter :property: The transparency filter to use when raytracing when :py:obj:`overwriteTransparencyFilter` is enabled. Not used when the type of material is :py:obj:`DIFFUSE` or :py:obj:`DIFFUSE_REFLECTION`. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: raytracing_transparency_filter_factor :property: The transparency filter factor to use when raytracing when :py:obj:`overwriteTransparencyFilter` is enabled. Not used when the type of material is :py:obj:`DIFFUSE` or :py:obj:`DIFFUSE_REFLECTION`. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative factor or a factor greater than 1. .. py:method:: volume_absorption_enabled :property: Whether volume absorption is enabled. Not used when the type of material is :py:obj:`DIFFUSE` or :py:obj:`DIFFUSE_REFLECTION`. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: volume_absorption_fade_distance :property: The fade distance in meters when :py:obj:`volumeAbsorptionEnabled` is enabled. Not used when the type of material is :py:obj:`DIFFUSE` or :py:obj:`DIFFUSE_REFLECTION`. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative distance. .. py:method:: raytrace_transmission_roughness_enabled :property: Whether to raytrace the transmission roughness of the material. Not used when the type of material is :py:obj:`DIFFUSE` or :py:obj:`DIFFUSE_REFLECTION`. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: raytrace_transmission_roughness :property: The roughness to use when raytrace transmission roughness is enabled, in 0 to 16 range. Not used when the type of material is :py:obj:`DIFFUSE` or :py:obj:`DIFFUSE_REFLECTION`. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative roughness or a roughness greater than 16. .. py:method:: raytrace_transmission_roughness_sampling :property: The number of samples to use when raytrace transmission roughness is enabled. Not used when the type of material is :py:obj:`DIFFUSE` or :py:obj:`DIFFUSE_REFLECTION`. :type: int :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a sampling less than 1. .. py:method:: end_of_course_use_environment :property: Whether to use the environment when the reflected/refracted ray does not hit anything else. If :py:obj:`False`, the color specified in :py:obj:`endOfCourseColor` is used. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: end_of_course_color :property: The color to use when the reflected/refracted ray does not hit anything else and :py:obj:`endOfCourseUseEnvironment` is :py:obj:`False`. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: end_of_course_environment_intensity :property: The intensity of environment when the reflected/refracted ray does not hit anything else and :py:obj:`endOfCourseUseEnvironment` is :py:obj:`True`. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative intensity. .. py:method:: hide_surface_in_reflection :property: Whether to hide surfaces with this material in reflections. Only affects raytracing rendering. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: duplicate() Duplicate this material. :returns: The duplicated material. :rtype: Material :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove(force = False) Delete this material .. note:: By default, only not used material can be deleted (:py:obj:`InUseError` is raised otherwise), use ``force`` to force deletion of used materials. :param force: Force the deletion of the material even if it is in use. :type force: bool :raises InUseError: If ``force`` is :py:obj:`False` and the material is used. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: export_kmt(filename) Export the material to a KMT file. :param filename: KMT filename. :type filename: str :raises FileNotFoundError: If the destination directory does not exist. .. py:method:: export_kdm(filename) Export the material to a KDM file. :param filename: KDM filename. :type filename: str :raises FileNotFoundError: If the destination directory does not exist. StandardMaterialType -------------------- .. py:class:: StandardMaterialType .. py:attribute:: DIFFUSE :annotation: = 0 Diffuse only. .. py:attribute:: DIFFUSE_REFLECTION :annotation: = 1 Diffuse and reflection. .. py:attribute:: TRANSPARENT :annotation: = 2 Transparent filter.