0

I am new to blender and currently working in blender 2.8. I wanted to animate a plane mesh to have a flag like movement and created that using a tutorial. I wanted to do the same using python scripting. In tutorial in weight paint mode, using colours, weights are given to particular portion of the plane.

Can anyone help me to do python scripting for the same ? Selecting particular portion of the plane mesh and assigning weights to it.

Thanks in Advance

mastodonz
  • 13
  • 4
  • @batFINGER thanks for your reply. The link you have shared shows how to set the vertex weights for whole object. Can you help me to select a particular section, for example if I have a plane mesh , i need to select only the left most column of the plane mesh using scripting? Hoe to select vertices of left most colum of the plane mesh through python ? – mastodonz Jan 29 '20 at 10:45
  • Ok, re-opened. The links given show how to set vertex weight. If your grid is such that z is constant and your flag pole edge is y, the gradient weight is a funciton of vertex coordinate x such that it's 1 at 0 and 0 at x == dimension.x for example. – batFINGER Jan 29 '20 at 10:57
  • thanks for the replay, let me try it out – mastodonz Jan 29 '20 at 11:04
  • [link] (https://www.youtube.com/watch?v=EJLIaNhoSSs&feature=emb_rel_pause) In this tutorial a plane mesh is created and at 4:57, and in weight paint mode , they are giving color . According to my understanding they are creating a vertex group. Can anyone please help me with the python script to do the same ? to be precise python scripting for whatever they are doing in the weight paint mode.Iam beginner in blender..Thanks in advance – mastodonz Jan 29 '20 at 11:41
  • Assigning a vertex group and weights is coming full circle to the links posted as duplicates when closing this question in the first place. https://blender.stackexchange.com/questions/39653/how-to-set-vertex-weights-using-blenders-python-api https://blender.stackexchange.com/questions/94411/how-to-modify-vertex-groups-through-script – batFINGER Jan 29 '20 at 11:53
  • @batFINGER Thank u so much . As I am new to blender I couldn't understand at first when you shared the links alone. In the last replay when u said specifically I got it and it worked. Thanks again – mastodonz Jan 30 '20 at 04:28

0 Answers0