Orient bone shapes

Orient bone shapes

This addon adds 4 operators to Blender, available from the pose mode context menu (right click, or W key, depending on keymap). This addon is for Blender 2.8 only. For 2.79 and earlier, see the original addon linked below.

Set and align bone shape

Sets the selected bone’s custom bone shape to the selected object, and transforms the shape object to keep the bone shape in the same position as the shape object is.

Set and align

Align bone shape

Transforms the bone shape object of the selected bone to keep the bone shape in the same position as the shape object is.

Extract custom shape

Creates a duplicate of the shape object of the selected bone.

Extract bone shape

Snap to bone

Aligns the origin, rotation and scale of the selected object to the selected bone.

Snap to bone

This addon is based on the original orient bone shapes script found at https://developer.blender.org/F207430

4 Likes

Very usefull addons… thank you.

1 Like

Thank you for providing the 2.8 update.
This add-on always saved me.

Improvement Report

1. Bone axis display problem

I noticed one inconvenience while using Orient Bone Shapes.
I usually check the axes of bones by activating the Axes option in the armature property to make sure the constraints work properly when rigging.
0 viewportDisplayAxes


However, the current commands of Orient Bone Shapes makes the scale of mesh object to 1 and disable the bone size option so that Axes will appear in the wrong place.
Check out the gif below.
1 axis problem.gif


2. Fix bone axis display

To correct the incorrect axes display due to the command of Orient Bone Shapes, the following procedure should be performed.

  1. Copy the bone length value
  2. Paste the length value to the scale value of the mesh object
  3. Check the bone size option of this property

2 debug axis problem.gif


3. Optimal operation in the current version

The process above returns the bone axis to the correct position, but changes the scale of the custom shape I created. so I am currently using Orient Bone Shapes in the following order.

  1. Copy the bone length value
  2. Create mash object for custom shape
  3. Select bone, pose mode
  4. Select bone, execute ‘snap to bone’
  5. Paste the length value to the scale of the mesh object (because the snap to bone command scales the mesh object to 1, execute the snap to bone command first in step 4).
  6. Check the custom object eyedropper and bone size in the bone properties
  7. Edit mesh object to get custome bone shape

3 right way.gif


Conclusion

So my final suggestion is:

  1. Match all bone length to mesh objects scale
  2. and active Bone Size option of bone properties tab when all Orient Bone Shapes commands are executed.

We will enjoy the powerful features of Orient Bone Shapes while the bone axes are in the right place.

Hey, I forked the repo to implement those changes.
The bone’s length is now taken into account.
orient_bone_shapes
Let me know how it works out for you.
If all goes well, I’ll send a pull request… although, the repo hasn’t been updated in 9 months. :thinking:

1 Like

Amazing.
Your revision reflects my intentions!!


I tested your revision and found one minor improvement issue for the Snap to Bone command.

The improvement method is to execute ‘Apply (Scale)’ command of ‘Ctrl + A’ shortcut key once before matching the direction between the object and the bone.

I’ll explain more details below.


1. problem

  1. Add a cylinder and change the object transform to create a custom bone shape.
  2. Orient Bone Shapes will align the direction between the mesh and bone, but the transform will be lost.

4 scale issue

2. How to Improve

  1. Run Apply (Scale) before executing Orient Bone Shapdes.
  2. Orient Bone Shapes command aligns the orientation and maintains the shape without losing the transform.

5 scale issue method

I’m still around. Happy to accept a pull request.

@Scaredyfish Thanks! I’ve just sent it!

@Sunghoon-Jung
Object scale is now maintained when invoking Snap to bone
orient_bone_shapes__maintain_scale

@Scaredyfish @Travisty
Thank you guys.
We will get pretty rig widgets more conveniently.
I look forward to the latest version update.