Nebula
Loading...
Searching...
No Matches
modeldocument.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
25//------------------------------------------------------------------------------
26#if WITH_NEBULA_EDITOR
27#include "editorassets/assetdocument.h"
28
29namespace GraphicsFeature
30{
31
32struct ModelEdits;
33struct ModelDocumentState;
34
35class ModelDocument final : public Editor::AssetDocument
36{
38public:
40 virtual ~ModelDocument();
41
43 void Draw() override;
45 void OnShown(bool shown) override;
47 bool CanSave() const override;
48
50 static void OpenAsset(const IO::Path& asset);
51
54 void ApplyEdits(const ModelEdits& edits);
55
56protected:
57 bool OnOpen() override;
58 void OnClose() override;
59 bool OnSave(Util::String& outError) override;
60
61private:
63 void Loaded();
65 void PreviewLoaded();
68 void Commit(const char* name);
70 void CommitNow(const char* name);
72 void ApplyNodeMaterial(const Util::String& node, const Util::String& material);
74 void RunPendingMaterial();
75
77 void DrawMaterials();
78 void DrawMesh();
79 void DrawJointMasks();
80 void DrawAnimationLayer();
81 void DrawClipSections();
82 void DrawClipEvents();
83
84 ModelDocumentState* state;
85};
86
87} // namespace GraphicsFeature
88#endif // WITH_NEBULA_EDITOR
89//------------------------------------------------------------------------------
A model open in the asset editor, shown in the asset preview: the material of each node,...
A path is an abstraction around file paths.
Definition path.h:26
Nebula's universal string class.
Definition string.h:50
Definition graphicsfeatureunit.cc:66
#define __DeclareClass(type)