[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54080] trunk/blender/source/blender: use bool for new code.

Campbell Barton ideasman42 at gmail.com
Thu Jan 24 15:48:13 CET 2013


Revision: 54080
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54080
Author:   campbellbarton
Date:     2013-01-24 14:48:08 +0000 (Thu, 24 Jan 2013)
Log Message:
-----------
use bool for new code.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/BKE_action.h
    trunk/blender/source/blender/blenkernel/intern/action.c
    trunk/blender/source/blender/blenkernel/intern/object.c
    trunk/blender/source/blender/makesrna/intern/rna_action.c

Modified: trunk/blender/source/blender/blenkernel/BKE_action.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_action.h	2013-01-24 14:36:02 UTC (rev 54079)
+++ trunk/blender/source/blender/blenkernel/BKE_action.h	2013-01-24 14:48:08 UTC (rev 54080)
@@ -220,7 +220,7 @@
 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);
 

Modified: trunk/blender/source/blender/blenkernel/intern/action.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/action.c	2013-01-24 14:36:02 UTC (rev 54079)
+++ trunk/blender/source/blender/blenkernel/intern/action.c	2013-01-24 14:48:08 UTC (rev 54080)
@@ -1118,18 +1118,18 @@
 }
 
 /* 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 @@
 			pchanto->protectflag = pchanfrom->protectflag;
 		}
 	}
-	return 1;
+	return true;
 }
 
 /* For the calculation of the effects of an Action at the given frame on an object 

Modified: trunk/blender/source/blender/blenkernel/intern/object.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/object.c	2013-01-24 14:36:02 UTC (rev 54079)
+++ trunk/blender/source/blender/blenkernel/intern/object.c	2013-01-24 14:48:08 UTC (rev 54080)
@@ -2711,8 +2711,10 @@
 
 				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);

Modified: trunk/blender/source/blender/makesrna/intern/rna_action.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_action.c	2013-01-24 14:36:02 UTC (rev 54079)
+++ trunk/blender/source/blender/makesrna/intern/rna_action.c	2013-01-24 14:48:08 UTC (rev 54080)
@@ -39,6 +39,8 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "BLI_utildefines.h"
+
 #include "BKE_action.h"
 
 #include "WM_types.h"




More information about the Bf-blender-cvs mailing list