Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2005-08-24 00:19:01 +0400
committerTon Roosendaal <ton@blender.org>2005-08-24 00:19:01 +0400
commitad9099ea5d7700d53bf9595118ad6fc59b04872a (patch)
tree22c36d0448bf7cabcdd39668f4aaea6b4382dc0f /source/blender/src/editarmature.c
parent7396075ef1a23d63e0659010b7d86e55f4c6ebce (diff)
Fix for reading older files... it didn't always convert OK for the new
deformation options of Armatures, causing bones not to deform. It was caused by using the old "boneclass" variable and SKINNABLE. Apparently the boneclass can have any value in older files. Will be killed. Please note; in files created after last sunday, with setting "No deform" on a Bone, that setting has to be done again.
Diffstat (limited to 'source/blender/src/editarmature.c')
-rw-r--r--source/blender/src/editarmature.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c
index 511a49b37e3..5980ffcee48 100644
--- a/source/blender/src/editarmature.c
+++ b/source/blender/src/editarmature.c
@@ -1181,7 +1181,6 @@ static EditBone *add_editbone(void)
bone->rad_head= 0.25;
bone->rad_tail= 0.1;
bone->segments= 1;
- bone->boneclass = BONE_SKINNABLE;
return bone;
}
@@ -2017,7 +2016,7 @@ int ik_chain_looper(Object *ob, Bone *bone, void *data,
static int bone_skinnable(Object *ob, Bone *bone, void *data)
{
- /* Bones that are not of boneclass BONE_UNSKINNABLE
+ /* Bones that are deforming
* are regarded to be "skinnable" and are eligible for
* auto-skinning.
*
@@ -2041,7 +2040,7 @@ static int bone_skinnable(Object *ob, Bone *bone, void *data)
*/
Bone ***hbone;
- if ( bone->boneclass != BONE_UNSKINNABLE ) {
+ if (!(bone->flag & BONE_NO_DEFORM)) {
if (data != NULL) {
hbone = (Bone ***) data;
**hbone = bone;
@@ -2058,7 +2057,7 @@ static int add_defgroup_unique_bone(Object *ob, Bone *bone, void *data)
* same name as bone (provided the bone is skinnable).
* If such a vertex group aleady exist the routine exits.
*/
- if ( bone_skinnable(ob, bone, NULL) ) {
+ if (!(bone->flag & BONE_NO_DEFORM)) {
if (!get_named_vertexgroup(ob,bone->name)) {
add_defgroup_name(ob, bone->name);
return 1;