blenderproc.python.loader.TextureLoader module¶
-
class
blenderproc.python.loader.TextureLoader.
TextureLoader
[source]¶ Bases:
object
-
static
_load_and_create
(image_paths, colorspace)[source]¶ Loads an image, creates an image texture and assigns an image to this texture per each provided path.
Parameters: Return type: List
[Texture
]Returns: Created textures. Type: list.
-
static
_resolve_paths
(path)[source]¶ Resolves absolute paths to assets in the provided folder, or to an asset if an appropriate path is provided.
Parameters: path ( str
) – Path to folder containing assets or path to an asset. Type: string.Return type: list
Returns: List of absolute paths to assets. Type: list.
-
static
-
blenderproc.python.loader.TextureLoader.
load_texture
(path, colorspace='sRGB')[source]¶ Loads images and creates image textures.
Depending on the form of the provided path: 1. Loads an image, creates an image texture, and assigns the loaded image to the texture, when a path to an image is provided. 2. Loads images and for each creates a texture, and assing an image to this texture, if a path to a folder with images is provided.
NOTE: Same image file can be loaded once to avoid unnecessary overhead. If you really need the same image in different colorspaces, then have a copy per desired colorspace and load them in different instances of this Loader.
Parameters: Return type: List
[Texture
]Returns: The list of created textures.