diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-10-10 13:00:47 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-10-10 13:00:47 +0400 |
commit | 87b186e6e74e1f468655aed794edeb32d47c3359 (patch) | |
tree | 8c27dd1366743302db7780c7a7e238e07f6d2170 /source/blender/blenloader | |
parent | da792a426ad8a842e497d8d9bf3667b95a2f66de (diff) |
Make B-Bones not deform in rest position by default.
B-Bones already deformed the mesh in the armature rest position, which is
unconvenient. For backwards compatibility existing .blend files still have
a button for the old behavior enabled.
(peach feature request)
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 4f33a90daef..487cce9e44f 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -6750,6 +6750,21 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } + if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 4)) { + bArmature *arm; + ModifierData *md; + Object *ob; + + for(arm= main->armature.first; arm; arm= arm->id.next) + arm->deformflag |= ARM_DEF_B_BONE_REST; + + for(ob = main->object.first; ob; ob= ob->id.next) + for(md=ob->modifiers.first; md; md=md->next) + if(md->type==eModifierType_Armature) + ((ArmatureModifierData*)md)->deformflag |= ARM_DEF_B_BONE_REST; + } + + /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ /* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */ |