Polyphase Game Engine
Loading...
Searching...
No Matches
EditorTypes.h
Go to the documentation of this file.
1#pragma once
2
3#if EDITOR
4
5#include "EngineTypes.h"
6
7struct AssetStub;
8
9enum class PolyphaseMeshType { Node3D, StaticMesh, InstancedMesh };
10
11struct PolyphaseNodeExtras
12{
13 PolyphaseMeshType mMeshType = PolyphaseMeshType::StaticMesh;
14 std::string mAssetName;
15 uint64_t mAssetUuid = 0;
16 std::string mScriptPath;
17 std::string mScriptPropsJson;
18 std::string mScriptPropsTypesJson;
19 std::string mMaterialType;
20 std::string mMaterialPath; // existing project Material to use as override (name or path)
21 bool mMainCamera = false;
22 // Per-node overrides. -1 = unset (use SceneImportOptions default / leave as-is).
23 int mCollision = -1; // 0 = no collision, 1 = collision
24 int mHidden = -1; // 0 = visible, 1 = hidden
25};
26
27struct SceneImportOptions
28{
29 std::string mFilePath;
30 std::string mSceneName;
31 std::string mPrefix;
32 bool mImportMeshes = true;
33 bool mImportMaterials = true;
34 bool mImportTextures = true;
35 bool mImportLights = true;
36 bool mImportCameras = true;
37 bool mEnableCollision = true;
38 bool mApplyGltfExtras = true;
39 ShadingModel mDefaultShadingModel = ShadingModel::Lit;
40 VertexColorMode mDefaultVertexColorMode = VertexColorMode::None;
41 bool mReimportTextures = false;
42 // Share materials/textures across scene imports instead of namespacing them
43 // per-scene. When true, M_/T_ assets get a scene-independent name (dropping
44 // the per-scene stem) and land in a single shared folder; an existing asset
45 // of the same name is reused instead of duplicated. Ideal for tiled/streamed
46 // worlds where many sector scenes reference the same ground material/texture.
47 bool mShareAssets = false;
48 std::string mSharedAssetDir = "_Shared"; // folder (sibling of scene folders)
49 AssetStub* mReimportSceneStub = nullptr; // Non-null = reimport mode
50};
51
52enum class MeshImportMode : uint8_t
53{
54 AsScene = 0,
55 AsMultipleObjects = 1,
56 AsSingleObject = 2,
57 Count
58};
59
60struct MeshImportOptions
61{
62 MeshImportMode mMode = MeshImportMode::AsMultipleObjects;
63 bool mPlaceInSubdirectory = true;
64 bool mImportMaterials = true;
65 bool mImportTextures = true;
66 std::string mPrefix;
67 ShadingModel mDefaultShadingModel = ShadingModel::Lit;
68 VertexColorMode mDefaultVertexColorMode = VertexColorMode::None;
69};
70
71struct CameraImportOptions
72{
73 std::string mFilePath;
74 std::string mCameraName;
75 bool mIsMainCamera = false;
76 bool mOverrideCameraName = false;
77};
78
79#endif
ShadingModel
Definition EngineTypes.h:105
VertexColorMode
Definition EngineTypes.h:124
Definition Node3d.h:14
Definition StaticMesh.h:18
Definition Asset.h:89