1
$\begingroup$

i want to add a vertex group by it's name (vgroup22) to a surface deform modifier. the code should look kinda like this:

bpy.data.objects['Body.p.2'].modifiers["Surface Deform"].vertex_group ??????

thx for taking a look

$\endgroup$
1
  • $\begingroup$ If you have an answer, please post it in the answer box below instead of adding it to your question. Thanks. $\endgroup$ Commented Aug 7, 2020 at 22:54

1 Answer 1

1
$\begingroup$

found the solution (blender 2.83.3)

bpy.context.object.modifiers["Surface Deform"].vertex_group = "vgroup22"

didn't know, that every action is displayed in the "info" window and the code can simply be copied.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .