1
$\begingroup$

I have multiple objects selected and in edit mode. I select a bunch of vertices across all the objects and I would like to set their position in one axis to some value via the transform menu, just as I can do so within a single object. This, however, affects vertices of only one object (the active one). Is it possible to set position like this such that it affects all selected vertices across all objects involved (as if I were editing one object)?

The only workaround I have been able to come up with is to calculate the movement needed to achieve the desired position and then just move the vertices as the move tool indeed affects all selected vertices, but that is tedious and breaks productivity.

$\endgroup$

1 Answer 1

1
$\begingroup$

Method 1: Align

Scale x to 0

enter image description here

Method 2: Script

enter image description here

Set vertices position from Local Space

import bpy

# Local space
def set_vert_pos_local(data, x=None, y=None, z=None):
    for v in data.vertices:
        if v.select:
            if x is not None:   v.co.x = x
            if y is not None:   v.co.y = y
            if z is not None:   v.co.z = z

bpy.ops.object.mode_set(mode = 'OBJECT')
obj = bpy.context.object
data = obj.data
set_vert_pos_local(data, 0, None, None)  # < choose position here
bpy.ops.object.mode_set(mode = 'EDIT')

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .