== Bone Roll - Align to Cursor ==

In this commit, a new way to set the bone roll is introduced. It aligns the z-axis of the selected bone(s) to the 3D-Cursor, so that the cursor intersects with the YZ plane. 

This makes it easier to align bone rolls to a target, for use in rigs where arms/legs are not horizontal/vertical. To use this, just press Ctrl N, and choose the "Align Z-Axis to 3D-Cursor" option.

Credits go to Robert Christian (wavez) for providing the method as a working BPy script, that demonstrated this in action.
This commit is contained in:
2007-08-03 11:16:12 +00:00
parent 834e64e0e6
commit fa5b4954a2
5 changed files with 110 additions and 41 deletions

View File

@@ -2080,9 +2080,10 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
else if(G.obedit) {
switch (G.obedit->type){
case OB_ARMATURE:
if(G.qual==LR_CTRLKEY){
if (okee("Recalculate bone roll angles")) {
auto_align_armature();
if(G.qual==LR_CTRLKEY) {
pupval= pupmenu("Recalculate Bone Roll Angles%t|Clear Roll (Z-Axis Up) %x1|Align Z-Axis to 3D-Cursor %x2");
if (pupval > 0) {
auto_align_armature(pupval - 1);
allqueue(REDRAWVIEW3D, 0);
}
}