Sub topic 8
Editing several objects at once
Earlier chapters covered Object Mode, Edit Mode, and the vertex, edge, and face select modes. This chapter assumes you can switch modes with Tab, select geometry in each select mode, and tell an object's transform from its mesh data. Here you will enter Edit Mode on several meshes together and learn which operations work across them and which stay inside one object.
What multi-object editing is
Since Blender 2.80, Edit Mode is not limited to one object. If several mesh objects are selected when you press Tab, all of them enter Edit Mode together. You see and select the geometry of every one of them in the same viewport, and a single transform can move geometry from several objects at once.
Each object keeps its own mesh data. Blender does not merge the meshes. It lets one interaction session cover several data blocks. This is different from joining objects with Ctrl+J, which permanently combines them into one object.
The active object is the one drawn with the lighter outline and the one the Properties editor shows. When you enter Edit Mode, the active object is the one whose mesh-specific settings and data panels you see. The other objects are edited alongside it.
Entering Edit Mode on several objects
- In Object Mode, select two or more mesh objects. Click one, then Shift+click the others.
- Make sure the one you want as the active object was clicked last. Shift+click again on an already selected object to make it active.
- Move the pointer over the 3D Viewport and press Tab.
All selected meshes now show their vertices, edges, or faces. The select mode (vertex, edge, or face) is shared. Switching it with 1, 2, or 3 changes it for every object in Edit Mode.
Adding and removing objects while in Edit Mode
You do not have to leave Edit Mode to change which objects take part. The Outliner shows a small mode icon, a dot, beside each compatible object while you are in Edit Mode.
- Click the dot beside an object to add it to Edit Mode.
- Click the dot of an object already in Edit Mode to remove it.
- Ctrl+click an object's name or icon in the Outliner to add it to or remove it from the editing set. It is also the quickest way to get several objects into Edit Mode without first selecting them in Object Mode.
This is handy when you realize midway that a neighboring object needs the same edit.
What works across objects, and what stays per object
Most tools that act on selected geometry apply to the selection in every object in Edit Mode. The selection itself is stored per object, because each mesh has its own selection flags.
| Task | Behavior with several objects in Edit Mode |
|---|---|
| Move, Rotate, Scale of selected geometry | Applies to selected geometry in all edited objects, in one operation. |
| Select All (A), Invert (Ctrl+I) | Applies to every object in Edit Mode. |
| Box select and Select Linked (L, Ctrl+L) | Works across objects, but linked geometry never crosses from one object into another. |
| Extrude, Inset, Bevel, Delete | Runs on each object's own selection. |
| Merge by Distance | Welds vertices only within each object. Overlapping vertices of two different objects stay separate. |
| Separate (P) | Splits geometry out of each edited object into new objects. |
| Join (Ctrl+J) | Only available in Object Mode. |
The Merge by Distance row is a common source of confusion. If two objects meet at a seam and you want one watertight mesh, select both in Object Mode, join them with Ctrl+J, then go into Edit Mode and merge.
Objects of different types
Only objects of the same type can be edited together. A mesh and a curve cannot share an Edit Mode session. If you select a mesh, a curve, and a light and press Tab, only objects of the active object's type enter Edit Mode. Lights have no Edit Mode and are skipped.
Hidden objects and objects that are not selectable are also left out, which explains why an object you expected to edit sometimes does not respond.
Shared mesh data and linked duplicates
Objects created with Alt+D, a linked duplicate, share one mesh data block. They are separate objects with their own transforms, but they point at the same vertices.
If you put two linked duplicates into Edit Mode, you are editing the same mesh twice over, and any change shows up on both. This matters for scripts, because looping over every object in Edit Mode can touch the same mesh two times. Moving the selected vertices by 1 unit would move them by 2.
Local versus world space
Each object has its own transform. The vertex coordinates you read from a mesh are in that object's local space. If two objects are rotated or scaled differently, "up by one unit in the viewport" means a different local offset for each. The viewport handles this for you when you use the Move tool in Global orientation. A script must do the conversion itself.
Scripting multi-object editing
The context gives you the list of objects currently in Edit Mode. Use objects_in_mode_unique_data to skip linked duplicates, and read each mesh with BMesh.
import bpy
import bmesh
from mathutils import Vector
world_up = Vector((0.0, 0.0, 1.0))
for obj in bpy.context.objects_in_mode_unique_data:
if obj.type != 'MESH':
continue
bm = bmesh.from_edit_mesh(obj.data)
# Convert the world-space direction into this object's local space.
local_offset = obj.matrix_world.to_3x3().inverted() @ world_up
moved = 0
for vert in bm.verts:
if vert.select:
vert.co += local_offset
moved += 1
bmesh.update_edit_mesh(obj.data)
print(f"{obj.name}: moved {moved} vertices")Run this while two or more meshes are in Edit Mode. The inverted() call matters: without it, a scaled or rotated object would move by the wrong amount. For an object scaled to 2 on every axis, the local offset becomes 0.5, which is a world-space shift of exactly one unit.
You can also start the session from a script. The mode_set operator behaves like Tab, so it puts all selected objects of the active object's type into Edit Mode.
import bpy
meshes = [o for o in bpy.context.selected_objects if o.type == 'MESH']
if meshes:
if bpy.context.mode != 'OBJECT':
bpy.ops.object.mode_set(mode='OBJECT')
bpy.context.view_layer.objects.active = meshes[0]
bpy.ops.object.mode_set(mode='EDIT')
print([o.name for o in bpy.context.objects_in_mode])
bpy.ops.object.mode_set(mode='OBJECT')The first mode_set call returns to Object Mode if you are somewhere else, since you cannot change the selection safely mid-session. The final line leaves Edit Mode so the changes are written back to the mesh data.
Common errors
- Only one object responds. The others were not selected when you pressed Tab, or they are a different type from the active object. Check the Outliner dots.
- Geometry moves twice as far as expected. Two linked duplicates share one mesh. Use unique-data iteration in scripts, and remember that editing one edits both.
- Seams will not weld. Merge by Distance works per object. Join the objects first.
- Script offsets look wrong on rotated objects. You applied a world-space offset to local coordinates. Convert with the object's world matrix.
- Changes do not appear on
obj.data.vertices. While in Edit Mode, the mesh data is not updated until you leave the mode or callupdate_edit_mesh. Use BMesh for reading and writing during the session.
Exercise
You have two cubes in the scene. Cube A is scaled to 3 on all axes. Cube B is unscaled. You select both, enter Edit Mode, select the top face of each, and run a script that adds Vector((0, 0, 1)) directly to each selected vertex's co. How far does each top face move in world space, and how should the script change so both move exactly one unit up?
Show answer
Cube A's face moves 3 world units, because the offset is in local space and the object is scaled by 3. Cube B's face moves 1 unit. To move both exactly one unit, convert the world-space direction into each object's local space with obj.matrix_world.to_3x3().inverted() @ Vector((0, 0, 1)) and add that result to each vertex.
Exercise
You duplicate a monkey mesh with Alt+D, select both copies, and enter Edit Mode. You move one vertex on the first copy. What happens on the second copy, and why would a script that loops over bpy.context.objects_in_mode risk double edits?
Show answer
The second copy changes the same way, because linked duplicates share one mesh data block. A loop over objects_in_mode visits both objects and so edits the same mesh twice. Looping over objects_in_mode_unique_data visits the shared mesh once.