Linked Questions

2
votes
1answer
1k views

How to select and assign vertices to a vertex group via python? [duplicate]

How to select and assign vertices to a vertex group via python? I have a script that generates random hair on sphere, and I want to make it work for a custom head mannequin, so I have to assign ...
0
votes
0answers
29 views

How do I get indices of manually created vertex group via python? [duplicate]

I manually created a vertex group with needed vertices in blender. How do I get indices of its vertices to then create a vertex group with this vertices via python?
28
votes
4answers
4k views

Why avoid bpy.ops?

Simple and maybe stupid question: I was reading this lot of time, that "you should avoid using bpy.ops, or "instead of ...
9
votes
2answers
6k views

Checking if a vertex belongs to a vertex group in python

I'm trying to check whether or not a vertex belongs to a particular group, I've seen a couple methods, I'm wondering why the following does not move any vertices. ...
4
votes
2answers
3k views

How can I get the names of the vertex groups these vertices are in?

In my mesh I have few vertices which are in more then 4 vertex groups. I know the indices of those vertices, is there a way to get names of those vertex groups? Many tnx
5
votes
1answer
3k views

How to assign vertex groups and bone weights through Blender's Python API?

I'm making a script to import custom objects, it is still at early stage but so far vertices, faces and uv are created correctly. I want to do weight painting through Blender's Python API but I don't ...
0
votes
1answer
2k views

How to modify vertex groups through script

I'm trying to modify an object's vertex groups from a python script. I've come up with the following code which throws no errors, but doesn't change the values in the vertex groups: ...
1
vote
1answer
1k views

How can i get the weight for all vertices in a vertex group?

I have created this function to get the weights from a group: ...
1
vote
1answer
445 views

how to check if a vertex group is empty or not with python

I am figuring out a way to check if vertex group is empty or not. if it contains at least 1 vertex or totally empty. I am trying to make if condition to check for empty vertex group and delete the ...
1
vote
1answer
280 views

How to create 2 distinct objects from a single object with 2 Vertex Groups? (python)

I created this example, where I only have 1 object that contains 2 cubes (mesh). These cubes respectively have a vertex group,1 UV Map and share 4 materials. Vertex group "Cube1" white and green ...
2
votes
1answer
208 views

Vertex vs texture map

I am trying to select a model vertex by the textures alpha trough the python. But I cant figure out relationship between meshes vertex, uv-vertex and texture´s pixel rgba information. Can you help ...
2
votes
1answer
90 views

foreach_get/set a mesh vertex group data?

I'm searching how to batch set/get vertex group data inside blender. using foreach_get() foreach_set() function from bpy.data.objects[0].data.vertices & numpy for a fast calculation. but it seem ...
1
vote
1answer
101 views

How to clean weight groups by script?

After transferring weights from one object to another vertices might get multiple groups with very low weights. In weight painting view there is a tool 'Clean' that allows to remove all the groups ...
0
votes
1answer
47 views

Assymetrical model with same number of vertices in each side - how to transfwer weights?

The idea: a Python script that looks at the left side, then looks at the right side group with same root name but ending with ".R", then process all vertices and copy the weights to the vertex closest ...
0
votes
1answer
48 views

How can i remove verts in specific Group in VertexGroups via python?

i use Blender v2.76 and i try to remove vertices in specific Vertex Group via python ? my specific group is atm "Test123" (only example), i try now via python to remove the selected vertices from the ...