Orrery Terrain · OrreryTerrainEditor module · function
OrreryTerrainBrushPalette::
MakeBrushFromTexture
Editor onlyMake a brush asset of Texture through the asset's own bake (it reads the texture's source, never its platform data).
Declaration
UOrreryTerrainBrushAsset* MakeBrushFromTexture(UTexture2D* Texture, const FImportOptions& Options, UObject* Outer, FName Name,
EObjectFlags Flags, FString& OutWhy);- Header
#include "Tools/OrreryTerrainBrushPalette.h"- Module
PublicDependencyModuleNames.Add("OrreryTerrainEditor");in an editor module’s Build.cs: an editor module, not in packaged games.- Stability
- Stable: changes within a major version only add.
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
Texture | UTexture2 | — | The source texture; null makes nothing. |
Options | const FImport | — | Channel, invert, side, bits and usage of the bake. |
Outer | UObject* | — | The new asset's outer: a new package for Import, the transient package in tests. |
Name | FName | — | The asset's name. |
Flags | EObject | — | Object flags (RF_Public | RF_Standalone for an asset). |
OutWhy | FString& | — | On failure, why, in words. |
Returns
The baked asset, or null (no texture, a bake refused) with OutWhy set; nothing is left behind then.