# Armature: Clear Vertex Weights of selected Mesh

I used set Automatic Weights when Parenting the Mesh to the Armature. However the Oxygen tanks are assigned to all kinds of bones. How do I remove all bone weighting from the selected Mesh?

I could go into WeightPaint and select every single bone and make sure the Oxygen tank is nowhere selected. But that would be a terrible inconvenience. And setting Vertex Weights in the right Panel of the 3d-View only sets the weights for a single Vertex.

• select the Oxygen mesh in Edit mode, go to Data menu > Vertex Groups, click on the down arrow on the right of the Vertex Groups list (under "+" and "-" ) and choose Remove from All Groups, then choose the Vertex Group to which it is supposed to be parented and click Assign – moonboots Jun 20 '18 at 15:22
• Clearly the best way to do it. Put it in an answer and I'll accept – AzulShiva Jun 27 '18 at 12:18

Select the Oxygen mesh in Edit mode, go to Data menu > Vertex Groups, click on the down arrow on the right of the Vertex Groups list (under "+" and "-" ) and choose Remove from All Groups.

Then choose the Vertex Group to which it is supposed to be parented and click Assign

1. Select the vertices, if there is no active vertex, deselect one, and select it again with Shift RMB.
2. Enter the desired weights for the vertex, then press copy, to copy the settings to all selected vertices.

1. Although the other vertices copied the weights, there still may be additional zero weighted groups. To remove them, use Clean button on all groups.

This can be done easily with python:

• Open the text editor
• Select the tube mesh as shown in the screenshot you provided
• Run the below script

import bpy
mode = bpy.context.active_object.mode
bpy.ops.object.mode_set(mode='OBJECT')
ob = bpy.context.active_object
selectedVerts = [v for v in ob.data.vertices if v.select]
for v in selectedVerts:
for i, g in enumerate(v.groups):
v.groups[i].weight=0