Add skin modifier: DNA, RNA, UI, and MOD_skin.c implementation.

Skin modifier documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/SkinModifier

Implementation based in part off the paper "B-Mesh: A Fast Modeling
System for Base Meshes of 3D Articulated Shapes" (Zhongping Ji,
Ligang Liu, Yigang Wang)

Note that to avoid confusion with Blender's BMesh data structure,
this tool is renamed as the Skin modifier.

The B-Mesh paper is current available here:
http://www.math.zju.edu.cn/ligangliu/CAGD/Projects/BMesh/

The main missing features in this code compared to the paper are:

* No mesh evolution. The paper suggests iteratively subsurfing the
  skin output and adapting the output to better conform with the
  spheres of influence surrounding each vertex.

* No mesh fairing. The paper suggests re-aligning output edges to
  follow principal mesh curvatures.

* No auxiliary balls. These would serve to influence mesh
  evolution, which as noted above is not implemented.

The code also adds some features not present in the paper:

* Loops in the input edge graph.

* Concave surfaces around branch nodes. The paper does not discuss
  how to handle non-convex regions; this code adds a number of
  cleanup operations to handle many (though not all) of these
  cases.
This commit is contained in:
Nicholas Bishop
2012-05-22 15:29:01 +00:00
parent f7b116e0bd
commit 8801330c18
8 changed files with 1949 additions and 0 deletions

View File

@@ -959,5 +959,29 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
layout.separator()
self.vertex_weight_mask(layout, ob, md)
def SKIN(self, layout, ob, md):
layout.operator("object.skin_armature_create", text="Create Armature")
layout.separator()
layout.prop(md, "branch_smoothing")
layout.prop(md, "use_smooth_shade")
layout.label(text="Selected Vertices:")
split = layout.split()
col = split.column(align=True)
col.operator("object.skin_loose_mark_clear", text="Mark Loose").action = "MARK"
col.operator("object.skin_loose_mark_clear", text="Clear Loose").action = "CLEAR"
col = split.column()
col.operator("object.skin_root_mark", text="Mark Root")
col.operator("object.skin_radii_equalize", text="Equalize Radii")
layout.label(text="Symmetry Axes:")
col = layout.column()
col.prop(md, "use_x_symmetry")
col.prop(md, "use_y_symmetry")
col.prop(md, "use_z_symmetry")
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)