The Graph
The Graph is the main storage, and loader of the entire animation system. They store all the necessary data for scenes to play out. Along if constructing its elements in a way the mod can navigate through.
Normally you will never need to read its data directly, as Depraved Sense already reads all its data for scenes. But if you ever need to get a specific information of it. You may do it with this example:
local Graph = require("DepravedSense/AnimGraph/Graph")
local stage = Graph.find_stage("stage_name", "module_name")
Reminder that every value you try to find on the Graph can return nil. So in this example stage will need to pass through a check first, before doing anything with it, or else you might deal with errors.
---In this section we verify if `stage` actually exists or not.
---If it does, we print out its id.
if stage == nil then
return
else
print(stage.id)
end
WARNING: It is highly endorsed to only EVER read values of cells through the graph, and NEVER modify them. Alterations on its data can result in errors, and undefined behaviour.