Objects with a Pose, but which is not an armature, crashes on duplicating.

Now have to find out how it can happen even... only Armatures uses poses.
This commit is contained in:
Ton Roosendaal 2006-04-17 14:26:41 +00:00
parent 904a0792f7
commit fa5f95efa5

@ -878,7 +878,9 @@ Object *copy_object(Object *ob)
if(ob->pose) {
copy_pose(&obn->pose, ob->pose, 1);
armature_rebuild_pose(obn, obn->data);
/* backwards compat... non-armatures can get poses in older files? */
if(ob->type==OB_ARMATURE)
armature_rebuild_pose(obn, obn->data);
}
copy_defgroups(&obn->defbase, &ob->defbase);
copy_nlastrips(&obn->nlastrips, &ob->nlastrips);