Merge branch 'master' into soc-2013-depsgraph_mt
[blender.git] / source / blender / blenkernel / intern / object.c
index 26684d19507e05ad0c355e00386dbd8d5f6d453b..711065b0e8b2d481b88632eb4796b42cc11206e1 100644 (file)
@@ -321,7 +321,7 @@ void BKE_object_free_derived_caches(Object *ob)
 }
 
 /* do not free object itself */
-void BKE_object_free(Object *ob)
+void BKE_object_free_ex(Object *ob, bool do_id_user)
 {
        int a;
        
@@ -364,7 +364,7 @@ void BKE_object_free(Object *ob)
        if (ob->defbase.first)
                BLI_freelistN(&ob->defbase);
        if (ob->pose)
-               BKE_pose_free(ob->pose);
+               BKE_pose_free_ex(ob->pose, do_id_user);
        if (ob->mpath)
                animviz_free_motionpath(ob->mpath);
        BKE_bproperty_free_list(&ob->prop);
@@ -399,6 +399,11 @@ void BKE_object_free(Object *ob)
        }
 }
 
+void BKE_object_free(Object *ob)
+{
+       BKE_object_free_ex(ob, true);
+}
+
 static void unlink_object__unlinkModifierLinks(void *userData, Object *ob, Object **obpoin)
 {
        Object *unlinkOb = userData;