Extensions:2.6/Py/Scripts/Object/Convert to Armature

提供: wiki
移動先: 案内検索
Convert Mesh to Armature
Generate an armature with a single bone controlling each face
UI location 3D View Panel > Object
Version 0.3 Author(s) Addam Dominec (Emu)
Blender 2.6.3 License GPL


Executable information
File name object_convert_to_armature.py
Current version download https://github.com/addam/Export-Paper-Model-from-Blender/
Python modules mathutils
External Python Modules or dependencies itertools, functools, math



Purpose

The script generates an armature controlling each face of the given mesh. When used along with the Paper Model Export script, it allows the user to animate an unfolding net. It can be used on its own too.

Installation

  • Download the file from Git repository
  • Launch Blender. In User Preferences (CtrlAltU), section Add-Ons, click the Install Add-On button below. Choose the file you downloaded. Then find an add-on called Object: Convert Mesh to Armature and enable it.

Usage

The script is not finished and therefore not user-friendly. In order to work properly, the mesh to be converted must have a tree-like structure. That can be achieved by this procedure:

  • Install the Paper Model Export script.
  • Select the mesh object to be converted so that it is the active object (outlined in yellow).
  • Run the Unfold operator (can be found in 3D View toolbox T or in the Spacebar menu).
  • Switch to Edit Mode and to Edge selection mode (⇆ Tab, Ctrl⇆ TabE).
  • Select any edge that is marked as Seam (shows in red).
  • Use Select SimilarSeam (⇧ ShiftGS).
  • Run the Edge Split operator. (If you have an older version of Blender, you might have to make a round trip using the Edge Split modifier.)
  • Optionally, select a face where the unfolding should start from.
  • Finally, run the Convert to Armature operator (3D View menu → ObjectConvert to Armature; or find it in the Spacebar menu)

The script starts to create an armature from the active face and spreads bones to all connected faces. If the faces are connected in a wrong way, a warning message shows up.

The script can handle polygons of 4 or more vertices. The limitation to keep in mind is that each two faces should be connected by a single edge only.

If the model already has a tree-like structure, you do not have to use the Paper Model Export script. In other cases you may wish to select the cuts by hand and use the Edge Split operator only.