![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Converts a BehaviorTreeAsset into an Olympe::NodeGraph for display in the NodeGraphPanel (Blueprint Editor pipeline). More...
#include <BTGraphDocumentConverter.h>
Static Public Member Functions | |
| static NodeGraph * | FromBehaviorTree (const BehaviorTreeAsset *tree) |
| Converts a BehaviorTreeAsset into a heap-allocated NodeGraph. | |
| static void | SyncActiveNode (NodeGraph *graph, uint32_t currentNodeId) |
| Synchronises the active-node metadata in an existing NodeGraph. | |
Private Member Functions | |
| BTGraphDocumentConverter ()=delete | |
Converts a BehaviorTreeAsset into an Olympe::NodeGraph for display in the NodeGraphPanel (Blueprint Editor pipeline).
The resulting NodeGraph preserves the original BT node IDs so that NodeGraphPanel::SetActiveDebugNode() works directly with BT node indices.
Definition at line 29 of file BTGraphDocumentConverter.h.
|
privatedelete |
|
static |
Converts a BehaviorTreeAsset into a heap-allocated NodeGraph.
Two-priority loading strategy:
BehaviorTreeManager::GetTreePathFromId() to obtain the asset path, then calls NodeGraphManager::LoadGraph() to parse the file. This preserves the visual positions saved in the JSON, making the debugger layout identical to the Blueprint Editor standalone view. ClearDirty() is called on the resulting graph because the debugger is read-only. The temporary graph slot in NodeGraphManager is closed immediately after cloning."TreeName:") or when LoadGraph returns -1. Positions are computed by BTGraphLayoutEngine.| tree | BehaviorTree asset to convert (non-null). |
tree is null. Definition at line 41 of file BTGraphDocumentConverter.cpp.
References Olympe::NodeGraph::ClearDirty(), Olympe::NodeGraphManager::CloseGraph(), Olympe::BTGraphLayoutEngine::ComputeLayout(), BehaviorTreeManager::Get(), Olympe::NodeGraphManager::Get(), GetComponentTypeID_Static(), Olympe::NodeGraphManager::GetGraph(), BehaviorTreeManager::GetTreePathFromId(), Olympe::NodeGraphManager::LoadGraph(), Olympe::NodeGraphShared::MapBTToEditor(), Olympe::NodeGraph::name, Olympe::NodeTypeToString(), Olympe::BTNodeLayout::position, and Vector::x.
Referenced by Olympe::BehaviorTreeDebugWindow::RenderNodeGraphDebugPanel().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Synchronises the active-node metadata in an existing NodeGraph.
No-op for the NodeGraph model; actual highlight is driven by NodeGraphPanel::SetActiveDebugNode(). Kept for API symmetry.
| graph | Target graph (may be null — safely ignored). |
| currentNodeId | BT node currently executing. |
Definition at line 147 of file BTGraphDocumentConverter.cpp.
Referenced by Olympe::BehaviorTreeDebugWindow::RenderNodeGraphDebugPanel().
Here is the caller graph for this function: