Blender  V2.93
DNA_camera_defaults.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #pragma once
22 
23 /* Struct members on own line. */
24 /* clang-format off */
25 
26 /* -------------------------------------------------------------------- */
30 #define _DNA_DEFAULT_CameraDOFSettings \
31  { \
32  .aperture_fstop = 2.8f, \
33  .aperture_ratio = 1.0f, \
34  .focus_distance = 10.0f, \
35  }
36 
37 #define _DNA_DEFAULT_CameraStereoSettings \
38  { \
39  .interocular_distance = 0.065f, \
40  .convergence_distance = 30.0f * 0.065f, \
41  .pole_merge_angle_from = DEG2RADF(60.0f), \
42  .pole_merge_angle_to = DEG2RADF(75.0f), \
43  }
44 
45 #define _DNA_DEFAULT_Camera \
46  { \
47  .lens = 50.0f, \
48  .sensor_x = DEFAULT_SENSOR_WIDTH, \
49  .sensor_y = DEFAULT_SENSOR_HEIGHT, \
50  .clip_start = 0.1f, \
51  .clip_end = 1000.0f, \
52  .drawsize = 1.0f, \
53  .ortho_scale = 6.0, \
54  .flag = CAM_SHOWPASSEPARTOUT, \
55  .passepartalpha = 0.5f, \
56  \
57  .dof = _DNA_DEFAULT_CameraDOFSettings, \
58  \
59  .stereo = _DNA_DEFAULT_CameraStereoSettings, \
60  }
61 
64 /* clang-format on */