/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Tools/Libs/ToolsFoundation/Document/Implementation/Declarations.h
79 строк
2 KB
Jan Krassnigg
Fixed #1100: Newly created assets are now functional right away (#1103)
17 ноя 2023, 23:50
Не верифицирован
17 ноя 2023, 23:50
d4ad580
Код
Авторство
О чём код?
#pragma once class ezDocument; class ezDocumentManager; class ezDocumentObjectManager; class ezAbstractObjectGraph; struct ezDocumentFlags { using StorageType = ezUInt8; enum Enum { None = 0, RequestWindow = EZ_BIT(0), ///< Open the document visibly (not just internally) AddToRecentFilesList = EZ_BIT(1), ///< Add the document path to the recently used list for users AsyncSave = EZ_BIT(2), ///< EmptyDocument = EZ_BIT(3), ///< Don't populate a new document with default state (templates etc) Default = None, }; struct Bits { StorageType RequestWindow : 1; StorageType AddToRecentFilesList : 1; StorageType AsyncSave : 1; StorageType EmptyDocument : 1; }; }; EZ_DECLARE_FLAGS_OPERATORS(ezDocumentFlags); struct EZ_TOOLSFOUNDATION_DLL ezDocumentTypeDescriptor { ezString m_sFileExtension; ezString m_sDocumentTypeName; bool m_bCanCreate = true; ezString m_sIcon; const ezRTTI* m_pDocumentType = nullptr; ezDocumentManager* m_pManager = nullptr; ezStringView m_sAssetCategory; // passed to ezColorScheme::GetCategoryColor() with CategoryColorUsage::AssetMenuIcon /// This list is used to decide which asset types can be picked from the asset browser for a property. /// The strings are arbitrary and don't need to be registered anywhere else. /// An asset may be compatible for multiple scenarios, e.g. a skinned mesh may also be used as a static mesh, but not the other way round. /// In such a case the skinned mesh is set to be compatible to both "CompatibleAsset_Mesh_Static" and "CompatibleAsset_Mesh_Skinned", but the non-skinned mesh only to "CompatibleAsset_Mesh_Static". /// A component then only needs to specify that it takes an "CompatibleAsset_Mesh_Static" as input, and all asset types that are compatible to that will be browseable. ezHybridArray<ezString, 1> m_CompatibleTypes; }; struct ezDocumentEvent { enum class Type { ModifiedChanged, ReadOnlyChanged, EnsureVisible, DocumentSaved, DocumentRenamed, DocumentStatusMsg, }; Type m_Type; const ezDocument* m_pDocument; ezStringView m_sStatusMsg; }; class EZ_TOOLSFOUNDATION_DLL ezDocumentInfo : public ezReflectedClass { EZ_ADD_DYNAMIC_REFLECTION(ezDocumentInfo, ezReflectedClass); public: ezDocumentInfo(); ezUuid m_DocumentID; };