21#ifdef OLYMPE_BLUEPRINT_EDITOR_ENABLED
26#include "EditorContext.h"
27#include "../TaskSystem/LocalBlackboard.h"
44 cfg.showRuntimeHighlight =
false;
45 cfg.showBlackboardPanel =
true;
46 cfg.showToolbar =
true;
54 cfg.showRuntimeHighlight =
true;
55 cfg.showBlackboardPanel =
true;
56 cfg.showToolbar =
false;
71#ifdef OLYMPE_BLUEPRINT_EDITOR_ENABLED
78 ImNodes::BeginNodeEditor();
81 const auto& nodes =
doc->GetNodes();
82 for (
size_t i = 0;
i < nodes.size(); ++
i)
89 for (
size_t i = 0;
i <
links.size(); ++
i)
94 ImNodes::EndNodeEditor();
96 if (
cfg.showBlackboardPanel)
116#ifdef OLYMPE_BLUEPRINT_EDITOR_ENABLED
117 if (!ImGui::Begin(
"Blackboard"))
125 ImGui::TextDisabled(
"(no blackboard)");
130 const auto&
names =
bb->GetVariableNames();
131 for (
size_t i = 0;
i <
names.size(); ++
i)
140 ImGui::TextDisabled(
"%s (error)",
names[
i].
c_str());
158#ifdef OLYMPE_BLUEPRINT_EDITOR_ENABLED
161 if (
cfg.showRuntimeHighlight && isActive)
167 ImNodes::BeginNode(
node.id.value);
168 ImGui::TextUnformatted(
node.name.c_str());
171 if (
cfg.showRuntimeHighlight && isActive)
173 ImNodes::PopColorStyle();
188#ifdef OLYMPE_BLUEPRINT_EDITOR_ENABLED
189 ImNodes::Link(
link.id.value,
link.fromPin.value,
link.toPin.value);
202#ifdef OLYMPE_BLUEPRINT_EDITOR_ENABLED
203 if (ImGui::Button(
"Auto Layout"))
210 ImGui::TextDisabled(
ctx.GetMode() == Olympe::NodeGraph::EditorMode::Debug ?
"[Debug]" :
"[Editor]");
ComponentTypeID GetComponentTypeID_Static()
Document class for managing node graphs.
Shared renderer for BlueprintEditor and RuntimeDebugger.
Simple map-based blackboard for task graph runtime state.
Contexte d'édition pour un graphe.
Main document class for a node graph.
static Config MakeDebuggerConfig()
Returns the default configuration for the Runtime Debugger (read-only mode).
static void Render(GraphDocument *doc, const EditorContext &ctx, const Config &cfg, int activeNodeID=-1)
Renders the graph inside the current ImGui window.
static Config MakeEditorConfig()
Returns the default configuration for the BlueprintEditor (full-edit mode).
static void RenderBlackboardPanel(const LocalBlackboard *bb)
Renders the blackboard variables panel.
static void RenderLink(const LinkData &link)
Renders a single link between two nodes.
static void RenderToolbar(GraphDocument *doc, const EditorContext &ctx)
Renders the graph toolbar (save/load/auto-layout buttons).
static void RenderNode(const NodeData &node, const Config &cfg, int activeNodeID)
Renders a single node.
C++14-compliant type-safe value container for task parameters.
< Provides AssetID and INVALID_ASSET_ID
Rendering configuration knobs.
bool readOnly
Disable node dragging / connection editing.