Main question: I want to access the curve length value from the geometry node setup via the blender python api (see the screenshot). In the pictured node setup, you can see that I have it hooked up to a viewer node, and the instantaneous length of the curve is displayed on the curve points (1.00337). I want to access this value via the python api. I can't apply the modifier stack to the curve via the depsgraph and use calc_length on the spline, because of other modifiers added for visualization. Is it possible to access the value in Geo nodes via python?
Background: I'm working a blender plugin, and one of the functionalities depends on interactively creating poly curves, where the individual points are hooked to specific empties. A curve can have an arbitrary number of empties and corresponding hook modifiers, then the last two modifiers in the stack are always one that adds a profile curve & custom material, and then a bevel modifier. These last two steps are for visualization purposes only (the curve is an abstract representation of a muscle, hence the name in my screenshots).
I have a python script that programmatically moves some of the empties around (thus changing the curve length), and then using the depsgraph, computes the instantaneous curve's length (by applying all the modifiers in the depsgraph evaluation). The curve itself remains unchanged, but I can get the length this way. This works with only hook modifiers, and also other custom node groups that I add to modify the curve's path, but it's more complicated if you add the geometry & bevel nodes add the end for visualization because then the curve gets transformed into a mesh. In geometry nodes, it is possible to access the curve's instantaneous length, and this updates automatically as I move the empties around (see screenshot). Is there some way to access this value outside of geometry nodes? I tried several approaches (accessing the curve length's own output, and hooking the node output to the group output and then trying to access the group output), but these approaches did not seem to work. Any suggestions would be welcome!
Cheers, Pasha

