The editor's state as seen by EditorWindow and CustomEditor code, like Unity's static editor access: auto& app = EditorApplication::Get(); const char* projectPath = app.GetProjectPath(); Deki::Object* selected = app.GetActiveObject();.
More...
#include <C:/Users/kirby/Documents/Github/deki/deki-editor/deki-editor/include/deki-editor/EditorApplication.h>
|
| const std::string & | GetProjectPath () const |
| | The project root, or "" when no project is open.
|
| const std::string & | GetAssetsPath () const |
| | The assets folder, or "" when no project is open.
|
| const std::string & | GetCachePath () const |
| | The cache folder, or "" when no project is open.
|
| bool | HasProject () const |
| float | GetDeltaTime () const |
| | Time since the last frame.
|
| Deki::Object * | GetActiveObject () const |
| | The selected object, or nullptr.
|
| Deki::Scene * | GetActiveScene () const |
| | The active scene, or nullptr.
|
| void | SetProjectPaths (const std::string &projectPath, const std::string &assetsPath, const std::string &cachePath) |
| | Called when a project opens.
|
| void | ClearProjectPaths () |
| | Called when a project closes.
|
| void | SetActiveObject (Deki::Object *obj) |
| | Called when the selection changes.
|
| void | SetActiveScene (Deki::Scene *scene) |
| | Called when the scene changes.
|
| void | SetDeltaTime (float dt) |
| | Called each frame.
|
| void | RequestAssetRefresh () |
| bool | PopAssetRefreshRequest () |
| void | RequestAssetInvalidation () |
| bool | PopAssetInvalidationRequest () |
| void | RequestOpenTool (const std::string &filePath, const std::string &cachePath, const std::string &toolTitle={}) |
| bool | PopOpenToolRequest (std::string &outFilePath, std::string &outCachePath, std::string *outToolTitle=nullptr) |
| void | RequestSceneTool (SceneEditTool tool) |
| bool | PopSceneToolRequest (SceneEditTool &outTool) |
| const std::string & | GetSelectedAssetPath () const |
| void | SetSelectedAssetPath (const std::string &path) |
|
| static EditorApplication & | Get () |
The editor's state as seen by EditorWindow and CustomEditor code, like Unity's static editor access: auto& app = EditorApplication::Get(); const char* projectPath = app.GetProjectPath(); Deki::Object* selected = app.GetActiveObject();.
The main editor (EditorApp) fills it through SetProjectPaths() and SetActiveObject(); other editors only read it.
◆ Get()
| EditorApplication & DekiEditor::EditorApplication::Get |
( |
| ) |
|
|
static |
◆ GetProjectPath()
| const std::string & DekiEditor::EditorApplication::GetProjectPath |
( |
| ) |
const |
|
inline |
The project root, or "" when no project is open.
◆ GetAssetsPath()
| const std::string & DekiEditor::EditorApplication::GetAssetsPath |
( |
| ) |
const |
|
inline |
The assets folder, or "" when no project is open.
◆ GetCachePath()
| const std::string & DekiEditor::EditorApplication::GetCachePath |
( |
| ) |
const |
|
inline |
The cache folder, or "" when no project is open.
◆ HasProject()
| bool DekiEditor::EditorApplication::HasProject |
( |
| ) |
const |
|
inline |
◆ GetDeltaTime()
| float DekiEditor::EditorApplication::GetDeltaTime |
( |
| ) |
const |
|
inline |
Time since the last frame.
◆ GetActiveObject()
| Deki::Object * DekiEditor::EditorApplication::GetActiveObject |
( |
| ) |
const |
|
inline |
The selected object, or nullptr.
◆ GetActiveScene()
| Deki::Scene * DekiEditor::EditorApplication::GetActiveScene |
( |
| ) |
const |
|
inline |
The active scene, or nullptr.
◆ SetProjectPaths()
| void DekiEditor::EditorApplication::SetProjectPaths |
( |
const std::string & | projectPath, |
|
|
const std::string & | assetsPath, |
|
|
const std::string & | cachePath ) |
Called when a project opens.
◆ ClearProjectPaths()
| void DekiEditor::EditorApplication::ClearProjectPaths |
( |
| ) |
|
Called when a project closes.
◆ SetActiveObject()
| void DekiEditor::EditorApplication::SetActiveObject |
( |
Deki::Object * | obj | ) |
|
|
inline |
Called when the selection changes.
◆ SetActiveScene()
| void DekiEditor::EditorApplication::SetActiveScene |
( |
Deki::Scene * | scene | ) |
|
|
inline |
Called when the scene changes.
◆ SetDeltaTime()
| void DekiEditor::EditorApplication::SetDeltaTime |
( |
float | dt | ) |
|
|
inline |
◆ RequestAssetRefresh()
| void DekiEditor::EditorApplication::RequestAssetRefresh |
( |
| ) |
|
|
inline |
◆ PopAssetRefreshRequest()
| bool DekiEditor::EditorApplication::PopAssetRefreshRequest |
( |
| ) |
|
|
inline |
◆ RequestAssetInvalidation()
| void DekiEditor::EditorApplication::RequestAssetInvalidation |
( |
| ) |
|
|
inline |
◆ PopAssetInvalidationRequest()
| bool DekiEditor::EditorApplication::PopAssetInvalidationRequest |
( |
| ) |
|
|
inline |
◆ RequestOpenTool()
| void DekiEditor::EditorApplication::RequestOpenTool |
( |
const std::string & | filePath, |
|
|
const std::string & | cachePath, |
|
|
const std::string & | toolTitle = {} ) |
|
inline |
◆ PopOpenToolRequest()
| bool DekiEditor::EditorApplication::PopOpenToolRequest |
( |
std::string & | outFilePath, |
|
|
std::string & | outCachePath, |
|
|
std::string * | outToolTitle = nullptr ) |
|
inline |
◆ RequestSceneTool()
| void DekiEditor::EditorApplication::RequestSceneTool |
( |
SceneEditTool | tool | ) |
|
|
inline |
◆ PopSceneToolRequest()
| bool DekiEditor::EditorApplication::PopSceneToolRequest |
( |
SceneEditTool & | outTool | ) |
|
|
inline |
◆ GetSelectedAssetPath()
| const std::string & DekiEditor::EditorApplication::GetSelectedAssetPath |
( |
| ) |
const |
|
inline |
◆ SetSelectedAssetPath()
| void DekiEditor::EditorApplication::SetSelectedAssetPath |
( |
const std::string & | path | ) |
|
|
inline |
The documentation for this class was generated from the following file: