diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-19 17:28:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-19 17:28:19 +0400 |
commit | af3e348430218e609c80d86c8dd418bed15e70e8 (patch) | |
tree | a93e0453c8fe47a954594060cc5bbda90214a7f3 /source/blender/blenlib/intern | |
parent | 2f5173887e0c7f6ba19664f16b177e575d82a241 (diff) |
code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars.
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/BLI_args.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/uvproject.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenlib/intern/BLI_args.c b/source/blender/blenlib/intern/BLI_args.c index 4e194b24c1e..785c9f9f32b 100644 --- a/source/blender/blenlib/intern/BLI_args.c +++ b/source/blender/blenlib/intern/BLI_args.c @@ -240,7 +240,7 @@ void BLI_argsPrintArgDoc(struct bArgs *ba, const char *arg) internalDocPrint(d); - d->done = 1; + d->done = TRUE; } } diff --git a/source/blender/blenlib/intern/uvproject.c b/source/blender/blenlib/intern/uvproject.c index 18c69bd2ba8..1b59dc6a3f5 100644 --- a/source/blender/blenlib/intern/uvproject.c +++ b/source/blender/blenlib/intern/uvproject.c @@ -58,7 +58,7 @@ void BLI_uvproject_from_camera(float target[2], float source[3], ProjCameraInfo if (uci->do_pano) { float angle = atan2f(pv4[0], -pv4[2]) / ((float)M_PI * 2.0f); /* angle around the camera */ - if (uci->do_persp == 0) { + if (uci->do_persp == FALSE) { target[0] = angle; /* no correct method here, just map to 0-1 */ target[1] = pv4[1] / uci->camsize; } @@ -74,7 +74,7 @@ void BLI_uvproject_from_camera(float target[2], float source[3], ProjCameraInfo if (pv4[2] == 0.0f) pv4[2] = 0.00001f; /* don't allow div by 0 */ - if (uci->do_persp == 0) { + if (uci->do_persp == FALSE) { target[0] = (pv4[0] / uci->camsize); target[1] = (pv4[1] / uci->camsize); } @@ -154,10 +154,10 @@ ProjCameraInfo *BLI_uvproject_camera_info(Object *ob, float(*rotmat)[4], float w /* normal projection */ if (rotmat) { copy_m4_m4(uci.rotmat, rotmat); - uci.do_rotmat = 1; + uci.do_rotmat = TRUE; } else { - uci.do_rotmat = 0; + uci.do_rotmat = FALSE; } /* also make aspect ratio adjustment factors */ |