Refactor 'fit in camera view' code, and expose it to RNA.
authorBastien Montagne <montagne29@wanadoo.fr>
Sat, 3 Jan 2015 11:05:16 +0000 (12:05 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Sat, 3 Jan 2015 11:05:23 +0000 (12:05 +0100)
commit780bb88a7a5b30eaf8a62b999a30ac7bb4153ebf
tree621e1c05f686c3c522c31b0061202671fdc32139
parent16ed20ff3cc68589a5fe48075d2b80692d3c90ea
Refactor 'fit in camera view' code, and expose it to RNA.

This changes BKE's fitting code to use `BKE_camera_params_compute_viewplane` instead of
`BKE_camera_view_frame`. This allows that code to work with orthographic projection too.

Also, two funcs were added to rna's Object, to resp. get the projection matrix of that
object (mostly useful for cameras and lamps objects), and return position this object
should be to see all (to fit) a given set of points.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D961
source/blender/blenkernel/BKE_camera.h
source/blender/blenkernel/intern/camera.c
source/blender/blenlib/BLI_math_geom.h
source/blender/blenlib/intern/math_geom.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_api.c