== Align to Transform Orientation ==

New rotation alignement fonction

Rotates objects/Pose bones to match the selected transform orientation.

Can be used to align to view, active object (normal) and custom transform orientations.

Accessible in the Object -> Transform submenu and through the hotkey Ctrl-Alt-A (which was previously a fall through for Apply but only Ctrl-A and Ctrl-Shift-A did anything special).

Can be eventually made to work in edit mode (not too hard).
This commit is contained in:
2008-03-10 00:27:17 +00:00
parent 1a4f7a861e
commit cbfbe53ebe
5 changed files with 77 additions and 1 deletions

View File

@@ -1786,6 +1786,10 @@ static void do_view3d_transformmenu(void *arg, int event)
case 20:
G.scene->snap_target = SCE_SNAP_TARGET_ACTIVE;
break;
case 21:
initTransform(TFM_ALIGN, CTX_NO_PET|CTX_AUTOCONFIRM);
Transform();
break;
}
allqueue(REDRAWVIEW3D, 0);
}
@@ -1835,6 +1839,7 @@ static uiBlock *view3d_transformmenu(void *arg_unused)
if (!G.obedit) {
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Center New", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 11, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Center Cursor", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Align to Transform Orientation", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 21, "");
}
if (BIF_snappingSupported())