TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ LoadInternal()

void NodeEditorNode::LoadInternal ( nlohmann::json  data)

Definition at line 234 of file NodeEditor.cpp.

235{
236 Load(data);
237 name = data["name"];
238 headerColor = data["headerColor"];
239 id = data["id"];
240 _id = id;
241
242 for (nlohmann::json pns : data["inputPins"])
243 {
244 inputPins[pns["index"]]->Load(pns);
245 }
246
247 for (nlohmann::json pns : data["outputPins"])
248 {
249 outputPins[pns["index"]]->Load(pns);
250 }
251
252 try // For Backward Ckompitabilaty
253 {
254 nodePosition = ImVec2(data["posX"], data["posY"]);
255 }
256
257 catch(...)
258 {
259 std::cout << "Failed to load node position!\n";
260 }
261
262 reqNodePosLoad = true;
263}
a class to store JSON values
Definition: json.hpp:17860