Log In
New Account
Home My Page Projects Blender 2.x BF release
Summary Activity Tracker SCM Files

Blender 2.6 Bug Tracker: Browse

[#25440] Object.vertex_group fixin'

Date:
2011-01-01 00:34
Priority:
3
State:
Closed
Submitted by:
Dan Eicher (dna)
Assigned to:
Campbell Barton (campbellbarton)
Category:
Python
Status:
Fixed / Closed
Relates to:
Duplicates:
Patches:
 
Summary:
Object.vertex_group fixin'
Detailed description
Fixed up the VertexGroup API so it's actually usable...

========================

cube = bpy.data.objects['Cube']
foo = cube.vertex_groups.new('foo')
foo.add([1,3,5,7], 1.0, 'ADD')

for i in range(len(cube.data.vertices)):
try:
weight = foo.weights(i)
print('vert: %i weight: %f' % (i, weight))
except:
pass

foo.remove([1,3])

cube.vertex_groups.delete(foo)

Followup

Message
  • Date: 2011-01-07 10:51
  • Sender: Campbell Barton
  • applied.
    renamed 'weights' to 'weight', 'delete' to 'remove'
 

Attached Files:

Name Date Download
vgroup.diff 2011-01-01 00:35 Download

Changes:

Field Old Value Date By
status_idOpen2011-01-07 10:51campbellbarton
close_dateNone2011-01-07 10:51campbellbarton
StatusInvestigate2011-01-07 10:51campbellbarton
assigned_tonone2011-01-01 02:33campbellbarton
StatusNew2011-01-01 02:33campbellbarton
File Added14329: vgroup.diff2011-01-01 00:35dna