System Information
Operating system: Kubuntu 21.04
Graphics card: AMD Radeon Vega 6 Graphics
Blender Version
Broken: 3.2.0.Alpha (branch: master, commit hash : 6bf51ab03a066f8cf37a061ceb8d5c12bd6ea88d, commit date: Fri, 25 Mar 2022 9:33 PM)
Short description of error
When points of a stroke belong to just one vertex group and the index of that vertex group is not zero, Python API weight_get cannot retrieve weight assigned to points.
Not resolved after T91511.
Exact steps for others to reproduce the error
Run script in attached .blend file (
).- Draw two strokes.
- Create two vertex groups.
- Assign all points in first stroke to first vertex group group.
- Assign all points in second stroke to second vertex group.
- Call to stroke.points.weight_get(0, 0) results in -1.0
- Call to stroke.points.weight_get(1, 0) throws Groups: index out of range
It seems that the code in rna_GPencilStrokePoints_weight_get interprets vertex_group_index in two different ways: index in dw array MDeformVert and index of vertex group in object. It checks bounds wrt totweight but gives weights associated. I have a fix ; I'll see if I can figure out how to attach it here.

