Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-08-31 18:16:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-08-31 18:16:04 +0400
commitf823e6c4b5b7f6c1685c8e6e44b238e4227a0a70 (patch)
tree97c06ac2973956ffe6c1b909f27144a7b2ee5aab /add_mesh_gears.py
parentfd7badedd24b4f552e23c3eeff3dae77d7cbedba (diff)
vertex group update
Diffstat (limited to 'add_mesh_gears.py')
-rw-r--r--add_mesh_gears.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/add_mesh_gears.py b/add_mesh_gears.py
index c37ec80a..eeb763b0 100644
--- a/add_mesh_gears.py
+++ b/add_mesh_gears.py
@@ -44,8 +44,7 @@ Also, the vertex group API is changed a little bit but the concepts
are the same:
=========
vertexgroup = ob.vertex_groups.new('NAME_OF_VERTEXGROUP')
-for i in vertexgroup_vertex_indices:
- ob.vertex_groups.assign_vertex(i, vertexgroup, weight, 'ADD')
+ob.vertex_groups.assign(vertexgroup_vertex_indices, vertexgroup, weight, 'ADD')
=========
Now for some reason the name does not 'stick' and we have to set it this way:
@@ -788,12 +787,10 @@ class AddGear(bpy.types.Operator):
# Create vertex groups from stored vertices.
tipGroup = obj.vertex_groups.new('Tips')
- for vert in verts_tip:
- obj.vertex_groups.assign(vert, tipGroup, 1.0, 'ADD')
+ obj.vertex_groups.assign(verts_tip, tipGroup, 1.0, 'ADD')
valleyGroup = obj.vertex_groups.new('Valleys')
- for vert in verts_valley:
- obj.vertex_groups.assign(vert, valleyGroup, 1.0, 'ADD')
+ obj.vertex_groups.assign(verts_valley, valleyGroup, 1.0, 'ADD')
return {'FINISHED'}
@@ -896,12 +893,10 @@ class AddWormGear(bpy.types.Operator):
# Create vertex groups from stored vertices.
tipGroup = obj.vertex_groups.new('Tips')
- for vert in verts_tip:
- obj.vertex_groups.assign(vert, tipGroup, 1.0, 'ADD')
+ obj.vertex_groups.assign(verts_tip, tipGroup, 1.0, 'ADD')
valleyGroup = obj.vertex_groups.new('Valleys')
- for vert in verts_valley:
- obj.vertex_groups.assign(vert, valleyGroup, 1.0, 'ADD')
+ obj.vertex_groups.assign(verts_valley, valleyGroup, 1.0, 'ADD')
return {'FINISHED'}