|
Polyphase Game Engine
|
#include <ActionManager.h>
Classes | |
| struct | EmbeddedRawAssetEntry |
| struct | ExtractSkeletalAnimationsOptions |
| struct | ImportAnimationsOptions |
| struct | RetargetAnimationOptions |
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 | BeginActionGroup (const char *name) |
| void | EndActionGroup () |
| void | PurgePluginActions (const std::string &pluginTag) |
| void | EXE_EditProperty (void *owner, PropertyOwnerType ownerType, const std::string &name, uint32_t index, Datum newValue) |
| void | EXE_EditPropertyOnSelection (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_ReplaceNodeType (Node *oldNode, TypeId newType) |
| Replace a node with a new node of a different type, preserving position in parent, transferring all shared properties (by name+type), and moving all children onto the new node. | |
| 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 | ObfuscatePackagedContent (const std::string &packagedDir) |
| Static Build: obfuscate shipped content under the staging dir. | |
| bool | PackPackagedContent (const std::string &packagedDir, const std::string &projectName, bool contentIsEmbedded) |
| Content Pak: fold shipped content into a single Content.pak. | |
| void | AppendBuildOutput (const std::string &text) |
| 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 () |
| POLYPHASE_API void | SaveScene (bool saveAs) |
| void | RequestSaveScene (bool saveAs) |
| void | RequestSaveSelectedAsset () |
| void | RequestResaveAllAssets () |
| void | RequestOpenProject (const char *path) |
| void | RequestCloseProject () |
| void | RequestAddonRecovery (const char *reason) |
| void | RequestEditorRestartForAddonRecovery (const char *reason) |
| void | CloseProject () |
| void | RecoverFromStuckAddons (const char *reason) |
| void | RestartEditorForAddonRecovery (const char *reason) |
| POLYPHASE_API Scene * | CreateNewScene (const char *sceneName, int sceneType, bool createCamera, bool createSkybox=false, bool createDirectionalLight=false, bool createUICanvas=false, AssetDir *targetDir=nullptr) |
| void | SaveSelectedAsset () |
| void | DeleteSelectedNodes () |
| void | DeleteNode (Node *node) |
| void | RunScript () |
| void | ImportAsset () |
| Asset * | ImportAsset (const std::string &path, const std::string &overrideBaseName="", const MeshImportOptions *meshOpts=nullptr) |
| Asset * | ImportAssetCombined (const std::string &path, const std::string &overrideBaseName="", const MeshImportOptions *meshOpts=nullptr) |
| void | ImportLooseFile () |
| void | ImportLooseFile (const std::string &sourcePath, AssetDir *targetDir) |
| void | ImportTinyLLMModel () |
| void | ImportTinyLLMTokenizer () |
| void | ImportCamera (const CameraImportOptions &options) |
| POLYPHASE_API Asset * | ImportScene (const SceneImportOptions &options) |
| void | BeginImportScene () |
| void | BeginReimportScene (AssetStub *sceneStub) |
| void | BeginReimportAssetWithNewFile (AssetStub *stub) |
| void | BeginExtractSkeletalAnimations (AssetStub *skeletalMeshStub) |
| bool | ExtractSkeletalAnimations (const ExtractSkeletalAnimationsOptions &options) |
| void | DrawExtractSkeletalAnimationsModal () |
| void | BeginImportAnimations (AssetDir *targetDir=nullptr) |
| bool | ImportAnimations (const ImportAnimationsOptions &options) |
| void | DrawImportAnimationsModal () |
| void | BeginRetargetAnimation (AssetStub *sourceClipStub) |
| bool | RetargetAnimation (const RetargetAnimationOptions &options) |
| void | DrawRetargetAnimationModal () |
| void | BeginImportCamera () |
| void | BuildData (Platform platform, bool embedded) |
| void | BuildData (const std::string &targetId, bool embedded) |
| Run a build against a registered build target by id. | |
| 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 POLYPHASE_API 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 | CancelBuild () |
Static Protected Attributes | |
| static ActionManager * | sInstance |
| ActionManager::~ActionManager | ( | ) |
|
protected |
| void ActionManager::AppendBuildOutput | ( | const std::string & | text | ) |
| void ActionManager::AttachSelectedNodes | ( | Node * | newParent, |
| int32_t | boneIdx | ||
| ) |
| void ActionManager::BeginActionGroup | ( | const char * | name | ) |
| void ActionManager::BeginExtractSkeletalAnimations | ( | AssetStub * | skeletalMeshStub | ) |
| void ActionManager::BeginImportAnimations | ( | AssetDir * | targetDir = nullptr | ) |
| void ActionManager::BeginImportCamera | ( | ) |
| void ActionManager::BeginImportScene | ( | ) |
| void ActionManager::BeginReimportAssetWithNewFile | ( | AssetStub * | stub | ) |
| void ActionManager::BeginReimportScene | ( | AssetStub * | sceneStub | ) |
| void ActionManager::BeginRetargetAnimation | ( | AssetStub * | sourceClipStub | ) |
|
protected |
| void ActionManager::BuildData | ( | const std::string & | targetId, |
| bool | embedded | ||
| ) |
Run a build against a registered build target by id.
Resolves the id against BuildTargetRegistry. For built-in targets, delegates to the legacy BuildData(Platform, bool) using the target's basePlatform. For addon-provided targets, runs a descriptor-callback- driven pipeline (PreCook → cook with optional CookAsset override → GetCompileCommand → GetCompiledBinaryPath → PostPackage).
| void ActionManager::BuildData | ( | Platform | platform, |
| bool | embedded | ||
| ) |
|
protected |
|
protected |
| bool ActionManager::CheckProjectNeedsUpgrade | ( | ) |
| void ActionManager::ClearActionFuture | ( | ) |
| void ActionManager::ClearActionHistory | ( | ) |
| void ActionManager::ClearWorld | ( | ) |
| void ActionManager::CloseProject | ( | ) |
|
static |
| void ActionManager::CreateNewProject | ( | const char * | folderPath = nullptr, |
| bool | cpp = false, |
||
| const char * | defaultSceneName = "SC_Default" |
||
| ) |
| POLYPHASE_API Scene * ActionManager::CreateNewScene | ( | const char * | sceneName, |
| int | sceneType, | ||
| bool | createCamera, | ||
| bool | createSkybox = false, |
||
| bool | createDirectionalLight = false, |
||
| bool | createUICanvas = 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 | ( | ) |
| void ActionManager::DrawExtractSkeletalAnimationsModal | ( | ) |
| void ActionManager::DrawImportAnimationsModal | ( | ) |
| void ActionManager::DrawRetargetAnimationModal | ( | ) |
| bool ActionManager::DuplicateNodes | ( | std::vector< Node * > | nodes | ) |
| void ActionManager::EndActionGroup | ( | ) |
| 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_EditPropertyOnSelection | ( | 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). |
Replace a node with a new node of a different type, preserving position in parent, transferring all shared properties (by name+type), and moving all children onto the new node.
| oldNode | The node to replace. |
| newType | The type of node to create as replacement. |
| 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 | ) |
| bool ActionManager::ExtractSkeletalAnimations | ( | const ExtractSkeletalAnimationsOptions & | options | ) |
|
protected |
| void ActionManager::GatherScriptFiles | ( | const std::string & | dir, |
| std::vector< std::string > & | outFiles | ||
| ) |
|
protected |
|
protected |
|
static |
|
inline |
| bool ActionManager::ImportAnimations | ( | const ImportAnimationsOptions & | options | ) |
| void ActionManager::ImportAsset | ( | ) |
| Asset * ActionManager::ImportAsset | ( | const std::string & | path, |
| const std::string & | overrideBaseName = "", |
||
| const MeshImportOptions * | meshOpts = nullptr |
||
| ) |
| Asset * ActionManager::ImportAssetCombined | ( | const std::string & | path, |
| const std::string & | overrideBaseName = "", |
||
| const MeshImportOptions * | meshOpts = nullptr |
||
| ) |
| void ActionManager::ImportCamera | ( | const CameraImportOptions & | options | ) |
| void ActionManager::ImportLooseFile | ( | ) |
| void ActionManager::ImportLooseFile | ( | const std::string & | sourcePath, |
| AssetDir * | targetDir | ||
| ) |
| POLYPHASE_API Asset * ActionManager::ImportScene | ( | const SceneImportOptions & | options | ) |
| void ActionManager::ImportTinyLLMModel | ( | ) |
| void ActionManager::ImportTinyLLMTokenizer | ( | ) |
| bool ActionManager::IsBuildRunning | ( | ) | const |
| void ActionManager::ObfuscatePackagedContent | ( | const std::string & | packagedDir | ) |
Static Build: obfuscate shipped content under the staging dir.
Rewrites every .oct, every .lua and AssetRegistry.txt in place. Idempotent – already-wrapped files are skipped, so a re-run is safe. Everything else (the executable, Config.ini, the .octp, shaders, icons, raw assets) is left readable on purpose.
| void ActionManager::OnSelectedNodeChanged | ( | ) |
| void ActionManager::OpenProject | ( | const char * | path = nullptr | ) |
| void ActionManager::OpenScene | ( | ) |
| void ActionManager::OpenScene | ( | Scene * | scene | ) |
| bool ActionManager::PackPackagedContent | ( | const std::string & | packagedDir, |
| const std::string & | projectName, | ||
| bool | contentIsEmbedded | ||
| ) |
Content Pak: fold shipped content into a single Content.pak.
Packs every .oct, .lua and AssetRegistry.txt under the staging dir, then deletes the loose originals so the shipped tree carries neither the files nor their names. Raw assets, Config.ini, the .octp and shaders stay loose. On any failure nothing is pruned and the build falls back to loose content.
| void ActionManager::PrepareRelease | ( | ) |
| void ActionManager::PurgePluginActions | ( | const std::string & | pluginTag | ) |
| void ActionManager::RecaptureAndSaveAllScenes | ( | ) |
| void ActionManager::RecoverFromStuckAddons | ( | const char * | reason | ) |
| void ActionManager::Redo | ( | ) |
| void ActionManager::RequestAddonRecovery | ( | const char * | reason | ) |
| void ActionManager::RequestCloseProject | ( | ) |
| void ActionManager::RequestEditorRestartForAddonRecovery | ( | const char * | reason | ) |
| 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::RestartEditorForAddonRecovery | ( | const char * | reason | ) |
| void ActionManager::RestoreExiledNode | ( | NodePtr | node | ) |
| bool ActionManager::RetargetAnimation | ( | const RetargetAnimationOptions & | options | ) |
| void ActionManager::RunScript | ( | ) |
| POLYPHASE_API 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 |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |