Texture class

Texture class

This class defines the texture from an external file.

Inheritance: TextureTextureBaseA3DObject

The Texture type exposes the following members:

Constructors

ConstructorDescription
__init__(self)Initializes a new instance of the Texture class.
__init__(self, name)Initializes a new instance of the Texture class.

Properties

PropertyDescription
nameGets or sets the name.
propertiesGets the collection of all properties.
alphaGets or sets the default alpha value of the texture
This is valid when the TextureBase.alpha_source is AlphaSource.PIXEL_ALPHA
Default value is 1.0, valid value range is between 0 and 1
alpha_sourceGets or sets whether the texture defines the alpha channel.
Default value is AlphaSource.NONE
wrap_mode_uGets or sets the texture wrap modes in U.
wrap_mode_vGets or sets the texture wrap modes in V.
wrap_mode_wGets or sets the texture wrap modes in W.
min_filterGets or sets the filter for minification.
mag_filterGets or sets the filter for magnification.
mip_filterGets or sets the filter for mip-level sampling.
uv_rotationGets or sets the rotation of the texture
uv_scaleGets or sets the UV scale.
uv_translationGets or sets the UV translation.
enable_mip_mapGets or sets if the mipmap is enabled for this texture
contentGets or sets the binary content of the texture.
The embedded texture content is optional, user should load texture from external file if this is missing.
file_nameGets or sets the associated texture file.

Methods

MethodDescription
remove_property(self, property)Removes a dynamic property.
remove_property(self, property)Remove the specified property identified by name
get_property(self, property)Get the value of specified property
set_property(self, property, value)Sets the value of specified property
find_property(self, property_name)Finds the property.
It can be a dynamic property (Created by CreateDynamicProperty/SetProperty)
or native property(Identified by its name)
set_translation(self, u, v)Sets the UV translation.
set_scale(self, u, v)Sets the UV scale.
set_rotation(self, u, v)Sets the UV rotation.

See Also