I’m stuck doing an script to assing a different vertex group for every constraint.
Let me explain:
My scene has 578 Empties with a Transformation constraint
For Empty.003, its subtarget is vertex group ‘groupy.003’ from another object named Template.001
I have manually assigned that vertex group. Sadly, the 577 other empties have all assigned the same vertex group. Changing all of them one by one will take ages and will drive me crazy.
What I am looking for is an script that takes every empty from that collection (‘empties’) and assign their corresponding vertex group.
Empty > groupy.000
Empty.001 > groupy.001
Empty.002 > groupy.002
…and so on until
Empty.577 > groupy.577
My crappy Python knowledge only gets too write a variable that includes all of the empties I want to change, but that is all I can do. I have no idea how to continue. Any help?
cons = bpy.data.collections[‘empties’].objects
for obj in cons:
obj.TransformConstraint.subtarget = [???!$£%^$$]