UTextureFactory

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Classes/Factories/TextureFactory.h

Include

#include "Factories/TextureFactory.h"

Syntax

class UTextureFactory :
    public UFactory,
    public IImportSettingsParser

Variables

Name Description

Public variable

FVector4

 

AlphaCoverageThresholds

Channel values to compare to when preserving alpha coverage from a mask.

Public variable

uint32: 1

 

bAlphaToEmissive

If enabled, link the texture's alpha to the created material's emissive color

Public variable

uint32: 1

 

bAlphaToOpacity

If enabled, link the texture's alpha to the created material's opacity

Public variable

uint32: 1

 

bAlphaToOpacityMask

If enabled, link the texture's alpha to the created material's opacity mask

Public variable

uint32: 1

 

bAlphaToRoughness

If enabled, link the texture's alpha to the created material's specular color

Public variable

uint32: 1

 

bCreateMaterial

If enabled, a material will automatically be created for the texture

Public variable

uint32: 1

 

bDeferCompression

If enabled, compression is deferred until the texture is saved

Public variable

uint32: 1

 

bDitherMipMapAlpha

If enabled, mip-map alpha values will be dithered for smooth transitions

Public variable

uint32: 1

 

bFlipNormalMapGreenChannel

If enabled, the texture's green channel will be inverted. This is useful for some normal maps

Protected variable

bool

 

bIsDoingAReimport

Keep track of if we are doing a reimport

Public variable

TEnumAsByte< en...

 

Blending

The blend mode of the created material

Public variable

uint32: 1

 

bPreserveBorder

If enabled, preserve the value of border pixels when creating mip-maps

Public variable

uint32: 1

 

bRGBToBaseColor

If enabled, link the texture to the created material's base color

Public variable

uint32: 1

 

bRGBToEmissive

If enabled, link the texture to the created material's emissive color

Public variable

uint32: 1

 

bTwoSided

If enabled, the created material will be two-sided

Public variable

uint32: 1

 

bUseHashAsGuid

If enabled, we are using the texture content hash as the guid.

Public variable

uint32: 1

 

bUsingExistingSettings

If enabled, we are using the existing settings for a texture that already existed.

Public variable

ETextureSourceC...

 

ColorSpaceMode

Mode for how to determine the color space of the source image.

Public variable

TEnumAsByte< en...

 

CompressionSettings

Compression settings for the texture

Public variable

TEnumAsByte< en...

 

LODGroup

The group the texture belongs to

Public variable

TEnumAsByte< en...

 

MipGenSettings

The mip-map generation settings for the texture; Allows customization of the content of the mip-map chain

Public variable

uint32: 1

 

NoAlpha

If enabled, the texture's alpha channel will be discarded during compression

Public variable

uint32: 1

 

NoCompression

Public variable

TEnumAsByte< en...

 

ShadingModel

The shading model of the created material

Public variable

FString

 

UdimRegexPattern

The pattern to use to match UDIM files to indices.

Constructors

Name Description

Public function

UTextureFactory

(
    const FObjectInitializer& ObjectIn...
)

Public function

UTextureFactory

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Virtual

UTexture2D &...

 

CreateTexture2D

(
    UObject* InParent,
    FName Name,
    EObjectFlags Flags
)

Create a texture given the appropriate input parameters

Public function Virtual

UTexture2DAr...

 

CreateTexture2DArray

(
    UObject* InParent,
    FName Name,
    EObjectFlags Flags
)

Public function Virtual

UTextureCube...

 

CreateTextureCube

(
    UObject* InParent,
    FName Name,
    EObjectFlags Flags
)

Public function

void

 

FindCubeMapFace

(
    const FString& ParsedText,
    const FString& FaceString,
    UTextureCube& TextureCube,
    UTexture2D*& TextureFace
)

Public function

bool

 

InitializeFromT3DTexture2DDataText

(
    UTexture2D* InTexture2D,
    const TCHAR*& Buffer,
    FFeedbackContext* Warn
)

Public function

bool

 

InitializeFromT3DTextureCubeDataText

(
    UTextureCube* InTextureCube,
    const TCHAR*& Buffer,
    FFeedbackContext* Warn
)

Public function

bool

 

InitializeFromT3DTextureDataText

(
    UTexture* InTexture,
    const FString& Text,
    FFeedbackContext* Warn
)

Initializes the given texture from the TextureData text block supplied.

Public function Static

void

 

SuppressImportOverwriteDialog

(
    bool bOverwriteExistingSettings
)

Suppresses the dialog box that, when importing over an existing texture, asks if the users wishes to overwrite its settings.

Overridden from UFactory

Name Description

Public function Virtual

bool

 

DoesSupportClass

(
    UClass* Class
)

Public function Virtual

bool

 

FactoryCanImport

(
    const FString& Filename
)

Whether the specified file can be imported by this factory.

Public function Virtual

UObject *...

 

FactoryCreateBinary

(
    UClass* InClass,
    UObject* InParent,
    FName InName,
    EObjectFlags Flags,
    UObject* Context,
    const TCHAR* Type,
    const uint8*& Buffer,
    const uint8* BufferEnd,
    FFeedbackContext* Warn
)

Create a new object by importing it from a binary buffer.

Public function Virtual

IImportSetti...

 

GetImportSettingsParser()

Overridden from UObject

Name Description

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Overridden from IImportSettingsParser

Name Description

Public function Virtual

void

 

ParseFromJson

(
    TSharedRef< class FJsonObject > Imp...
)

IImportSettingsParser interface

Enums

Name

Description

Private enum

EImageImportFlags

Flags to be used when calling ImportImage

Constants

Name

Description

bForceOverwriteExistingSettings

Force overwriting the existing texture without the dialog box

bSuppressImportOverwriteDialog

This variable is static because in StaticImportObject() the type of the factory is not known.