use bool for new code.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 24 Jan 2013 14:48:08 +0000 (14:48 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 24 Jan 2013 14:48:08 +0000 (14:48 +0000)
source/blender/blenkernel/BKE_action.h
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/object.c
source/blender/makesrna/intern/rna_action.c

index 2d20672a0159a70e33f5f8c5aa0cf108330c4518..4f54f93a7fc891d5552ff3c2a9609a0374cc0604 100644 (file)
@@ -220,7 +220,7 @@ void BKE_pose_remove_group(struct Object *ob);
 void what_does_obaction(struct Object *ob, struct Object *workob, struct bPose *pose, struct bAction *act, char groupname[], float cframe);
 
 /* for proxy */
-int BKE_pose_copy_result(struct bPose *to, struct bPose *from);
+bool BKE_pose_copy_result(struct bPose *to, struct bPose *from);
 /* clear all transforms */
 void BKE_pose_rest(struct bPose *pose);
 
index 1aceca0bbd5b1223982888aff30b2fc7f5fcbb88..5ccf91464405a22565e21931e3c6fdacda081d06 100644 (file)
@@ -1118,18 +1118,18 @@ void BKE_pose_rest(bPose *pose)
 }
 
 /* both poses should be in sync */
-int BKE_pose_copy_result(bPose *to, bPose *from)
+bool BKE_pose_copy_result(bPose *to, bPose *from)
 {
        bPoseChannel *pchanto, *pchanfrom;
        
        if (to == NULL || from == NULL) {
                printf("Pose copy error, pose to:%p from:%p\n", (void *)to, (void *)from); /* debug temp */
-               return 0;
+               return false;
        }
 
        if (to == from) {
                printf("BKE_pose_copy_result source and target are the same\n");
-               return 0;
+               return false;
        }
 
 
@@ -1153,7 +1153,7 @@ int BKE_pose_copy_result(bPose *to, bPose *from)
                        pchanto->protectflag = pchanfrom->protectflag;
                }
        }
-       return 1;
+       return true;
 }
 
 /* For the calculation of the effects of an Action at the given frame on an object 
index 555fa0791fdb6c5d8d5f6572a6679e96f12f3bbf..b5e82586f5a33a11dba03cebd741326e734a368a 100644 (file)
@@ -2711,8 +2711,10 @@ void BKE_object_handle_update(Scene *scene, Object *ob)
 
                                case OB_ARMATURE:
                                        if (ob->id.lib && ob->proxy_from) {
-                                               if (0 == BKE_pose_copy_result(ob->pose, ob->proxy_from->pose))
-                                                       printf("Proxy copy error, lib Object: %s proxy Object: %s\n", ob->id.name+2, ob->proxy_from->id.name+2);
+                                               if (BKE_pose_copy_result(ob->pose, ob->proxy_from->pose) == false) {
+                                                       printf("Proxy copy error, lib Object: %s proxy Object: %s\n",
+                                                              ob->id.name + 2, ob->proxy_from->id.name + 2);
+                                               }
                                        }
                                        else {
                                                BKE_pose_where_is(scene, ob);
index 07c394ae4d81482f994a990f56194174393aea19..bf6faa3f2cc6555479ada493dd7ced3ffd5aa27b 100644 (file)
@@ -39,6 +39,8 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "BLI_utildefines.h"
+
 #include "BKE_action.h"
 
 #include "WM_types.h"