|
Polyphase Game Engine
|
#include <ActionManager.h>
Classes | |
| struct | EmbeddedRawAssetEntry |
Public Member Functions | |
| ~ActionManager () | |
| void | Update () |
| void | OnSelectedNodeChanged () |
| Node * | SpawnNode (TypeId nodeType, Node *parent) |
| Node * | SpawnNode (TypeId nodeType, glm::vec3 position) |
| Node * | SpawnBasicNode (const std::string &name, Node *parent, Asset *srcAsset=nullptr, bool setWorldPos=false, glm::vec3 worldPos={ 0.0f, 0.0f, 0.0f }) |
| void | ExecuteAction (Action *action) |
| void | Undo () |
| void | Redo () |
| void | EXE_EditProperty (void *owner, PropertyOwnerType ownerType, const std::string &name, uint32_t index, Datum newValue) |
| void | EXE_EditTransform (Node3D *node, const glm::mat4 &transform) |
| void | EXE_EditTransforms (const std::vector< Node3D * > &nodes, const std::vector< glm::mat4 > &newTransforms) |
| void | EXE_EditWidgetTransforms (const std::vector< Widget * > &widgets, const std::vector< WidgetTransformData > &newTransforms) |
| Node * | EXE_SpawnNode (TypeId srcType) |
| Node * | EXE_SpawnNode (const char *srcTypeName) |
| Node * | EXE_SpawnNode (Scene *srcScene) |
| Node * | EXE_SpawnNode (Node *srcNode) |
| void | EXE_DeleteNode (Node *node) |
| std::vector< Node * > | EXE_SpawnNodes (const std::vector< Node * > &nodes) |
| void | EXE_DeleteNodes (const std::vector< Node * > &nodes) |
| void | EXE_AttachNode (Node *node, Node *newParent, int32_t childIndex, int32_t boneIndex) |
| void | EXE_SetRootNode (Node *newRoot) |
| void | EXE_SetWorldRotation (Node3D *node, glm::quat rot) |
| void | EXE_SetWorldPosition (Node3D *node, glm::vec3 pos) |
| void | EXE_SetWorldScale (Node3D *node, glm::vec3 scale) |
| void | EXE_UnlinkScene (Node *node) |
| void | EXE_ResetScene (Node *node) |
| void | EXE_SetInstanceColors (const std::vector< ActionSetInstanceColorsData > &data) |
| void | EXE_SetVoxels (class Voxel3D *voxel, const std::vector< struct VoxelChange > &changes) |
| void | EXE_SetTerrainHeights (class Terrain3D *terrain, const std::vector< struct TerrainHeightChange > &changes) |
| void | EXE_PaintTiles (class TileMap2D *tileMapNode, const std::vector< struct TilePaintChange > &changes) |
| void | EXE_SetInstanceData (InstancedMesh3D *instMesh, int32_t startIndex, const std::vector< MeshInstanceData > &data) |
| void | EXE_ReplaceSelectedWithAsset (Asset *asset, const std::vector< Node * > &nodes) |
| Replace selected nodes' mesh/material with an asset, or replace with scene instances. | |
| void | EXE_ReplaceWithInstancedMesh (const std::vector< Node * > &nodes, bool merge) |
| Replace selected StaticMesh3D nodes with InstancedMesh3D nodes. | |
| void | EXE_ReplaceWithStaticMesh (const std::vector< Node * > &nodes) |
| Split selected InstancedMesh3D nodes into individual StaticMesh3D nodes. | |
| void | EXE_ParentSelectedWith (const std::vector< Node * > &nodes, TypeId parentType, ArrayOrientation arrayOrientation=ArrayOrientation::Vertical) |
| Create a new parent node of the specified type and reparent all selected nodes under it. | |
| void | EXE_TimelineAddTrack (Timeline *timeline, TypeId trackType) |
| void | EXE_TimelineRemoveTrack (Timeline *timeline, int32_t trackIndex) |
| void | EXE_TimelineAddClip (Timeline *timeline, int32_t trackIndex, TypeId clipType, float startTime, float duration) |
| void | EXE_TimelineRemoveClip (Timeline *timeline, int32_t trackIndex, int32_t clipIndex) |
| void | EXE_TimelineMoveClip (Timeline *timeline, int32_t trackIndex, int32_t clipIndex, float oldStartTime, float newStartTime) |
| void | EXE_TimelineBindTrack (Timeline *timeline, int32_t trackIndex, uint64_t oldUuid, uint64_t newUuid, const std::string &oldName, const std::string &newName) |
| void | ClearActionHistory () |
| void | ClearActionFuture () |
| void | ResetUndoRedo () |
| void | ExileNode (NodePtr node) |
| void | RestoreExiledNode (NodePtr node) |
| void | GatherScriptFiles (const std::string &dir, std::vector< std::string > &outFiles) |
| void | CreateNewProject (const char *folderPath=nullptr, bool cpp=false, const char *defaultSceneName="SC_Default") |
| void | OpenProject (const char *path=nullptr) |
| void | WriteProjectLocalPolyphaseConfig () |
| void | OpenScene () |
| void | OpenScene (Scene *scene) |
| void | RequestOpenScene (AssetStub *stub) |
| void | RequestOpenSceneFromDialog () |
| void | SaveScene (bool saveAs) |
| void | RequestSaveScene (bool saveAs) |
| void | RequestSaveSelectedAsset () |
| void | RequestResaveAllAssets () |
| void | RequestOpenProject (const char *path) |
| Scene * | CreateNewScene (const char *sceneName, int sceneType, bool createCamera, bool createSkybox=false, AssetDir *targetDir=nullptr) |
| void | SaveSelectedAsset () |
| void | DeleteSelectedNodes () |
| void | DeleteNode (Node *node) |
| void | RunScript () |
| void | ImportAsset () |
| Asset * | ImportAsset (const std::string &path) |
| void | ImportTinyLLMModel () |
| void | ImportTinyLLMTokenizer () |
| void | ImportCamera (const CameraImportOptions &options) |
| void | ImportScene (const SceneImportOptions &options) |
| void | BeginImportScene () |
| void | BeginReimportScene (AssetStub *sceneStub) |
| void | BeginReimportAssetWithNewFile (AssetStub *stub) |
| void | BeginImportCamera () |
| void | BuildData (Platform platform, bool embedded) |
| void | DrawBuildModal () |
| bool | IsBuildRunning () const |
| LocalBuildState & | GetBuildState () |
| void | PrepareRelease () |
| void | ClearWorld () |
| void | DeleteAllNodes () |
| void | RecaptureAndSaveAllScenes () |
| void | ResaveAllAssets () |
| void | DeleteAsset (AssetStub *stub) |
| void | DeleteAssetDir (AssetDir *dir) |
| bool | DuplicateNodes (std::vector< Node * > nodes) |
| void | AttachSelectedNodes (Node *newParent, int32_t boneIdx) |
| bool | CheckProjectNeedsUpgrade () |
| void | UpgradeProject () |
Static Public Member Functions | |
| static void | Create () |
| static void | Destroy () |
| static ActionManager * | Get () |
Protected Member Functions | |
| ActionManager () | |
| void | GenerateEmbeddedAssetFiles (std::vector< std::pair< AssetStub *, std::string > > &assets, std::vector< EmbeddedRawAssetEntry > &rawAssets, const char *headerPath, const char *sourcePath) |
| void | GenerateEmbeddedScriptFiles (std::vector< std::string > files, const char *headerPath, const char *sourcePath) |
| void | BuildPhase1 () |
| void | BuildCompileThreadFunc () |
| void | FinalizeLocalBuild () |
| void | AppendBuildOutput (const std::string &text) |
| void | CancelBuild () |
Protected Attributes | |
| std::vector< Action * > | mActionHistory |
| std::vector< Action * > | mActionFuture |
| std::vector< NodePtr > | mExiledNodes |
| LocalBuildState | mBuildState |
| bool | mShowBuildModal = false |
| std::string | mBuildDisplayOutput |
| bool | mBuildAutoScroll = true |
| bool | mBuildPending = false |
Static Protected Attributes | |
| static ActionManager * | sInstance |
| ActionManager::~ActionManager | ( | ) |
|
protected |
|
protected |
| void ActionManager::AttachSelectedNodes | ( | Node * | newParent, |
| int32_t | boneIdx | ||
| ) |
| void ActionManager::BeginImportCamera | ( | ) |
| void ActionManager::BeginImportScene | ( | ) |
| void ActionManager::BeginReimportAssetWithNewFile | ( | AssetStub * | stub | ) |
| void ActionManager::BeginReimportScene | ( | AssetStub * | sceneStub | ) |
|
protected |
| void ActionManager::BuildData | ( | Platform | platform, |
| bool | embedded | ||
| ) |
|
protected |
|
protected |
| bool ActionManager::CheckProjectNeedsUpgrade | ( | ) |
| void ActionManager::ClearActionFuture | ( | ) |
| void ActionManager::ClearActionHistory | ( | ) |
| void ActionManager::ClearWorld | ( | ) |
|
static |
| void ActionManager::CreateNewProject | ( | const char * | folderPath = nullptr, |
| bool | cpp = false, |
||
| const char * | defaultSceneName = "SC_Default" |
||
| ) |
| Scene * ActionManager::CreateNewScene | ( | const char * | sceneName, |
| int | sceneType, | ||
| bool | createCamera, | ||
| bool | createSkybox = false, |
||
| AssetDir * | targetDir = nullptr |
||
| ) |
| void ActionManager::DeleteAllNodes | ( | ) |
| void ActionManager::DeleteAsset | ( | AssetStub * | stub | ) |
| void ActionManager::DeleteAssetDir | ( | AssetDir * | dir | ) |
| void ActionManager::DeleteNode | ( | Node * | node | ) |
| void ActionManager::DeleteSelectedNodes | ( | ) |
|
static |
| void ActionManager::DrawBuildModal | ( | ) |
| bool ActionManager::DuplicateNodes | ( | std::vector< Node * > | nodes | ) |
| void ActionManager::EXE_AttachNode | ( | Node * | node, |
| Node * | newParent, | ||
| int32_t | childIndex, | ||
| int32_t | boneIndex | ||
| ) |
| void ActionManager::EXE_DeleteNode | ( | Node * | node | ) |
| void ActionManager::EXE_DeleteNodes | ( | const std::vector< Node * > & | nodes | ) |
| void ActionManager::EXE_EditProperty | ( | void * | owner, |
| PropertyOwnerType | ownerType, | ||
| const std::string & | name, | ||
| uint32_t | index, | ||
| Datum | newValue | ||
| ) |
| void ActionManager::EXE_EditTransform | ( | Node3D * | node, |
| const glm::mat4 & | transform | ||
| ) |
| void ActionManager::EXE_EditTransforms | ( | const std::vector< Node3D * > & | nodes, |
| const std::vector< glm::mat4 > & | newTransforms | ||
| ) |
| void ActionManager::EXE_EditWidgetTransforms | ( | const std::vector< Widget * > & | widgets, |
| const std::vector< WidgetTransformData > & | newTransforms | ||
| ) |
| void ActionManager::EXE_PaintTiles | ( | class TileMap2D * | tileMapNode, |
| const std::vector< struct TilePaintChange > & | changes | ||
| ) |
| void ActionManager::EXE_ParentSelectedWith | ( | const std::vector< Node * > & | nodes, |
| TypeId | parentType, | ||
| ArrayOrientation | arrayOrientation = ArrayOrientation::Vertical |
||
| ) |
Create a new parent node of the specified type and reparent all selected nodes under it.
| nodes | The selected nodes to reparent. |
| parentType | The type of parent node to create. |
| arrayOrientation | For ArrayWidget parents, the orientation (Horizontal/Vertical). |
| void ActionManager::EXE_ReplaceSelectedWithAsset | ( | Asset * | asset, |
| const std::vector< Node * > & | nodes | ||
| ) |
Replace selected nodes' mesh/material with an asset, or replace with scene instances.
| asset | The asset to apply (StaticMesh, Material, or Scene). |
| nodes | The nodes to operate on. |
| void ActionManager::EXE_ReplaceWithInstancedMesh | ( | const std::vector< Node * > & | nodes, |
| bool | merge | ||
| ) |
Replace selected StaticMesh3D nodes with InstancedMesh3D nodes.
| nodes | The selected nodes to convert. |
| merge | If true, group by mesh into one InstancedMesh3D each. If false, convert each node 1:1. |
| void ActionManager::EXE_ReplaceWithStaticMesh | ( | const std::vector< Node * > & | nodes | ) |
Split selected InstancedMesh3D nodes into individual StaticMesh3D nodes.
| nodes | The selected nodes to split. |
| void ActionManager::EXE_ResetScene | ( | Node * | node | ) |
| void ActionManager::EXE_SetInstanceColors | ( | const std::vector< ActionSetInstanceColorsData > & | data | ) |
| void ActionManager::EXE_SetInstanceData | ( | InstancedMesh3D * | instMesh, |
| int32_t | startIndex, | ||
| const std::vector< MeshInstanceData > & | data | ||
| ) |
| void ActionManager::EXE_SetRootNode | ( | Node * | newRoot | ) |
| void ActionManager::EXE_SetTerrainHeights | ( | class Terrain3D * | terrain, |
| const std::vector< struct TerrainHeightChange > & | changes | ||
| ) |
| void ActionManager::EXE_SetVoxels | ( | class Voxel3D * | voxel, |
| const std::vector< struct VoxelChange > & | changes | ||
| ) |
| void ActionManager::EXE_SetWorldPosition | ( | Node3D * | node, |
| glm::vec3 | pos | ||
| ) |
| void ActionManager::EXE_SetWorldRotation | ( | Node3D * | node, |
| glm::quat | rot | ||
| ) |
| void ActionManager::EXE_SetWorldScale | ( | Node3D * | node, |
| glm::vec3 | scale | ||
| ) |
| Node * ActionManager::EXE_SpawnNode | ( | const char * | srcTypeName | ) |
| void ActionManager::EXE_TimelineAddClip | ( | Timeline * | timeline, |
| int32_t | trackIndex, | ||
| TypeId | clipType, | ||
| float | startTime, | ||
| float | duration | ||
| ) |
| void ActionManager::EXE_TimelineBindTrack | ( | Timeline * | timeline, |
| int32_t | trackIndex, | ||
| uint64_t | oldUuid, | ||
| uint64_t | newUuid, | ||
| const std::string & | oldName, | ||
| const std::string & | newName | ||
| ) |
| void ActionManager::EXE_TimelineMoveClip | ( | Timeline * | timeline, |
| int32_t | trackIndex, | ||
| int32_t | clipIndex, | ||
| float | oldStartTime, | ||
| float | newStartTime | ||
| ) |
| void ActionManager::EXE_TimelineRemoveClip | ( | Timeline * | timeline, |
| int32_t | trackIndex, | ||
| int32_t | clipIndex | ||
| ) |
| void ActionManager::EXE_TimelineRemoveTrack | ( | Timeline * | timeline, |
| int32_t | trackIndex | ||
| ) |
| void ActionManager::EXE_UnlinkScene | ( | Node * | node | ) |
| void ActionManager::ExecuteAction | ( | Action * | action | ) |
| void ActionManager::ExileNode | ( | NodePtr | node | ) |
|
protected |
| void ActionManager::GatherScriptFiles | ( | const std::string & | dir, |
| std::vector< std::string > & | outFiles | ||
| ) |
|
protected |
|
protected |
|
static |
|
inline |
| void ActionManager::ImportAsset | ( | ) |
| Asset * ActionManager::ImportAsset | ( | const std::string & | path | ) |
| void ActionManager::ImportCamera | ( | const CameraImportOptions & | options | ) |
| void ActionManager::ImportScene | ( | const SceneImportOptions & | options | ) |
| void ActionManager::ImportTinyLLMModel | ( | ) |
| void ActionManager::ImportTinyLLMTokenizer | ( | ) |
| bool ActionManager::IsBuildRunning | ( | ) | const |
| void ActionManager::OnSelectedNodeChanged | ( | ) |
| void ActionManager::OpenProject | ( | const char * | path = nullptr | ) |
| void ActionManager::OpenScene | ( | ) |
| void ActionManager::OpenScene | ( | Scene * | scene | ) |
| void ActionManager::PrepareRelease | ( | ) |
| void ActionManager::RecaptureAndSaveAllScenes | ( | ) |
| void ActionManager::Redo | ( | ) |
| void ActionManager::RequestOpenProject | ( | const char * | path | ) |
| void ActionManager::RequestOpenScene | ( | AssetStub * | stub | ) |
| void ActionManager::RequestOpenSceneFromDialog | ( | ) |
| void ActionManager::RequestResaveAllAssets | ( | ) |
| void ActionManager::RequestSaveScene | ( | bool | saveAs | ) |
| void ActionManager::RequestSaveSelectedAsset | ( | ) |
| void ActionManager::ResaveAllAssets | ( | ) |
| void ActionManager::ResetUndoRedo | ( | ) |
| void ActionManager::RestoreExiledNode | ( | NodePtr | node | ) |
| void ActionManager::RunScript | ( | ) |
| void ActionManager::SaveScene | ( | bool | saveAs | ) |
| void ActionManager::SaveSelectedAsset | ( | ) |
| Node * ActionManager::SpawnBasicNode | ( | const std::string & | name, |
| Node * | parent, | ||
| Asset * | srcAsset = nullptr, |
||
| bool | setWorldPos = false, |
||
| glm::vec3 | worldPos = { 0.0f, 0.0f, 0.0f } |
||
| ) |
| void ActionManager::Undo | ( | ) |
| void ActionManager::Update | ( | ) |
| void ActionManager::UpgradeProject | ( | ) |
| void ActionManager::WriteProjectLocalPolyphaseConfig | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |