Im a bit confused.
I'm trying to get the weight from every vertex/point in a GreasePencil Stroke, to later assign them to another stroke in a different frame.
I can access the (active) GreasePencil by
gpd = bpy.context.active_object, and its vertex groups by
According the API, I should get the weight by:
(I guess that the vertices are numerated from 0 to inf)
But when I call, lets say, vg.weight(0), I got:
RuntimeError: Error: Vertex not in group
NOTE: I'm calling that on a vertex group that has ALL its vertices/GreasePencilPoints fully painted red (weight=1.0), so as far as I know, every vertex should be in that vertex group.
I also tried:
for i in range(10000):
Just in case I was referencing an index that was not in the group, but I got nothing printed. But my vertex group is fully painted. So I'm lost.
Any idea how to access the weight?
Thank you so much.
Edit: I've found this answer but it doesn't seem to work (it creates a new vertex group, but the weights of each vertex/point are not modified), so I'm not sure if its buggy or how it is supposed to work.
Any idea about getting the weight of a vertex/point?