UMaterialEditingLibrary

Blueprint library for creating/editing Materials

Unreal Engine C++ API Reference > Editor > MaterialEditor

Inheritance Hierarchy

References

   
Module MaterialEditor
Header /Engine/Source/Editor/MaterialEditor/Public/MaterialEditingLibrary.h
Include #include "MaterialEditingLibrary.h"

Syntax

class UMaterialEditingLibrary : public [UBlueprintFunctionLibrary](API\Runtime\Engine\Kismet\UBlueprintFunctionLibrary)  

Remarks

Blueprint library for creating/editing Materials

Functions

Type Name Description
void ClearAllMaterialInstanceParameters ( UMaterialInstanceConstant* Ins... ) Clears all material parameters set by this Material Instance
bool ConnectMaterialExpressions ( UMaterialExpression* FromExpre..., FString FromOutputName, UMaterialExpression* ToExpress..., FString ToInputName ) Create connection between two material expressions
bool ConnectMaterialProperty ( UMaterialExpression* FromExpre..., FString FromOutputName, EMaterialProperty Property ) Connect a material expression output to one of the material property inputs (e.g. diffuse color, opacity etc)
UMaterialExp... CreateMaterialExpression ( UMaterial* Material, TSubclassOf< UMaterialExpression > ..., int32 NodePosX, int32 NodePosY ) Create a new material expression node within the supplied material
UMaterialExp... CreateMaterialExpressionEx ( UMaterial* Material, UMaterialFunction* MaterialFun..., TSubclassOf< UMaterialExpression > ..., UObject* SelectedAsset, int32 NodePosX, int32 NodePosY, bool bAllowMarkingPackageDirty ) Create a new material expression node within the supplied material, optionally specifying asset to use
UMaterialExp... CreateMaterialExpressionInFunction ( UMaterialFunction* MaterialFun..., TSubclassOf< UMaterialExpression > ..., int32 NodePosX, int32 NodePosY ) Create a new material expression node within the supplied material function
void DeleteAllMaterialExpressions ( UMaterial* Material ) Delete all material expressions in the supplied material
void DeleteAllMaterialExpressionsInFunction ( UMaterialFunction* MaterialFun... ) Delete all material expressions in the supplied material function
void DeleteMaterialExpression ( UMaterial* Material, UMaterialExpression* Expressio... ) Delete a specific expression from a material. Will disconnect from other expressions.
void DeleteMaterialExpressionInFunction ( UMaterialFunction* MaterialFun..., UMaterialExpression* Expressio... ) Delete a specific expression from a material function. Will disconnect from other expressions.
UMaterialExp... DuplicateMaterialExpression ( UMaterial* Material, UMaterialFunction* MaterialFun..., UMaterialExpression* Expressio... ) Duplicates the provided material expression adding it to the same material / material function, and copying parameters.
void GetChildInstances ( UMaterialInterface* Parent, TArray< FAssetData >& ChildInstanc... ) Gets all direct child mat instances
bool GetInputNodeOutputNameForMaterialExpression ( UMaterialExpression* MaterialE..., UMaterialExpression* InputNode, FString& OutputName ) Get the output name of input node connected to MaterialExpression from an active material editor
TArray< UMat... GetInputsForMaterialExpression ( UMaterial* Material, UMaterialExpression* MaterialE... ) Get the set of nodes acting as inputs to a node from an active material editor
float GetMaterialDefaultScalarParameterValue ( UMaterial* Material, FName ParameterName ) Get the default scalar (float) parameter value from a Material
bool GetMaterialDefaultStaticSwitchParameterValue ( UMaterial* Material, FName ParameterName ) Get the default static switch parameter value from a Material
UTexture ... GetMaterialDefaultTextureParameterValue ( UMaterial* Material, FName ParameterName ) Get the default texture parameter value from a Material
FLinearColor GetMaterialDefaultVectorParameterValue ( UMaterial* Material, FName ParameterName ) Get the default vector parameter value from a Material
TArray< FStr... GetMaterialExpressionInputNames ( UMaterialExpression* MaterialE... ) Get the array of input pin names for a material expression
TArray< int3... GetMaterialExpressionInputTypes ( UMaterialExpression* MaterialE... ) Get the array of input pin types for a material expression
void GetMaterialExpressionNodePosition ( UMaterialExpression* MaterialE..., int32& NodePosX, int32& NodePosY ) Get the position of the MaterialExpression node.
URuntimeVirt... GetMaterialInstanceRuntimeVirtualTextureParameterValue ( UMaterialInstanceConstant* Ins..., FName ParameterName, EMaterialParameterAssociation Assoc... ) Get the current texture parameter value from a Material Instance
float GetMaterialInstanceScalarParameterValue ( UMaterialInstanceConstant* Ins..., FName ParameterName, EMaterialParameterAssociation Assoc... ) Get the current scalar (float) parameter value from a Material Instance
USparseVolum... GetMaterialInstanceSparseVolumeTextureParameterValue ( UMaterialInstanceConstant* Ins..., FName ParameterName, EMaterialParameterAssociation Assoc... ) Get the current texture parameter value from a Material Instance
bool GetMaterialInstanceStaticSwitchParameterValue ( UMaterialInstanceConstant* Ins..., FName ParameterName, EMaterialParameterAssociation Assoc... ) Get the current static switch parameter value from a Material Instance
UTexture ... GetMaterialInstanceTextureParameterValue ( UMaterialInstanceConstant* Ins..., FName ParameterName, EMaterialParameterAssociation Assoc... ) Get the current texture parameter value from a Material Instance
FLinearColor GetMaterialInstanceVectorParameterValue ( UMaterialInstanceConstant* Ins..., FName ParameterName, EMaterialParameterAssociation Assoc... ) Get the current vector parameter value from a Material Instance
UMaterialExp... GetMaterialPropertyInputNode ( UMaterial* Material, EMaterialProperty Property ) Get the node providing the output for a given material property from an active material editor
FString GetMaterialPropertyInputNodeOutputName ( UMaterial* Material, EMaterialProperty Property ) Get the node output name providing the output for a given material property from an active material editor
TSet< UObjec... GetMaterialSelectedNodes ( UMaterial* Material ) Get the set of selected nodes from an active material editor
UMaterialInt... GetNaniteOverrideMaterial ( UMaterialInterface* Material ) Returns any nanite override material for the given material
int32 GetNumMaterialExpressions ( const UMaterial* Material ) Returns number of material expressions in the supplied material
int32 GetNumMaterialExpressionsInFunction ( const UMaterialFunction* Mater... ) Returns number of material expressions in the supplied material
void GetScalarParameterNames ( UMaterialInterface* Material, TArray< FName >& ParameterNames ) Gets all scalar parameter names
bool GetScalarParameterSource ( UMaterialInterface* Material, const FName ParameterName, FSoftObjectPath& ParameterSource ) Returns the path of the asset where the parameter originated, as well as true/false if it was found
void GetStaticSwitchParameterNames ( UMaterialInterface* Material, TArray< FName >& ParameterNames ) Gets all static switch parameter names
bool GetStaticSwitchParameterSource ( UMaterialInterface* Material, const FName ParameterName, FSoftObjectPath& ParameterSource ) Returns the path of the asset where the parameter originated, as well as true/false if it was found
FMaterialSta... GetStatistics ( UMaterialInterface* Material ) Returns statistics about the given material
void GetTextureParameterNames ( UMaterialInterface* Material, TArray< FName >& ParameterNames ) Gets all texture parameter names
bool GetTextureParameterSource ( UMaterialInterface* Material, const FName ParameterName, FSoftObjectPath& ParameterSource ) Returns the path of the asset where the parameter originated, as well as true/false if it was found
TArray< UTex... GetUsedTextures ( UMaterial* Material ) Get the list of textures used by a material
void GetVectorParameterNames ( UMaterialInterface* Material, TArray< FName >& ParameterNames ) Gets all vector parameter names
bool GetVectorParameterSource ( UMaterialInterface* Material, const FName ParameterName, FSoftObjectPath& ParameterSource ) Returns the path of the asset where the parameter originated, as well as true/false if it was found
bool HasMaterialUsage ( UMaterial* Material, EMaterialUsage Usage ) Check if a particular usage is enabled for the supplied material (e.g. SkeletalMesh, ParticleSprite etc)
void LayoutMaterialExpressions ( UMaterial* Material ) Layouts the expressions in a grid pattern
void LayoutMaterialFunctionExpressions ( UMaterialFunction* MaterialFun... ) Layouts the expressions in a grid pattern
void RebuildMaterialInstanceEditors ( UMaterial* BaseMaterial ) Rebuilds dependent Material Instance Editors
void RebuildMaterialInstanceEditors ( UMaterialFunction* BaseFunctio... ) Rebuilds dependent Material Instance Editors
void RecompileMaterial ( UMaterial* Material ) Trigger a recompile of a material.
void SetMaterialInstanceParent ( UMaterialInstanceConstant* Ins..., UMaterialInterface* NewParent ) Set the parent Material or Material Instance to use for this Material Instance
bool SetMaterialInstanceRuntimeVirtualTextureParameterValue ( UMaterialInstanceConstant* Ins..., FName ParameterName, URuntimeVirtualTexture* Value, EMaterialParameterAssociation Assoc... ) Set the texture parameter value for a Material Instance
bool SetMaterialInstanceScalarParameterValue ( UMaterialInstanceConstant* Ins..., FName ParameterName, float Value, EMaterialParameterAssociation Assoc... ) Set the scalar (float) parameter value for a Material Instance
bool SetMaterialInstanceSparseVolumeTextureParameterValue ( UMaterialInstanceConstant* Ins..., FName ParameterName, USparseVolumeTexture* Value, EMaterialParameterAssociation Assoc... ) Set the texture parameter value for a Material Instance
bool SetMaterialInstanceStaticSwitchParameterValue ( UMaterialInstanceConstant* Ins..., FName ParameterName, bool Value, EMaterialParameterAssociation Assoc... ) Set the static switch parameter value for a Material Instance
bool SetMaterialInstanceTextureParameterValue ( UMaterialInstanceConstant* Ins..., FName ParameterName, UTexture* Value, EMaterialParameterAssociation Assoc... ) Set the texture parameter value for a Material Instance
bool SetMaterialInstanceVectorParameterValue ( UMaterialInstanceConstant* Ins..., FName ParameterName, FLinearColor Value, EMaterialParameterAssociation Assoc... ) Set the vector parameter value for a Material Instance
bool SetMaterialUsage ( UMaterial* Material, EMaterialUsage Usage, bool& bNeedsRecompile ) Enable a particular usage for the supplied material (e.g. SkeletalMesh, ParticleSprite etc)
void UpdateMaterialFunction ( UMaterialFunctionInterface* Ma..., UMaterial* PreviewMaterial ) Update a Material Function after edits have been made.
void UpdateMaterialInstance ( UMaterialInstanceConstant* Ins... ) Called after making modifications to a Material Instance to recompile shaders etc.

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library