Files
UnrealEngineUWP/Engine/Source/Editor/MaterialEditor/Private/MaterialExpressionClasses.h
Chris Gagnon 8fc25ea18e Merging //UE4/Dev-Main to Dev-Editor (//UE4/Dev-Editor)
#rb none

[CL 4676797 by Chris Gagnon in Dev-Editor branch]
2019-01-02 14:54:39 -05:00

76 lines
2.1 KiB
C++

// Copyright 1998-2019 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;
// Temporary flag for toggling experimental nodes
bool bMaterialLayersEnabled;
};