Sub topic 1
How a Mesh Follows an Armature
Prerequisites
This chapter assumes you can move around the 3D Viewport, switch between Object, Edit and Pose modes, and select objects and mesh elements. You should have a finished mesh and an armature with at least one bone.
How a mesh follows an armature
Blender deforms a mesh with an armature in four linked steps. Each bone that should move the mesh must be marked as a deforming bone. Each bone name matches a vertex group on the mesh. Each vertex group stores a weight for every vertex it covers. The Armature modifier reads those weights and moves each vertex accordingly.
A weight is a number from 0 to 1. A weight of 1 means the bone fully controls the vertex. A weight of 0 means the bone has no effect on it.
Preparing the armature: bones and the Deform setting
Select a bone and open the Bone properties tab. The Deform checkbox controls whether the bone takes part in skinning. Bones with Deform turned on can move the mesh. Bones with Deform turned off, such as control or helper bones, are ignored.
Vertex groups: where weights live
A vertex group is a named set of vertices, each with a weight. Blender links a vertex group to a bone only by name, so the group "Spine" drives the bone "Spine". Names must match exactly, including capitalization. The following script creates one group and gives every vertex a weight of 1.0.
import bpy
mesh_obj = bpy.data.objects["Body"]
# Create a vertex group named after the bone it should follow.
vg = mesh_obj.vertex_groups.new(name="Spine")
# Give every vertex a weight of 1.0 in this group.
vg.add([v.index for v in mesh_obj.data.vertices], 1.0, 'REPLACE')The Armature modifier
The Armature modifier reads the vertex groups on the mesh and moves each vertex by the bones that match. Parenting with automatic weights adds this modifier for you. You can also add it by hand in the Modifier properties tab and set its Object field to the armature.
Exercise:
Exercise
A bone named "Arm.L" has Deform turned off. The mesh has a vertex group named "Arm.L" with weights set. Will the arm bone move those vertices?
Show answer
No. Blender ignores bones with Deform turned off, so the vertex group has no effect. Turn Deform on for the bone to make the group work.