[Bf-python] vertex groups.

Campbell Barton cbarton at metavr.com
Thu Apr 6 17:49:03 CEST 2006


Hey Ken
Was using vertex groups the other day and found them a bit clunky.
(seems like its dificuled to have an elegant way to have fast vert group 
access in blender.)

Anyhow. was wandering if youd accept verts with dict like access to 
their vertex group weight.

for v in me.verts:
  v['SomeGroup'] = 0.5 # sets the vertex to a group, or adds the group 
if its not in the mesh.
  v['SomeOtherGroup'] = -1 # is clamped to 0.0
  del v['SomeOtherGroup'] # removes the vert from a the vertgroup.
  for group in v: print v # as with dicts, iterate over their keys/vert 
group names.
  for group, weight in v.iteritems(): print group, weight # iterate over 
their groupnames and weights.
 
Is this worth writing a patch for?
 
- Cam

-- 
Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241



More information about the Bf-python mailing list