Blender Git Commit Log
Git Commits -> Revision 71e6315
Revision 71e6315 by Antonio Vazquez (master) February 7, 2021, 12:02 (GMT) |
GPencil: Fix wrong python API for Point weights The old property never worked as expected because it was impossible expose the data as props. Now, there are two methods to handle this: weight_get and weight_set Example use: ```import bpy ob = bpy.context.active_object gpd = ob.data gps = gpd.layers[0].frames[0].strokes[0] i = 0 print("Weightsn================================") for pt in gps.points: gps.points.weight_set(vertex_group_index=0, point_index=i, weight=0.5) i +=1 i = 0 for pt in gps.points: weight = gps.points.weight_get(vertex_group_index=0, point_index=i) print(weight) i +=1 ``` Reviewed By: brecht Maniphest Tasks: T84967 Differential Revision: https://developer.blender.org/D10177 b3f989 |
Commit Details:
Full Hash: 71e63153ebf3668c6552afda5acfc746dcc49853
Parent Commit: 699b2d9
Lines Changed: +102, -30
1 Modified Path:
/source/blender/makesrna/intern/rna_gpencil.c (+102, -30) (Diff)