as suggested by one of you I'm reporting this as bug, even if it is actually a request of improvement.
I'm the developer of Tissue, and during the Reaction-Diffusion simulation based on vertex groups, I'm realising that the slowest part is not the simulation itself, but Reading and Writing the vertex group each frame. This is a short example of the computing time for each frame using 50 iterations (read and write occurs only once) in the simulation on a geometry with 55298 vertices:
RD - Read Vertex Groups: 0.09177565574645996 RD - Preparation Time: 0.0059850215911865234 RD - Simulation Time: 0.08377623558044434 RD - Closing Time: 0.19245696067810059
This is what I do in "RD - Read Vertex Group":
for i in range(n_verts): try: a[i] = ob.vertex_groups["A"].weight(i) except: pass try: b[i] = ob.vertex_groups["B"].weight(i) except: pass
I'm using a "try" in case that some vertices are not in the group
while this is what I do in "RD - Closing Time":
for i in range(n_verts): ob.vertex_groups['A'].add([i], a[i], 'REPLACE') ob.vertex_groups['B'].add([i], b[i], 'REPLACE')
It would be great to have an easy and fast method for having a specific vertex group as list of values for each vertex, maybe with a null or just zero for vertices that are not in the group. The same thing for writing back the vertex group.
Is it possible?
Thank you for your work,