Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2007-03-23 16:12:11 +0300
committerTon Roosendaal <ton@blender.org>2007-03-23 16:12:11 +0300
commitbc31d61c3b1817916a77d7b0244de3f1973388e9 (patch)
tree1b7362e0dabf242164d5dd64710e81d71898bd06 /source/blender/blenloader
parentc448d2d3a57ed22ddf60fdbca61f3ac6969eabce (diff)
patch 5341 by Juho
This adds option to show camera angle instead of camera lens value. (Complete revised patch...)
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 9aebcd75116..5a5c4ab5591 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6368,6 +6368,14 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
}
+ if(main->versionfile <= 243) {
+ Camera *cam = main->camera.first;
+
+ for(; cam; cam= cam->id.next) {
+ cam->angle= 360.0f * atan(16.0f/cam->lens) / M_PI;
+ printf("cam angle %f lens %f\n", cam->angle, cam->lens);
+ }
+ }
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */