BaseTexture#

class blueprints.BaseTexture[source]#

Bases: BaseThing

Most attribute descriptions are partially taken from Mujoco.

Attributes Summary

asset

The attributes of the texture are stored in a separate asset object.

builtin

If set, this attribute specifies a builtin procedural Texture.

color_1

The first color of a procedural Texture.

color_2

The second color of a procedural Texture.

color_mark

The mark color of a procedural Texture.

content

Content type (MIME type) taking values None, 'image/png', 'image/ktx' and 'image/vnd.mujoco.texture'.

filename

Name of the texture file.

filename_back

The file name for the back side of a Box.

filename_down

The file name for the down side of a Box.

filename_front

The file name for the front side of a Box.

filename_left

The file name for the left side of a Box.

filename_right

The file name for the right side of a Box.

filename_up

The file name for the upper side of a Box.

grid_layout

The layout of the grid.

grid_size

Grid size attrigute [n_rows, n_cols] defining the grid.

h_flip

If true, images loaded from file are flipped in the horizontal direction.

height

The height of the procedural texture, i.e., the number of rows in the image.

mark

If set this attribute specifies additional markings on a procedural Texture.

n_channel

The number of channels in the texture image file.

random

If the mark attribute is set to 'random', this attribute specifies the probability of a pixel in the texture being the mark_color.

v_flip

If true, images loaded from file are flipped in the vertical direction.

width

The width of a procedural texture, i.e., the number of columns in the image.

Attributes Documentation

asset#

The attributes of the texture are stored in a separate asset object. If this texture is assign to multiple objects, and then gets modified through Material.texture.attribute = value all other Materials referenceing the Texture will be unaltered. See UniqueThing.

Return type:

blue.TextureAssetType

builtin#

If set, this attribute specifies a builtin procedural Texture. See examples above.

Return type:

str | None

color_1#

The first color of a procedural Texture.

Return type:

blue.ColorType

color_2#

The second color of a procedural Texture.

Return type:

blue.ColorType

color_mark#

The mark color of a procedural Texture.

Return type:

blue.ColorType

content#

Content type (MIME type) taking values None, 'image/png', 'image/ktx' and 'image/vnd.mujoco.texture'.

Return type:

str | None

filename#

Name of the texture file.

Return type:

str | None

filename_back#

The file name for the back side of a Box.

Return type:

str | None

filename_down#

The file name for the down side of a Box.

Return type:

str | None

filename_front#

The file name for the front side of a Box.

Return type:

str | None

filename_left#

The file name for the left side of a Box.

Return type:

str | None

filename_right#

The file name for the right side of a Box.

Return type:

str | None

filename_up#

The file name for the upper side of a Box.

Return type:

str | None

grid_layout#

The layout of the grid. See example above.

Return type:

str | None

grid_size#

Grid size attrigute [n_rows, n_cols] defining the grid. For non-grid Textures this value is ignored.

Return type:

list[int]

h_flip#

If true, images loaded from file are flipped in the horizontal direction. Does not affect procedural textures.

Return type:

bool

height#

The height of the procedural texture, i.e., the number of rows in the image. For Box and Skybox textures, this attribute is ignored and the height is set to 6 times the width. For textures loaded from files, this attribute is ignored.

Return type:

int

mark#

If set this attribute specifies additional markings on a procedural Texture. Possible values are None, 'edge', 'cross' and 'random'. See examples above.

Return type:

str | None

n_channel#

The number of channels in the texture image file. This allows loading 4-channel textures (RGBA) or single-channel textures (e.g., for Physics-Based Rendering properties such as roughness or metallic).

Return type:

int

random#

If the mark attribute is set to 'random', this attribute specifies the probability of a pixel in the texture being the mark_color.

Return type:

float

v_flip#

If true, images loaded from file are flipped in the vertical direction. Does not affect procedural textures.

Return type:

bool

width#

The width of a procedural texture, i.e., the number of columns in the image. Larger values usually result in higher quality images, although in some cases (e.g. checker patterns) small values are sufficient. For textures loaded from files, this attribute is ignored.

Return type:

int

__init__(name=None, parent=None, **kwargs)#
Parameters:
  • name (str | None, optional) – This is the name for the object specified by the user. It differs from other user specified properties, in that it might be altered without the users knowledge to resolve name conflicts.

  • parent (blue.NodeThingType | None, optional) – The parent to which the Thing is attach, if it unattached parent is None.

  • **kwargs – The aggregation of keyword arguments that have not yet been caught by other inheriting Things __init__ are not used and serve as a dummy variable.

classmethod __new__(*args, **kwargs)#