3#include <EditorFramework/Assets/SimpleAssetDocument.h>
4#include <EditorPluginAssets/VisualShader/VisualShaderNodeManager.h>
12 using StorageType = plUInt8;
20 Default = BaseMaterial
41 using StorageType = plUInt8;
64 void SetBaseMaterial(
const char* szBaseMaterial);
65 const char* GetBaseMaterial()
const;
67 void SetSurface(
const char* szSurface) { m_sSurface = szSurface; }
68 const char* GetSurface()
const {
return m_sSurface; }
70 void SetShader(
const char* szShader);
71 const char* GetShader()
const;
78 void UpdateShader(
bool bForce =
false);
80 void DeleteProperties();
81 void CreateProperties(
const char* szShaderPath);
86 plString ResolveRelativeShaderPath()
const;
87 plString GetAutoGenShaderPathAbs()
const;
112 void SetBaseMaterial(
const char* szBaseMaterial);
127 static plUuid GetLitBaseMaterial();
128 static plUuid GetLitAlphaTestBaseMaterial();
129 static plUuid GetNeutralNormalMap();
142 virtual void InitializeAfterLoading(
bool bFirstTimeCreation)
override;
150 virtual void RestoreMetaDataAfterLoading(
const plAbstractObjectGraph& graph,
bool bUndoable)
override;
154 void InvalidateCachedShader();
159 static plUuid s_LitBaseMaterial;
160 static plUuid s_LitAlphaTextBaseMaterial;
161 static plUuid s_NeutralNormalMap;
Definition AbstractObjectGraph.h:115
This class encapsulates an array and it's size. It is recommended to use this class instead of plain ...
Definition ArrayPtr.h:37
The thumbnail info containing the hash of the file is appended to assets. The serialized size of this...
Definition AssetDocument.h:49
Definition AssetDocumentInfo.h:7
Definition DocumentObjectBase.h:11
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Definition MaterialAsset.h:102
virtual void GetSupportedMimeTypesForPasting(plHybridArray< plString, 4 > &out_mimeTypes) const override
Whether this document supports pasting the given mime format into it.
Definition MaterialAsset.cpp:1394
void RemoveDisconnectedNodes()
Deletes all Visual Shader nodes that are not connected to the output.
Definition MaterialAsset.cpp:1299
virtual void InternalGetMetaDataHash(const plDocumentObject *pObject, plUInt64 &inout_uiHash) const override
Computes the hash for transform relevant meta data of the given document object and combines it with ...
Definition MaterialAsset.cpp:896
virtual bool CopySelectedObjects(plAbstractObjectGraph &out_objectGraph, plStringBuilder &out_sMimeType) const override
Creates the abstract graph of data to be copied and returns the mime type for the clipboard to identi...
Definition MaterialAsset.cpp:1399
virtual void UpdateAssetDocumentInfo(plAssetDocumentInfo *pInfo) const override
Override this to add custom data (e.g. additional file dependencies) to the info struct.
Definition MaterialAsset.cpp:916
plStatus RecreateVisualShaderFile(const plAssetFileHeader &assetHeader)
Will make sure that the visual shader is rebuilt. Typically called during asset transformation,...
Definition MaterialAsset.cpp:1216
void TagVisualShaderFileInvalid(const plPlatformProfile *pAssetProfile, const char *szError)
If shader compilation failed this will modify the output shader file such that transforming it again,...
Definition MaterialAsset.cpp:1185
virtual plTransformStatus InternalTransformAsset(const char *szTargetFile, plStringView sOutputTag, const plPlatformProfile *pAssetProfile, const plAssetFileHeader &AssetHeader, plBitflags< plTransformFlags > transformFlags) override
Only override this function, if the transformed file for the given szOutputTag must be written from a...
Definition MaterialAsset.cpp:793
virtual plTransformStatus InternalCreateThumbnail(const ThumbnailInfo &ThumbnailInfo) override
Override this function to generate a thumbnail. Only called if GetAssetFlags returns plAssetDocumentF...
Definition MaterialAsset.cpp:891
Definition MaterialAsset.h:56
Definition MaterialAsset.h:165
All classes that should be dynamically reflectable, need to be derived from this base class.
Definition DynamicRTTI.h:86
Definition SimpleAssetDocument.h:23
Interface for binary out (write) streams.
Definition Stream.h:107
plStringBuilder is a class that is meant for creating and modifying strings.
Definition StringBuilder.h:35
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
This data type is the abstraction for 128-bit Uuid (also known as GUID) instances.
Definition Uuid.h:11
Definition VisualShaderNodeManager.h:24
The plBitflags class allows you to work with type-safe bitflags.
Definition Bitflags.h:82
Definition EditorApp.moc.h:35
A custom enum implementation that allows to define the underlying storage type to control its memory ...
Definition Enum.h:37
Definition MaterialAsset.h:40
Definition MaterialAsset.h:11
Definition MaterialAsset.h:25
An plResult with an additional message for the reason of failure.
Definition Status.h:12