diff options
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index b23be6917ac..9125a255333 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -10877,14 +10877,15 @@ static void do_versions(FileData *fd, Library *lib, Main *main) /* parent type to modifier */ for(ob = main->object.first; ob; ob = ob->id.next) { if(ob->parent) { - Object *parent= newlibadr(fd, lib, ob->parent); + Object *parent= (Object *)newlibadr(fd, lib, ob->parent); if(parent->type==OB_ARMATURE && ob->partype==PARSKEL) { ArmatureModifierData *amd; + bArmature *arm= (bArmature *)newlibadr(fd, lib, parent->data); amd = (ArmatureModifierData*) modifier_new(eModifierType_Armature); amd->object = ob->parent; BLI_addtail((ListBase*)&ob->modifiers, amd); - amd->deformflag= ((bArmature *)(parent->data))->deformflag; + amd->deformflag= arm->deformflag; ob->partype = PAROBJECT; } else if(parent->type==OB_LATTICE && ob->partype==PARSKEL) { |