Plasma Engine  2.0
Loading...
Searching...
No Matches
AnimatedMeshAsset.h
1#pragma once
2
3#include <EditorFramework/Assets/AssetDocumentGenerator.h>
4#include <EditorFramework/Assets/SimpleAssetDocument.h>
5#include <EditorPluginAssets/AnimatedMeshAsset/AnimatedMeshAssetObjects.h>
6
9
10class plAnimatedMeshAssetDocument : public plSimpleAssetDocument<plAnimatedMeshAssetProperties>
11{
13
14public:
16
17protected:
18 virtual plTransformStatus InternalTransformAsset(plStreamWriter& stream, plStringView sOutputTag, const plPlatformProfile* pAssetProfile,
19 const plAssetFileHeader& AssetHeader, plBitflags<plTransformFlags> transformFlags) override;
20
21 plStatus CreateMeshFromFile(plAnimatedMeshAssetProperties* pProp, plMeshResourceDescriptor& desc);
22
23
25};
26
28
30{
32
33public:
36
37 virtual void GetImportModes(plStringView sAbsInputFile, plDynamicArray<plAssetDocumentGenerator::ImportMode>& out_modes) const override;
38 virtual plStringView GetDocumentExtension() const override { return "plAnimatedMeshAsset"; }
39 virtual plStringView GetGeneratorGroup() const override { return "Meshes"; }
40 virtual plStatus Generate(plStringView sInputFileAbs, plStringView sMode, plDynamicArray<plDocument*>& out_generatedDocuments) override;
41};
Definition AnimatedMeshAsset.h:30
virtual plStringView GetGeneratorGroup() const override
Allows to merge the import modes of multiple generators in the UI in one group.
Definition AnimatedMeshAsset.h:39
virtual void GetImportModes(plStringView sAbsInputFile, plDynamicArray< plAssetDocumentGenerator::ImportMode > &out_modes) const override
Used to fill out which import modes may be available for the given asset.
Definition AnimatedMeshAsset.cpp:132
virtual plStatus Generate(plStringView sInputFileAbs, plStringView sMode, plDynamicArray< plDocument * > &out_generatedDocuments) override
Tells the generator to create a new asset document with the chosen mode.
Definition AnimatedMeshAsset.cpp:149
virtual plStringView GetDocumentExtension() const override
Returns the target asset document file extension.
Definition AnimatedMeshAsset.h:38
Definition AnimatedMeshAsset.h:11
virtual plTransformStatus InternalTransformAsset(plStreamWriter &stream, plStringView sOutputTag, const plPlatformProfile *pAssetProfile, const plAssetFileHeader &AssetHeader, plBitflags< plTransformFlags > transformFlags) override
Override this and write the transformed file for the given szOutputTag into the given stream.
Definition AnimatedMeshAsset.cpp:19
virtual plTransformStatus InternalCreateThumbnail(const ThumbnailInfo &ThumbnailInfo) override
Override this function to generate a thumbnail. Only called if GetAssetFlags returns plAssetDocumentF...
Definition AnimatedMeshAsset.cpp:111
Definition AnimatedMeshAssetObjects.h:7
The thumbnail info containing the hash of the file is appended to assets. The serialized size of this...
Definition AssetDocument.h:49
Provides functionality for importing files as asset documents.
Definition AssetDocumentGenerator.h:23
Simple class to handle asset file headers (the very first bytes in all transformed asset files)
Definition AssetFileHeader.h:8
Definition DynamicArray.h:81
Definition MaterialAsset.h:102
Definition MeshResourceDescriptor.h:9
Definition PlatformProfile.h:25
Definition SimpleAssetDocument.h:23
Interface for binary out (write) streams.
Definition Stream.h:107
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
The plBitflags class allows you to work with type-safe bitflags.
Definition Bitflags.h:82
An plResult with an additional message for the reason of failure.
Definition Status.h:12
Definition Declarations.h:114