1
$\begingroup$

I need a keyboard shortcut to align the selected objects relative to an specific axis, for example, X.

Currently I have a keyboard shortcut to do this, however, note the option "Relative to: selection/active/..." If I set to "selection", the X coordinate of the objects will be the average between the selection, which is useful sometimes, but sometimes I need to align to the active object. If I set to "active", it will fail and throw an error if there is no active object (only selected objects, which happens when you drag a selection box).

Align object keyboard shortcut For me, it should be obvious that the behaviour of alignment is dependent on whether you have selected and/or active objects, but it is what it is.

I can think of two solutions:

  • Configure blender to always make one object active in the selection (is there a way to do it?)
  • Configure a shortcut to a python script that does the alignment automatically (I don't know exactly how to set a shortcut to a python script)

The simpler the solution, the better.

$\endgroup$
2
  • $\begingroup$ I'm probably misunderstanding something. But you mention using a selection box. Couldn't you just click on the object you want to align to, to make it the active object and then use the selection box for the objects you want to align with it? Then use your shortcut key? $\endgroup$
    – curious_1
    Commented Sep 22, 2023 at 23:53
  • $\begingroup$ That's the current state of things, but it is cumbersome. I want to just not have to think whether one of them is active. If I only have selected objects and none of them is active, just align them. $\endgroup$
    – lucas.mior
    Commented Sep 23, 2023 at 3:44

0

You must log in to answer this question.

Browse other questions tagged .