Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrainEditor module · function

OrreryTerrainBrushPalette::

MakeBrushFromTexture

Editor only

Make 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

NameTypeDefaultMeaning
TextureUTexture2D*—

The source texture; null makes nothing.

Optionsconst FImportOptions&—

Channel, invert, side, bits and usage of the bake.

OuterUObject*—

The new asset's outer: a new package for Import, the transient package in tests.

NameFName—

The asset's name.

FlagsEObjectFlags—

Object flags (RF_Public | RF_Standalone for an asset).

OutWhyFString&—

On failure, why, in words.

Returns

The baked asset, or null (no texture, a bake refused) with OutWhy set; nothing is left behind then.