diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-24 18:48:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-24 18:48:08 +0400 |
commit | 1da7d7d1a0a4297cf6b09758c01f98f50543993f (patch) | |
tree | b527f096a58fdc5a74783f9506400b0e147b962b /source/blender/blenkernel | |
parent | 5c9d1ec080c959bfe06ac17c91d5324a3c9b7349 (diff) |
use bool for new code.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_action.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/action.c | 8 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 6 |
3 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h index 2d20672a015..4f54f93a7fc 100644 --- a/source/blender/blenkernel/BKE_action.h +++ b/source/blender/blenkernel/BKE_action.h @@ -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); diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 1aceca0bbd5..5ccf9146440 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -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 diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 555fa0791fd..b5e82586f5a 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -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); |