Please forgive poor English by translation
Version used: 3.0.0 Alpha
I tried to get (every frame) the Weight with the following script, but it didn't work I tried to get the Weight by using the following script, but I could not get the Weight change by Dynamic Paint.
### Python Code
import bpy
meshName: str = 'Cube'
vars
obj = bpy.data.objects[meshName]
def handler(Scene):
# count vertices
weight = [0]*len(obj.data.vertices)
# get and assign weight
for i in range(len(obj.data.vertices)):
try: weight[i] = obj.vertex_groups[0].weight(i)
except: pass
print(weight)
bpy.app.handlers.frame_change_pre.append(handler)
The weight obtained by vertex_groups can only be obtained before Dynamic Paint is applied. Also, I could not get the value by duplicating the vertex group in the modifier and referencing it.
How can I fix this?