bake_texture_async#
- async omni.mdl.neuraylib.bake_texture_async(
- baker: IBaker,
- texture: ICanvas,
- min_u: float,
- max_u: float,
- min_v: float,
- max_v: float,
- animation_time: float,
- samples: int,
Bakes the expression as texture (supports UV ranges and animated textures).
- Parameters:
texture (
ICanvas) – The baked texture will be stored in this canvas. If the pixel type of ``canvas`` does not match the pixel type of the expression to be baked (as indicated by #get_pixel_type()), then the pixel data is converted as described in #mi::neuraylib::IImage_api::convert().min_u (float) – The lower value of the U range used for baking.
max_u (float) – The higher value of the U range used for baking.
min_v (float) – The lower value of the V range used for baking.
max_v (float) – The higher value of the V range used for baking.
animation_time (float) – The animation time used for baking.
samples (int) – The number of samples (per pixel).
- Return type:
int
- Returns:
0: Success.
-1: Invalid parameters (``nullptr)``.
-2: The transaction that is bound to this baker is no longer open.
-3: The execution of the MDL code failed.