unreal.TextureAssetActionsBlueprintFns

class unreal.TextureAssetActionsBlueprintFns(outer: Object | None = None, name: Name | str = 'None')

Bases: Object

Texture Asset Actions Blueprint Fns

C++ Source:

  • Module: UnrealEd

  • File: TextureAssetActionsBP.h

classmethod compress_texture_source_with_jpeg(texture, filter_threshold_value) TextureAssetActionsBlueprintReturn

Compresses the texture source with JPEG. This makes the uasset smaller on disk, but lower quality and slower to access.

JPEG does not make the runtime game asset smaller on disk, only the source uasset. JPEG can only be used on simple 2d textures.

Only acts on texture sources that are 8 bit. You may wish to use ConvertTo8bitTextureSource before this, optionally.

Only acts on textures larger than FilterThresholdValue. Use FilterThresholdValue = 0 to disable filtering by size.

Returns Success if the action was done, returns AlreadyDone if the action did not need to be done because texture already met the goal. Returns Error if the operation could not be applied because the texture is not a suitable type, or an unexpected error was encountered during processing.

Parameters:
  • texture (Texture)

  • filter_threshold_value (int32)

Return type:

TextureAssetActionsBlueprintReturn

classmethod convert_to8bit_texture_source(texture, normal_maps_keep16bits) TextureAssetActionsBlueprintReturn

Resizes the texture Source to 8 bits per color channel, if it wasn’t already. HDR textures are converted to 16F (if they were 32F).

If bNormalMapsKeep16bits is true, then normal maps whose source had >= 16 bits per color channel retain 16 bits per channel (rather than 8).

Returns Success if the action was done, returns AlreadyDone if the action did not need to be done because texture already met the goal. Returns Error if the operation could not be applied because the texture is not a suitable type, or an unexpected error was encountered during processing.

Parameters:
Return type:

TextureAssetActionsBlueprintReturn

classmethod resize_texture_source(texture, resize_to_less_or_equal_to_target_size) TextureAssetActionsBlueprintReturn

Resizes the texture Source to less or equal to ResizeToLessOrEqualToTargetSize

Texture LODBias is automatically adjusted to try to keep output size the same when possible.

Only acts on textures larger than ResizeToLessOrEqualToTargetSize.

Returns Success if the action was done, returns AlreadyDone if the action did not need to be done because texture already met the goal. Returns Error if the operation could not be applied because the texture is not a suitable type, or an unexpected error was encountered during processing.

Parameters:
  • texture (Texture)

  • resize_to_less_or_equal_to_target_size (int32)

Return type:

TextureAssetActionsBlueprintReturn

classmethod resize_texture_source_to_power_of_two(texture, filter_threshold_value) TextureAssetActionsBlueprintReturn

Resizes the texture Source to power of two, if it wasn’t already.

Only acts on textures larger than FilterThresholdValue. Use FilterThresholdValue = 0 to disable filtering by size.

Returns Success if the action was done, returns AlreadyDone if the action did not need to be done because texture already met the goal. Returns Error if the operation could not be applied because the texture is not a suitable type, or an unexpected error was encountered during processing.

Parameters:
  • texture (Texture)

  • filter_threshold_value (int32)

Return type:

TextureAssetActionsBlueprintReturn