How to read attribute from control points via python?

I added this attribute (spline fac) to my control points via geometry nodes:

Now i want to read these values via python.

I tried this:

depsgraph = context.evaluated_depsgraph_get()

obj = context.object

object_eval = obj.evaluated_get(depsgraph)[0].bezier_points[0]["spline fac"]

and i got:

TypeError: this type doesn’t support IDProperties

What am i making wrong?

1 Like

I’m not 100% sure but I think the problem might come from the fact that curves don’t support attributes outside of geometry nodes yet …

Try the same with a mesh to be sure !

You’ll probably have to do some conversion for that to work… Like putting a curve to mesh at the end of the tree…

Good luck !

1 Like