Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
Olympe::BlueprintEditor Class Reference

BlueprintEditor Singleton Backend Manages all business logic, state, and data for the Blueprint Editor Completely separated from UI rendering (handled by BlueprintEditorGUI) More...

#include <blueprinteditor.h>

+ Collaboration diagram for Olympe::BlueprintEditor:

Public Member Functions

void Initialize ()
 
void Shutdown ()
 
void Update (float deltaTime)
 
void InitializeRuntimeEditor ()
 
void InitializeStandaloneEditor ()
 
bool IsActive () const
 
void ToggleActive ()
 
void SetActive (bool active)
 
void NewBlueprint (const std::string &name, const std::string &description="")
 
bool LoadBlueprint (const std::string &filepath)
 
bool SaveBlueprint ()
 
bool SaveBlueprintAs (const std::string &filepath)
 
const Blueprint::EntityBlueprintGetCurrentBlueprint () const
 
Blueprint::EntityBlueprintGetCurrentBlueprintMutable ()
 
bool HasBlueprint () const
 
bool HasUnsavedChanges () const
 
const std::string & GetCurrentFilepath () const
 
void MarkAsModified ()
 
void ClearModified ()
 
std::string GetAssetRootPath () const
 
void SetAssetRootPath (const std::string &path)
 
void RefreshAssets ()
 
std::shared_ptr< AssetNodeGetAssetTree () const
 
void PreloadATSGraphs ()
 
std::vector< AssetMetadataGetAllAssets () const
 
std::vector< AssetMetadataGetAssetsByType (const std::string &type) const
 
std::vector< AssetMetadataSearchAssets (const std::string &query) const
 
AssetMetadata GetAssetMetadata (const std::string &filepath)
 
bool IsAssetValid (const std::string &filepath) const
 
void InvalidateAssetMetadataCache ()
 
std::string DetectAssetType (const std::string &filepath)
 
std::string GetLastError () const
 
bool HasError () const
 
void ClearError ()
 
void NotifyEntityCreated (uint64_t entityId)
 
void NotifyEntityDestroyed (uint64_t entityId)
 
const std::vector< uint64_t > & GetRuntimeEntities () const
 
size_t GetRuntimeEntityCount () const
 
void SetSelectedEntity (uint64_t entityId)
 
uint64_t GetSelectedEntity () const
 
bool HasSelectedEntity () const
 
void SelectAsset (const std::string &assetPath)
 
std::string GetSelectedAssetPath () const
 
bool HasSelectedAsset () const
 
void OpenGraphInEditor (const std::string &assetPath)
 
bool SaveCurrentAsTemplate (const std::string &name, const std::string &description, const std::string &category)
 
bool ApplyTemplate (const std::string &templateId)
 
bool DeleteTemplate (const std::string &templateId)
 
void ReloadTemplates ()
 
void Undo ()
 
void Redo ()
 
bool CanUndo () const
 
bool CanRedo () const
 
std::string GetLastCommandDescription () const
 
std::string GetNextRedoDescription () const
 
Blueprint::CommandStackGetCommandStack ()
 
void InitializePlugins ()
 
void RegisterPlugin (std::unique_ptr< class BlueprintEditorPlugin > plugin)
 
class BlueprintEditorPluginGetPlugin (const std::string &type)
 
class BlueprintEditorPluginDetectPlugin (const json &blueprint)
 
void MigrateAllBlueprints ()
 
std::vector< std::string > ScanBlueprintFiles (const std::string &directory)
 
bool ShowMigrationDialog () const
 
void SetShowMigrationDialog (bool show)
 
bool LoadConfig (const std::string &configPath="blueprint_editor_config.json")
 
bool SaveConfig (const std::string &configPath="blueprint_editor_config.json")
 
const jsonGetConfig () const
 
jsonGetConfigMutable ()
 

Static Public Member Functions

static BlueprintEditorInstance ()
 
static BlueprintEditorGet ()
 

Private Member Functions

 BlueprintEditor ()
 
 ~BlueprintEditor ()
 
 BlueprintEditor (const BlueprintEditor &)=delete
 
BlueprintEditoroperator= (const BlueprintEditor &)=delete
 
std::shared_ptr< AssetNodeScanDirectory (const std::string &path)
 
void ParseAssetMetadata (const std::string &filepath, AssetMetadata &metadata)
 
void ParseEntityBlueprint (const json &j, AssetMetadata &metadata)
 
void ParseBehaviorTree (const json &j, AssetMetadata &metadata)
 
void ParseHFSM (const json &j, AssetMetadata &metadata)
 
void CollectAllAssets (const std::shared_ptr< AssetNode > &node, std::vector< AssetMetadata > &assets) const
 

Private Attributes

bool m_IsActive
 
bool m_HasUnsavedChanges
 
Blueprint::EntityBlueprint m_CurrentBlueprint
 
std::string m_CurrentFilepath
 
std::string m_AssetRootPath
 
std::string m_GamedataRootPath
 
std::shared_ptr< AssetNodem_AssetTreeRoot
 
std::string m_LastError
 
std::vector< uint64_tm_RuntimeEntities
 
uint64_t m_SelectedEntity
 
std::string m_SelectedAssetPath
 
std::map< std::string, AssetMetadatam_AssetMetadataCache
 
std::string m_LastCachedAssetPath
 
Blueprint::CommandStackm_CommandStack
 
std::map< std::string, std::unique_ptr< class BlueprintEditorPlugin > > m_Plugins
 
bool m_ShowMigrationDialog
 
std::vector< std::string > m_BlueprintsToMigrate
 
json m_Config
 

Detailed Description

BlueprintEditor Singleton Backend Manages all business logic, state, and data for the Blueprint Editor Completely separated from UI rendering (handled by BlueprintEditorGUI)

Definition at line 173 of file blueprinteditor.h.

Constructor & Destructor Documentation

◆ BlueprintEditor() [1/2]

Olympe::BlueprintEditor::BlueprintEditor ( )
private

Definition at line 52 of file blueprinteditor.cpp.

◆ ~BlueprintEditor()

Olympe::BlueprintEditor::~BlueprintEditor ( )
private

Definition at line 63 of file blueprinteditor.cpp.

References m_CommandStack.

◆ BlueprintEditor() [2/2]

Olympe::BlueprintEditor::BlueprintEditor ( const BlueprintEditor )
privatedelete

Member Function Documentation

◆ ApplyTemplate()

bool Olympe::BlueprintEditor::ApplyTemplate ( const std::string &  templateId)

◆ CanRedo()

bool Olympe::BlueprintEditor::CanRedo ( ) const

Definition at line 1184 of file blueprinteditor.cpp.

References Olympe::Blueprint::CommandStack::CanRedo(), and m_CommandStack.

+ Here is the call graph for this function:

◆ CanUndo()

bool Olympe::BlueprintEditor::CanUndo ( ) const

Definition at line 1179 of file blueprinteditor.cpp.

References Olympe::Blueprint::CommandStack::CanUndo(), and m_CommandStack.

+ Here is the call graph for this function:

◆ ClearError()

void Olympe::BlueprintEditor::ClearError ( )
inline

Definition at line 243 of file blueprinteditor.h.

References m_LastError.

◆ ClearModified()

void Olympe::BlueprintEditor::ClearModified ( )
inline

Definition at line 211 of file blueprinteditor.h.

References m_HasUnsavedChanges.

◆ CollectAllAssets()

void Olympe::BlueprintEditor::CollectAllAssets ( const std::shared_ptr< AssetNode > &  node,
std::vector< AssetMetadata > &  assets 
) const
private

Definition at line 575 of file blueprinteditor.cpp.

References CollectAllAssets(), Olympe::AssetMetadata::filepath, GetComponentTypeID_Static(), Olympe::AssetMetadata::isDirectory, Olympe::AssetMetadata::name, ParseAssetMetadata(), and Olympe::AssetMetadata::type.

Referenced by CollectAllAssets(), and GetAllAssets().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeleteTemplate()

bool Olympe::BlueprintEditor::DeleteTemplate ( const std::string &  templateId)

Definition at line 1139 of file blueprinteditor.cpp.

References DeleteTemplate(), Olympe::TemplateManager::Get(), GetComponentTypeID_Static(), Olympe::TemplateManager::GetLastError(), and m_LastError.

Referenced by DeleteTemplate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DetectAssetType()

std::string Olympe::BlueprintEditor::DetectAssetType ( const std::string &  filepath)

Definition at line 377 of file blueprinteditor.cpp.

References GetComponentTypeID_Static(), and JsonHelper::LoadJsonFromFile().

Referenced by GetAssetMetadata(), OpenGraphInEditor(), and ScanDirectory().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DetectPlugin()

BlueprintEditorPlugin * Olympe::BlueprintEditor::DetectPlugin ( const json blueprint)

Definition at line 1249 of file blueprinteditor.cpp.

References GetComponentTypeID_Static(), GetPlugin(), and m_Plugins.

+ Here is the call graph for this function:

◆ Get()

static BlueprintEditor & Olympe::BlueprintEditor::Get ( )
inlinestatic

Definition at line 178 of file blueprinteditor.h.

References Instance().

Referenced by Olympe::BlueprintEditorGUI::AddComponent(), Olympe::NodeGraphPanel::CreateNewNode(), Olympe::InspectorPanel::DetermineContext(), Olympe::BlueprintEditorGUI::HandleKeyboardShortcuts(), Olympe::NodeGraphPanel::HandleKeyboardShortcuts(), Olympe::NodeGraphPanel::HandleNodeInteractions(), Olympe::BlueprintEditorGUI::Initialize(), Olympe::AssetBrowser::Initialize(), Olympe::AssetInfoPanel::LoadAsset(), Olympe::BlueprintEditorGUI::LoadBlueprint(), Olympe::BlueprintEditorGUI::NewBlueprint(), NotifyEditorEntityCreated(), NotifyEditorEntityDestroyed(), Olympe::AssetBrowser::Refresh(), Olympe::BlueprintEditorGUI::RemoveComponent(), Olympe::BlueprintEditorGUI::Render(), Olympe::HistoryPanel::Render(), Olympe::InspectorPanel::RenderAssetFileInspector(), Olympe::AssetBrowser::RenderContent(), Olympe::NodeGraphPanel::RenderContent(), Olympe::InspectorPanel::RenderEntityInspector(), Olympe::EntitiesPanel::RenderEntityItem(), Olympe::BlueprintEditorGUI::RenderEntityPanel(), Olympe::NodeGraphPanel::RenderGraph(), Olympe::BlueprintEditorGUI::RenderMigrationDialog(), Olympe::BlueprintEditorGUI::RenderNodeEditor(), Olympe::BlueprintEditorGUI::RenderPropertyPanel(), GameMenu::RenderRuntimeBlueprintPanel(), Olympe::TemplateBrowserPanel::RenderSaveAsTemplateModal(), Olympe::BlueprintEditorGUI::RenderStatusBar(), Olympe::TemplateBrowserPanel::RenderTemplateBrowser(), Olympe::AssetBrowser::RenderTreeNode(), Olympe::BlueprintEditorGUI::SaveBlueprint(), Olympe::BlueprintEditorGUI::SaveBlueprintAs(), SDL_AppEvent(), SDL_AppInit(), SDL_AppIterate(), SDL_AppQuit(), and Olympe::BlueprintEditorGUI::Shutdown().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetAllAssets()

std::vector< AssetMetadata > Olympe::BlueprintEditor::GetAllAssets ( ) const

Definition at line 565 of file blueprinteditor.cpp.

References CollectAllAssets(), GetComponentTypeID_Static(), and m_AssetTreeRoot.

Referenced by GetAssetsByType(), and SearchAssets().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetAssetMetadata()

AssetMetadata Olympe::BlueprintEditor::GetAssetMetadata ( const std::string &  filepath)

◆ GetAssetRootPath()

std::string Olympe::BlueprintEditor::GetAssetRootPath ( ) const
inline

Definition at line 214 of file blueprinteditor.h.

References m_AssetRootPath.

◆ GetAssetsByType()

std::vector< AssetMetadata > Olympe::BlueprintEditor::GetAssetsByType ( const std::string &  type) const

Definition at line 602 of file blueprinteditor.cpp.

References GetAllAssets(), and GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ GetAssetTree()

std::shared_ptr< AssetNode > Olympe::BlueprintEditor::GetAssetTree ( ) const
inline

Definition at line 219 of file blueprinteditor.h.

References m_AssetTreeRoot.

Referenced by Olympe::AssetBrowser::RenderContent().

+ Here is the caller graph for this function:

◆ GetCommandStack()

CommandStack * Olympe::BlueprintEditor::GetCommandStack ( )

◆ GetConfig()

const json & Olympe::BlueprintEditor::GetConfig ( ) const
inline

Definition at line 307 of file blueprinteditor.h.

References m_Config.

◆ GetConfigMutable()

json & Olympe::BlueprintEditor::GetConfigMutable ( )
inline

Definition at line 308 of file blueprinteditor.h.

References m_Config.

◆ GetCurrentBlueprint()

const Blueprint::EntityBlueprint & Olympe::BlueprintEditor::GetCurrentBlueprint ( ) const
inline

Definition at line 201 of file blueprinteditor.h.

References m_CurrentBlueprint.

◆ GetCurrentBlueprintMutable()

Blueprint::EntityBlueprint & Olympe::BlueprintEditor::GetCurrentBlueprintMutable ( )
inline

Definition at line 202 of file blueprinteditor.h.

References m_CurrentBlueprint.

Referenced by Olympe::BlueprintEditorGUI::AddComponent(), and Olympe::BlueprintEditorGUI::RemoveComponent().

+ Here is the caller graph for this function:

◆ GetCurrentFilepath()

const std::string & Olympe::BlueprintEditor::GetCurrentFilepath ( ) const
inline

Definition at line 207 of file blueprinteditor.h.

References m_CurrentFilepath.

◆ GetLastCommandDescription()

std::string Olympe::BlueprintEditor::GetLastCommandDescription ( ) const

Definition at line 1189 of file blueprinteditor.cpp.

References Olympe::Blueprint::CommandStack::GetLastCommandDescription(), and m_CommandStack.

+ Here is the call graph for this function:

◆ GetLastError()

std::string Olympe::BlueprintEditor::GetLastError ( ) const
inline

Definition at line 241 of file blueprinteditor.h.

References m_LastError.

Referenced by Olympe::TemplateBrowserPanel::RenderSaveAsTemplateModal().

+ Here is the caller graph for this function:

◆ GetNextRedoDescription()

std::string Olympe::BlueprintEditor::GetNextRedoDescription ( ) const

Definition at line 1198 of file blueprinteditor.cpp.

References Olympe::Blueprint::CommandStack::GetNextRedoDescription(), and m_CommandStack.

+ Here is the call graph for this function:

◆ GetPlugin()

BlueprintEditorPlugin * Olympe::BlueprintEditor::GetPlugin ( const std::string &  type)

Definition at line 1239 of file blueprinteditor.cpp.

References GetComponentTypeID_Static(), and m_Plugins.

Referenced by DetectPlugin().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRuntimeEntities()

const std::vector< uint64_t > & Olympe::BlueprintEditor::GetRuntimeEntities ( ) const
inline

Definition at line 251 of file blueprinteditor.h.

References m_RuntimeEntities.

◆ GetRuntimeEntityCount()

size_t Olympe::BlueprintEditor::GetRuntimeEntityCount ( ) const
inline

Definition at line 252 of file blueprinteditor.h.

References m_RuntimeEntities.

◆ GetSelectedAssetPath()

std::string Olympe::BlueprintEditor::GetSelectedAssetPath ( ) const
inline

Definition at line 261 of file blueprinteditor.h.

References m_SelectedAssetPath.

Referenced by Olympe::InspectorPanel::RenderAssetFileInspector().

+ Here is the caller graph for this function:

◆ GetSelectedEntity()

uint64_t Olympe::BlueprintEditor::GetSelectedEntity ( ) const
inline

Definition at line 256 of file blueprinteditor.h.

References m_SelectedEntity.

Referenced by Olympe::NodeGraphPanel::RenderContent(), Olympe::InspectorPanel::RenderEntityInspector(), and Olympe::EntitiesPanel::RenderEntityItem().

+ Here is the caller graph for this function:

◆ HasBlueprint()

bool Olympe::BlueprintEditor::HasBlueprint ( ) const
inline

Definition at line 205 of file blueprinteditor.h.

References m_CurrentBlueprint, and Olympe::Blueprint::EntityBlueprint::name.

Referenced by SaveCurrentAsTemplate().

+ Here is the caller graph for this function:

◆ HasError()

bool Olympe::BlueprintEditor::HasError ( ) const
inline

Definition at line 242 of file blueprinteditor.h.

References m_LastError.

Referenced by Olympe::AssetBrowser::RenderContent().

+ Here is the caller graph for this function:

◆ HasSelectedAsset()

bool Olympe::BlueprintEditor::HasSelectedAsset ( ) const
inline

Definition at line 262 of file blueprinteditor.h.

References m_SelectedAssetPath.

◆ HasSelectedEntity()

bool Olympe::BlueprintEditor::HasSelectedEntity ( ) const
inline

Definition at line 257 of file blueprinteditor.h.

References m_SelectedEntity.

◆ HasUnsavedChanges()

bool Olympe::BlueprintEditor::HasUnsavedChanges ( ) const
inline

Definition at line 206 of file blueprinteditor.h.

References m_HasUnsavedChanges.

◆ Initialize()

void Olympe::BlueprintEditor::Initialize ( )

◆ InitializePlugins()

void Olympe::BlueprintEditor::InitializePlugins ( )

Definition at line 1216 of file blueprinteditor.cpp.

References m_Plugins, and RegisterPlugin().

Referenced by Initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitializeRuntimeEditor()

void Olympe::BlueprintEditor::InitializeRuntimeEditor ( )

Definition at line 109 of file blueprinteditor.cpp.

References Olympe::EditorContext::Get(), and Olympe::EditorContext::InitializeRuntime().

Referenced by SDL_AppInit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitializeStandaloneEditor()

void Olympe::BlueprintEditor::InitializeStandaloneEditor ( )

Definition at line 116 of file blueprinteditor.cpp.

References Olympe::EditorContext::Get(), Olympe::EditorContext::InitializeStandalone(), and PreloadATSGraphs().

Referenced by SDL_AppInit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Instance()

BlueprintEditor & Olympe::BlueprintEditor::Instance ( )
static

Definition at line 46 of file blueprinteditor.cpp.

References GetComponentTypeID_Static().

Referenced by Get().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InvalidateAssetMetadataCache()

void Olympe::BlueprintEditor::InvalidateAssetMetadataCache ( )

Definition at line 1031 of file blueprinteditor.cpp.

References m_AssetMetadataCache.

Referenced by RefreshAssets(), and SelectAsset().

+ Here is the caller graph for this function:

◆ IsActive()

bool Olympe::BlueprintEditor::IsActive ( ) const
inline

Definition at line 190 of file blueprinteditor.h.

References m_IsActive.

◆ IsAssetValid()

bool Olympe::BlueprintEditor::IsAssetValid ( const std::string &  filepath) const

Definition at line 949 of file blueprinteditor.cpp.

References GetComponentTypeID_Static(), and JsonHelper::LoadJsonFromFile().

+ Here is the call graph for this function:

◆ LoadBlueprint()

bool Olympe::BlueprintEditor::LoadBlueprint ( const std::string &  filepath)

◆ LoadConfig()

bool Olympe::BlueprintEditor::LoadConfig ( const std::string &  configPath = "blueprint_editor_config.json")

Definition at line 1399 of file blueprinteditor.cpp.

References GetComponentTypeID_Static(), m_Config, and SaveConfig().

Referenced by Initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MarkAsModified()

void Olympe::BlueprintEditor::MarkAsModified ( )
inline

Definition at line 210 of file blueprinteditor.h.

References m_HasUnsavedChanges.

Referenced by Olympe::BlueprintEditorGUI::AddComponent(), and Olympe::BlueprintEditorGUI::RemoveComponent().

+ Here is the caller graph for this function:

◆ MigrateAllBlueprints()

void Olympe::BlueprintEditor::MigrateAllBlueprints ( )

Definition at line 1304 of file blueprinteditor.cpp.

References GetComponentTypeID_Static(), JsonHelper::LoadJsonFromFile(), m_AssetRootPath, RefreshAssets(), and ScanBlueprintFiles().

+ Here is the call graph for this function:

◆ NewBlueprint()

void Olympe::BlueprintEditor::NewBlueprint ( const std::string &  name,
const std::string &  description = "" 
)

Definition at line 172 of file blueprinteditor.cpp.

References Olympe::Blueprint::EntityBlueprint::description, m_CurrentBlueprint, m_CurrentFilepath, and m_HasUnsavedChanges.

Referenced by Olympe::BlueprintEditorGUI::NewBlueprint().

+ Here is the caller graph for this function:

◆ NotifyEntityCreated()

void Olympe::BlueprintEditor::NotifyEntityCreated ( uint64_t  entityId)

Definition at line 966 of file blueprinteditor.cpp.

References GetComponentTypeID_Static(), and m_RuntimeEntities.

Referenced by NotifyEditorEntityCreated().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NotifyEntityDestroyed()

void Olympe::BlueprintEditor::NotifyEntityDestroyed ( uint64_t  entityId)

Definition at line 978 of file blueprinteditor.cpp.

References GetComponentTypeID_Static(), m_RuntimeEntities, and m_SelectedEntity.

Referenced by NotifyEditorEntityDestroyed().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OpenGraphInEditor()

void Olympe::BlueprintEditor::OpenGraphInEditor ( const std::string &  assetPath)

◆ operator=()

BlueprintEditor & Olympe::BlueprintEditor::operator= ( const BlueprintEditor )
privatedelete

◆ ParseAssetMetadata()

void Olympe::BlueprintEditor::ParseAssetMetadata ( const std::string &  filepath,
AssetMetadata metadata 
)
private

◆ ParseBehaviorTree()

void Olympe::BlueprintEditor::ParseBehaviorTree ( const json j,
AssetMetadata metadata 
)
private

Definition at line 841 of file blueprinteditor.cpp.

References Olympe::AssetMetadata::description, GetComponentTypeID_Static(), JsonHelper::GetString(), Olympe::AssetMetadata::name, Olympe::AssetMetadata::nodeCount, and Olympe::AssetMetadata::nodes.

Referenced by ParseAssetMetadata().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseEntityBlueprint()

void Olympe::BlueprintEditor::ParseEntityBlueprint ( const json j,
AssetMetadata metadata 
)
private

Definition at line 800 of file blueprinteditor.cpp.

References Olympe::AssetMetadata::componentCount, Olympe::AssetMetadata::components, Olympe::AssetMetadata::description, GetComponentTypeID_Static(), JsonHelper::GetString(), and Olympe::AssetMetadata::name.

Referenced by ParseAssetMetadata().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseHFSM()

void Olympe::BlueprintEditor::ParseHFSM ( const json j,
AssetMetadata metadata 
)
private

Definition at line 914 of file blueprinteditor.cpp.

References Olympe::AssetMetadata::description, GetComponentTypeID_Static(), JsonHelper::GetString(), Olympe::AssetMetadata::name, Olympe::AssetMetadata::nodeCount, and Olympe::AssetMetadata::nodes.

Referenced by ParseAssetMetadata().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PreloadATSGraphs()

void Olympe::BlueprintEditor::PreloadATSGraphs ( )

Definition at line 505 of file blueprinteditor.cpp.

References Olympe::AssetManager::Get(), GetComponentTypeID_Static(), Olympe::INVALID_ASSET_ID, Olympe::AssetManager::LoadTaskGraph(), m_AssetRootPath, m_AssetTreeRoot, and m_GamedataRootPath.

Referenced by InitializeStandaloneEditor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Redo()

void Olympe::BlueprintEditor::Redo ( )

Definition at line 1170 of file blueprinteditor.cpp.

References m_CommandStack, m_HasUnsavedChanges, and Olympe::Blueprint::CommandStack::Redo().

Referenced by Olympe::NodeGraphPanel::HandleKeyboardShortcuts().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RefreshAssets()

void Olympe::BlueprintEditor::RefreshAssets ( )

Definition at line 246 of file blueprinteditor.cpp.

References GetComponentTypeID_Static(), InvalidateAssetMetadataCache(), m_AssetRootPath, m_AssetTreeRoot, m_GamedataRootPath, m_LastError, and ScanDirectory().

Referenced by Initialize(), MigrateAllBlueprints(), Olympe::AssetBrowser::Refresh(), and SetAssetRootPath().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RegisterPlugin()

void Olympe::BlueprintEditor::RegisterPlugin ( std::unique_ptr< class BlueprintEditorPlugin plugin)

Definition at line 1232 of file blueprinteditor.cpp.

References GetComponentTypeID_Static(), and m_Plugins.

Referenced by InitializePlugins().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReloadTemplates()

void Olympe::BlueprintEditor::ReloadTemplates ( )

Definition at line 1151 of file blueprinteditor.cpp.

References Olympe::TemplateManager::Get(), and Olympe::TemplateManager::RefreshTemplates().

Referenced by Olympe::TemplateBrowserPanel::RenderTemplateBrowser().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SaveBlueprint()

bool Olympe::BlueprintEditor::SaveBlueprint ( )

◆ SaveBlueprintAs()

bool Olympe::BlueprintEditor::SaveBlueprintAs ( const std::string &  filepath)

◆ SaveConfig()

bool Olympe::BlueprintEditor::SaveConfig ( const std::string &  configPath = "blueprint_editor_config.json")

Definition at line 1453 of file blueprinteditor.cpp.

References GetComponentTypeID_Static(), and m_Config.

Referenced by LoadConfig(), and Shutdown().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SaveCurrentAsTemplate()

bool Olympe::BlueprintEditor::SaveCurrentAsTemplate ( const std::string &  name,
const std::string &  description,
const std::string &  category 
)

◆ ScanBlueprintFiles()

std::vector< std::string > Olympe::BlueprintEditor::ScanBlueprintFiles ( const std::string &  directory)

Definition at line 1276 of file blueprinteditor.cpp.

References GetComponentTypeID_Static().

Referenced by MigrateAllBlueprints().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ScanDirectory()

std::shared_ptr< AssetNode > Olympe::BlueprintEditor::ScanDirectory ( const std::string &  path)
private

Definition at line 315 of file blueprinteditor.cpp.

References DetectAssetType(), GetComponentTypeID_Static(), and ScanDirectory().

Referenced by RefreshAssets(), and ScanDirectory().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SearchAssets()

std::vector< AssetMetadata > Olympe::BlueprintEditor::SearchAssets ( const std::string &  query) const

Definition at line 618 of file blueprinteditor.cpp.

References GetAllAssets(), and GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ SelectAsset()

void Olympe::BlueprintEditor::SelectAsset ( const std::string &  assetPath)

Definition at line 1016 of file blueprinteditor.cpp.

References GetComponentTypeID_Static(), InvalidateAssetMetadataCache(), and m_SelectedAssetPath.

Referenced by Olympe::AssetBrowser::RenderTreeNode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetActive()

void Olympe::BlueprintEditor::SetActive ( bool  active)
inline

Definition at line 192 of file blueprinteditor.h.

References GetComponentTypeID_Static(), and m_IsActive.

Referenced by SDL_AppInit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetAssetRootPath()

void Olympe::BlueprintEditor::SetAssetRootPath ( const std::string &  path)

Definition at line 240 of file blueprinteditor.cpp.

References m_AssetRootPath, and RefreshAssets().

Referenced by Olympe::AssetBrowser::Initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetSelectedEntity()

void Olympe::BlueprintEditor::SetSelectedEntity ( uint64_t  entityId)

Definition at line 1000 of file blueprinteditor.cpp.

References m_SelectedEntity.

Referenced by Olympe::EntitiesPanel::RenderEntityItem().

+ Here is the caller graph for this function:

◆ SetShowMigrationDialog()

void Olympe::BlueprintEditor::SetShowMigrationDialog ( bool  show)
inline

Definition at line 302 of file blueprinteditor.h.

References GetComponentTypeID_Static(), and m_ShowMigrationDialog.

+ Here is the call graph for this function:

◆ ShowMigrationDialog()

bool Olympe::BlueprintEditor::ShowMigrationDialog ( ) const
inline

Definition at line 301 of file blueprinteditor.h.

References m_ShowMigrationDialog.

◆ Shutdown()

void Olympe::BlueprintEditor::Shutdown ( )

◆ ToggleActive()

void Olympe::BlueprintEditor::ToggleActive ( )
inline

Definition at line 191 of file blueprinteditor.h.

References m_IsActive.

◆ Undo()

void Olympe::BlueprintEditor::Undo ( )

Definition at line 1161 of file blueprinteditor.cpp.

References m_CommandStack, m_HasUnsavedChanges, and Olympe::Blueprint::CommandStack::Undo().

Referenced by Olympe::NodeGraphPanel::HandleKeyboardShortcuts().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Update()

void Olympe::BlueprintEditor::Update ( float  deltaTime)

Definition at line 154 of file blueprinteditor.cpp.

References Olympe::EntityInspectorManager::Get(), and Olympe::EntityInspectorManager::Update().

Referenced by SDL_AppIterate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_AssetMetadataCache

std::map<std::string, AssetMetadata> Olympe::BlueprintEditor::m_AssetMetadataCache
private

Definition at line 355 of file blueprinteditor.h.

Referenced by GetAssetMetadata(), and InvalidateAssetMetadataCache().

◆ m_AssetRootPath

std::string Olympe::BlueprintEditor::m_AssetRootPath
private

◆ m_AssetTreeRoot

std::shared_ptr<AssetNode> Olympe::BlueprintEditor::m_AssetTreeRoot
private

◆ m_BlueprintsToMigrate

std::vector<std::string> Olympe::BlueprintEditor::m_BlueprintsToMigrate
private

Definition at line 366 of file blueprinteditor.h.

◆ m_CommandStack

Blueprint::CommandStack* Olympe::BlueprintEditor::m_CommandStack
private

◆ m_Config

json Olympe::BlueprintEditor::m_Config
private

Definition at line 369 of file blueprinteditor.h.

Referenced by GetConfig(), GetConfigMutable(), LoadConfig(), and SaveConfig().

◆ m_CurrentBlueprint

Blueprint::EntityBlueprint Olympe::BlueprintEditor::m_CurrentBlueprint
private

◆ m_CurrentFilepath

std::string Olympe::BlueprintEditor::m_CurrentFilepath
private

◆ m_GamedataRootPath

std::string Olympe::BlueprintEditor::m_GamedataRootPath
private

Definition at line 338 of file blueprinteditor.h.

Referenced by PreloadATSGraphs(), and RefreshAssets().

◆ m_HasUnsavedChanges

bool Olympe::BlueprintEditor::m_HasUnsavedChanges
private

◆ m_IsActive

bool Olympe::BlueprintEditor::m_IsActive
private

Definition at line 329 of file blueprinteditor.h.

Referenced by Initialize(), IsActive(), SetActive(), and ToggleActive().

◆ m_LastCachedAssetPath

std::string Olympe::BlueprintEditor::m_LastCachedAssetPath
private

Definition at line 356 of file blueprinteditor.h.

◆ m_LastError

std::string Olympe::BlueprintEditor::m_LastError
private

◆ m_Plugins

std::map<std::string, std::unique_ptr<class BlueprintEditorPlugin> > Olympe::BlueprintEditor::m_Plugins
private

Definition at line 362 of file blueprinteditor.h.

Referenced by DetectPlugin(), GetPlugin(), InitializePlugins(), and RegisterPlugin().

◆ m_RuntimeEntities

std::vector<uint64_t> Olympe::BlueprintEditor::m_RuntimeEntities
private

◆ m_SelectedAssetPath

std::string Olympe::BlueprintEditor::m_SelectedAssetPath
private

Definition at line 351 of file blueprinteditor.h.

Referenced by GetSelectedAssetPath(), HasSelectedAsset(), and SelectAsset().

◆ m_SelectedEntity

uint64_t Olympe::BlueprintEditor::m_SelectedEntity
private

◆ m_ShowMigrationDialog

bool Olympe::BlueprintEditor::m_ShowMigrationDialog
private

Definition at line 365 of file blueprinteditor.h.

Referenced by SetShowMigrationDialog(), and ShowMigrationDialog().


The documentation for this class was generated from the following files: