Module |
|
Header |
/Engine/Plugins/Experimental/MeshModelingToolset/Source/ModelingComponents/Public/AssetUtils/Texture2DBuilder.h |
Include |
#include "AssetUtils/Texture2DBuilder.h" |
class FTexture2DBuilder
Texture2DBuilder is a utility class for creating/modifying various types of UTexture2D. Use Initialize() functions to configure, can either generate a new UTexture2D (in the Transient package) or modify an existing UTexture2D.
Currently the generated UTexture2D will only have Mip 0, and only Mip 0 can be edited. The generated UTexture2D has format PF_B8G8R8A8.
Use Commit() to lock and update the texture after editing is complete. LockForEditing() can be used to re-open. By default textures are locked for editing on Initialize()
If you have generated a UTexture2D by other means, you can use the static function ::CopyPlatformDataToSourceData() to populate the Source data from the PlatformData, which is required to save it as a UAsset.
Name | Description | ||
---|---|---|---|
|
BuildType |
||
|
FColor * |
CurrentMipData |
|
|
Dimensions |
||
|
UTexture2D *... |
RawTexture2D |
Name | Description | |
---|---|---|
|
~FTexture2DBuilder() |
Name | Description | ||
---|---|---|---|
|
Cancel() |
||
|
Clear ( |
Clear all texels in the current Mip to the given ClearColor |
|
|
Clear() |
Clear all texels in the current Mip to the clear/default color for the texture build type |
|
|
ClearTexel ( |
Set the texel at the given linear index to the clear/default color |
|
|
Commit ( |
Unlock the Mip 0 buffer and update the texture rendering data. |
|
|
Copy ( |
Populate texel values from floating-point SourceImage |
|
|
Copy ( |
Populate texel values from floating-point SourceImage |
|
|
CopyPlatformDataToSourceData ( |
Use a FTexture2DBuilder to copy the PlatformData to the UTexture2D Source data, so it can be saved as an Asset |
|
|
CopyTexel |
Copy texel value from one linear index to another |
|
|
CopyTo ( |
Copy existing texel values to floating-point DestImage |
|
|
const FColor... |
GetClearColor() |
|
|
const FImage... |
GetDimensions() |
|
|
FColor * |
GetRawTexelBufferUnsafe() |
This point is invalid after the texture is Committed! |
|
const FColor... |
GetRawTexelBufferUnsafe() |
This point is invalid after the texture is Committed! |
|
const FColor... |
GetTexel ( |
Get the texel at the given linear index |
|
const FColor... |
GetTexel ( |
Get the texel at the given X/Y coordinates |
|
UTexture2D &... |
GetTexture2D() |
|
|
const ETextu... |
GetTextureType() |
|
|
Initialize ( |
Initialize the builder with an existing UTexture2D |
|
|
Initialize ( |
Create a new UTexture2D configured with the given BuildType and Dimensions |
|
|
IsEditable() |
||
|
LockForEditing() |
Lock the Mip 0 buffer for editing |
|
|
SetTexel |
Set the texel at the given X/Y coordinates to the given FColor |
|
|
SetTexel |
Set the texel at the given linear index to the given FColor |
|
|
UpdateSourceData() |
Copy the current PlatformData to the UTexture2D Source Data. |
Name |
Description |
|
---|---|---|
|
ETextureType |
Supported texture types |