7
$\begingroup$

Object's local pivot point has been reset to Global. How can I change it back to local Normals i.e coresponding with the object's Face Normal?

$\endgroup$

2 Answers 2

10
$\begingroup$

Quite a few possible ways.. here's one:

  1. Select a face of the object, whose normal you want to be Object Z, and in the Header > Transform Orientations dropdown, hit the little '+' to create a Custom Orientation from it.
  2. In the Object Mode Header > Options menu, check 'Origins' (version 2.81+)
  3. With the object (and therefore its axis) selected, Header > Object > Transform > Align to Transform Orientation, selecting the orientation you have just created, from the dropdown in the 'Adjust Last Operation' Panel.

(and don't forget to switch the 'Origins' option off again ;) )

You can actually create a Custom Orientation from any 3 vertices. Or determine Y down an edge, or from any 2 vertices. In both of those cases, though, you might be 180 degrees out; the selection is not ordered.

$\endgroup$
8
  • 2
    $\begingroup$ As @vklidu commented somewhere, you can also snap the origin to a face. It will match the rotation :). $\endgroup$ Commented Aug 28, 2020 at 10:41
  • 1
    $\begingroup$ @JachymMichal Sure, and then you have to put the pesky thing back where it came from.. but with the cursor and a bit of forethought, that's no great shakes.. (I'm thinking not-a-convenient-cube) :) $\endgroup$
    – Robin Betts
    Commented Aug 28, 2020 at 10:43
  • $\begingroup$ Thankyou Robin Betts, your answer helped me out a lot! $\endgroup$
    – mac17
    Commented Aug 28, 2020 at 12:07
  • 1
    $\begingroup$ once you've clicked on Align to Transform Orientation, don't you need to choose the custom axis in the Operator box? $\endgroup$
    – moonboots
    Commented Nov 15, 2020 at 10:44
  • $\begingroup$ I don't know about this Use after Creation, is it a preference? $\endgroup$
    – moonboots
    Commented Nov 15, 2020 at 10:58
1
$\begingroup$

We can also automate @Robin Betts' answer. Simply paste the following script into the Text Editor. In Edit Mode, select the Face whose Normal you want the Origin's z-axis to align to and click Run Script:

import bpy

area_type = 'VIEW_3D'
areas  = [area for area in bpy.context.window.screen.areas if area.type == area_type]
bpy.context.scene.tool_settings.use_transform_data_origin = True

with bpy.context.temp_override(area=areas[0]):
    bpy.ops.transform.create_orientation(use=True)
    bpy.ops.object.editmode_toggle()
    transform_type = bpy.context.scene.transform_orientation_slots[0].type
    bpy.ops.transform.transform(mode='ALIGN', orient_type='Face', orient_matrix_type=transform_type, mirror=False, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', use_proportional_connected=False, use_proportional_projected=False, snap=False, snap_elements={'INCREMENT'}, use_snap_project=False, snap_target='ACTIVE', use_snap_self=True, use_snap_edit=True, use_snap_nonedit=True, use_snap_selectable=False)
    bpy.ops.transform.delete_orientation()

enter image description here

$\endgroup$

You must log in to answer this question.

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