diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-05-22 19:29:57 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-05-22 19:29:57 +0400 |
commit | 45265b326a2854a59327c3d171a3f4797944cc79 (patch) | |
tree | 2ecfd8b7b88de63bd0b4332b8d7fae130e0ce7b1 /source/blender/blenkernel | |
parent | 11309a19e2cdeaeed3a2462b1bcb4138084cd7bf (diff) |
Add operator to extract armature and vertex groups from skin.
* The operator creates bones for each input edge (does not subdivide
them like the skin operator does), adds a fake root bone for skin
roots with multiple children.
* The operator adds vertex weight groups to the original mesh.
* Make copy_object_transform() public, used to match the armature
object to the mesh object.
Skin modifier documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/SkinModifier
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_object.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/customdata.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index 1cdf2ee2e14..890fc40c284 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -53,6 +53,7 @@ struct MovieClip; void BKE_object_workob_clear(struct Object *workob); void BKE_object_workob_calc_parent(struct Scene *scene, struct Object *ob, struct Object *workob); +void BKE_object_transform_copy(struct Object *ob_tar, const struct Object *ob_src); struct SoftBody *copy_softbody(struct SoftBody *sb); struct BulletSoftBody *copy_bulletsoftbody(struct BulletSoftBody *sb); void BKE_object_copy_particlesystems(struct Object *obn, struct Object *ob); diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 645267fce34..04bce0a8f63 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -1168,7 +1168,7 @@ const CustomDataMask CD_MASK_DERIVEDMESH = CD_MASK_MLOOPUV | CD_MASK_MLOOPCOL | CD_MASK_MTEXPOLY | CD_MASK_PREVIEW_MLOOPCOL | CD_MASK_PROP_STR | CD_MASK_ORIGSPACE | CD_MASK_ORIGSPACE_MLOOP | CD_MASK_ORCO | CD_MASK_TANGENT | CD_MASK_PREVIEW_MCOL | CD_MASK_NORMAL | CD_MASK_SHAPEKEY | CD_MASK_RECAST | - CD_MASK_ORIGINDEX | CD_MASK_POLYINDEX; + CD_MASK_ORIGINDEX | CD_MASK_POLYINDEX | CD_MASK_MVERT_SKIN; const CustomDataMask CD_MASK_BMESH = CD_MASK_MLOOPUV | CD_MASK_MLOOPCOL | CD_MASK_MTEXPOLY | CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_PROP_FLT | CD_MASK_PROP_INT | diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 6f6881ce317..8de832e508d 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1090,7 +1090,7 @@ Object *BKE_object_pose_armature_get(Object *ob) return NULL; } -static void copy_object_transform(Object *ob_tar, Object *ob_src) +void BKE_object_transform_copy(Object *ob_tar, const Object *ob_src) { copy_v3_v3(ob_tar->loc, ob_src->loc); copy_v3_v3(ob_tar->rot, ob_src->rot); @@ -1365,7 +1365,7 @@ void BKE_object_make_proxy(Object *ob, Object *target, Object *gob) BKE_object_apply_mat4(ob, ob->obmat, FALSE, TRUE); } else { - copy_object_transform(ob, target); + BKE_object_transform_copy(ob, target); ob->parent = target->parent; /* libdata */ copy_m4_m4(ob->parentinv, target->parentinv); } |