Files
UnrealEngineUWP/Engine/Source/Editor/MaterialEditor/Private/MaterialExpressionClasses.h
Marcus Wassmer 3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00

73 lines
2.0 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
class UMaterialExpression;
class MaterialExpressionClasses
{
public:
/** Gets singleton instance */
static MaterialExpressionClasses* Get();
/**
* Checks if the given expression is in the favorites list...
*
* @param InExpression The expression to check for.
*
* @return bool true if it's in the list, false if not.
*/
bool IsMaterialExpressionInFavorites(UMaterialExpression* InExpression);
/**
* Remove the expression from the favorites menu list.
*/
void RemoveMaterialExpressionFromFavorites(UClass* InExpression);
/**
* Add the expression to the favorites menu list.
*/
void AddMaterialExpressionToFavorites(UClass* InExpression);
/** array of UMaterialExpression-derived classes, shared between all material editor instances. */
TArray<struct FMaterialExpression> AllExpressionClasses;
TArray<struct FMaterialExpression> FavoriteExpressionClasses;
/** array of UMaterialExpression-derived classes, shared between all material editor instances. */
TArray<struct FCategorizedMaterialExpressionNode> CategorizedExpressionClasses;
TArray<struct FMaterialExpression> UnassignedExpressionClasses;
private:
MaterialExpressionClasses();
virtual ~MaterialExpressionClasses();
/**
*
*/
const UStruct* GetExpressionInputStruct();
/**
* Grab the expression array for the given category.
*
* @param InCategoryName The category to retrieve
* @param bCreate If true, create the entry if not found.
*
* @return The category node.
*/
struct FCategorizedMaterialExpressionNode* GetCategoryNode(const FText& InCategoryName, bool bCreate);
/**
* Initializes the list of UMaterialExpression-derived classes shared between all material editor instances.
*/
void InitMaterialExpressionClasses();
/**
* true if the list of UMaterialExpression-derived classes shared between material
* editors has already been created.
*/
bool bInitialized;
};