Blender  V2.93
DNA_camera_types.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  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 
24 #pragma once
25 
26 #include "DNA_ID.h"
27 #include "DNA_defs.h"
28 #include "DNA_gpu_types.h"
29 #include "DNA_image_types.h"
30 #include "DNA_movieclip_types.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 struct AnimData;
37 struct Ipo;
38 struct Object;
39 
40 /* ------------------------------------------- */
41 /* Stereo Settings */
42 typedef struct CameraStereoSettings {
46  short pivot;
47  short flag;
48  char _pad[2];
49  /* Cut-off angle at which interocular distance start to fade down. */
51  /* Cut-off angle at which interocular distance stops to fade down. */
54 
55 /* Background Picture */
56 typedef struct CameraBGImage {
57  struct CameraBGImage *next, *prev;
58 
59  struct Image *ima;
60  struct ImageUser iuser;
61  struct MovieClip *clip;
62  struct MovieClipUser cuser;
63  float offset[2], scale, rotation;
64  float alpha;
65  short flag;
66  short source;
68 
70 typedef struct CameraDOFSettings {
78  short flag;
79  char _pad[2];
81 
82 typedef struct Camera_Runtime {
83  /* For draw manager. */
84  float drw_corners[2][4][2];
85  float drw_tria[2][2];
86  float drw_depth[2];
87  float drw_focusmat[4][4];
88  float drw_normalmat[4][4];
90 
91 typedef struct Camera {
92  ID id;
94  struct AnimData *adt;
95 
97  char type;
99  char dtx;
100  short flag;
105  float shiftx, shifty;
106  float dof_distance DNA_DEPRECATED;
107 
109  struct Ipo *ipo DNA_DEPRECATED;
110 
111  struct Object *dof_ob DNA_DEPRECATED;
112  struct GPUDOFSettings gpu_dof DNA_DEPRECATED;
113  struct CameraDOFSettings dof;
114 
115  /* CameraBGImage reference images */
116  struct ListBase bg_images;
117 
119  char _pad[7];
120 
121  /* Stereo settings */
123 
127 
128 /* **************** CAMERA ********************* */
129 
130 /* type */
131 enum {
134  CAM_PANO = 2,
135 };
136 
137 /* dtx */
138 enum {
139  CAM_DTX_CENTER = (1 << 0),
141  CAM_DTX_THIRDS = (1 << 2),
142  CAM_DTX_GOLDEN = (1 << 3),
147 };
148 
149 /* flag */
150 enum {
151  CAM_SHOWLIMITS = (1 << 0),
152  CAM_SHOWMIST = (1 << 1),
155  CAM_SHOWNAME = (1 << 4),
156  CAM_ANGLETOGGLE = (1 << 5),
157  CAM_DS_EXPAND = (1 << 6),
159  CAM_PANORAMA = (1 << 7), /* deprecated */
160 #endif
161  CAM_SHOWSENSOR = (1 << 8),
163  CAM_SHOW_BG_IMAGE = (1 << 10),
164 };
165 
166 /* Sensor fit */
167 enum {
171 };
172 
173 #define DEFAULT_SENSOR_WIDTH 36.0f
174 #define DEFAULT_SENSOR_HEIGHT 24.0f
175 
176 /* stereo->convergence_mode */
177 enum {
181 };
182 
183 /* stereo->pivot */
184 enum {
188 };
189 
190 /* stereo->flag */
191 enum {
192  CAM_S3D_SPHERICAL = (1 << 0),
193  CAM_S3D_POLE_MERGE = (1 << 1),
194 };
195 
196 /* CameraBGImage->flag */
197 /* may want to use 1 for select ? */
198 enum {
203 
204  /* Camera framing options */
205  CAM_BGIMG_FLAG_CAMERA_ASPECT = (1 << 5), /* don't stretch to fit the camera view */
206  CAM_BGIMG_FLAG_CAMERA_CROP = (1 << 6), /* crop out the image */
207 
208  /* Axis flip options */
211 };
212 
213 /* CameraBGImage->source */
214 /* may want to use 1 for select ?*/
215 enum {
218 };
219 
220 /* CameraDOFSettings->flag */
221 enum {
222  CAM_DOF_ENABLED = (1 << 0),
223 };
224 
225 #ifdef __cplusplus
226 }
227 #endif
ID and Library types, which are fundamental for sdna.
@ CAM_DOF_ENABLED
@ CAM_DTX_GOLDEN_TRI_A
@ CAM_DTX_CENTER
@ CAM_DTX_HARMONY_TRI_A
@ CAM_DTX_GOLDEN
@ CAM_DTX_GOLDEN_TRI_B
@ CAM_DTX_HARMONY_TRI_B
@ CAM_DTX_CENTER_DIAG
@ CAM_DTX_THIRDS
@ CAM_SHOWLIMITS
@ CAM_DS_EXPAND
@ CAM_SHOW_BG_IMAGE
@ CAM_SHOWPASSEPARTOUT
@ CAM_SHOW_SAFE_MARGINS
@ CAM_SHOW_SAFE_CENTER
@ CAM_SHOWMIST
@ CAM_ANGLETOGGLE
@ CAM_SHOWNAME
@ CAM_SHOWSENSOR
struct Camera_Runtime Camera_Runtime
struct Camera Camera
@ CAM_BGIMG_SOURCE_IMAGE
@ CAM_BGIMG_SOURCE_MOVIE
struct CameraStereoSettings CameraStereoSettings
@ CAM_BGIMG_FLAG_FLIP_X
@ CAM_BGIMG_FLAG_FLIP_Y
@ CAM_BGIMG_FLAG_CAMERA_CROP
@ CAM_BGIMG_FLAG_CAMERACLIP
@ CAM_BGIMG_FLAG_CAMERA_ASPECT
@ CAM_BGIMG_FLAG_DISABLED
@ CAM_BGIMG_FLAG_FOREGROUND
@ CAM_BGIMG_FLAG_EXPANDED
@ CAM_S3D_PIVOT_CENTER
@ CAM_S3D_PIVOT_RIGHT
@ CAM_S3D_PIVOT_LEFT
@ CAM_PERSP
@ CAM_PANO
@ CAM_ORTHO
@ CAM_S3D_PARALLEL
@ CAM_S3D_OFFAXIS
@ CAM_S3D_TOE
struct CameraBGImage CameraBGImage
@ CAMERA_SENSOR_FIT_HOR
@ CAMERA_SENSOR_FIT_AUTO
@ CAMERA_SENSOR_FIT_VERT
@ CAM_S3D_SPHERICAL
@ CAM_S3D_POLE_MERGE
struct CameraDOFSettings CameraDOFSettings
#define DNA_DEPRECATED_ALLOW
Definition: action.c:32
struct CameraBGImage * next
struct CameraBGImage * prev
struct MovieClip * clip
struct ImageUser iuser
struct MovieClipUser cuser
struct Image * ima
struct Object * focus_object
float drw_focusmat[4][4]
float drw_corners[2][4][2]
float drw_normalmat[4][4]
float drw_tria[2][2]
float clip_end
char sensor_fit
float sensor_y
Camera_Runtime runtime
struct ListBase bg_images
float shiftx
struct CameraStereoSettings stereo
char _pad[7]
float passepartalpha
struct AnimData * adt
float dof_distance DNA_DEPRECATED
float sensor_x
float clip_start
float shifty
float drawsize
struct CameraDOFSettings dof
struct Ipo *ipo DNA_DEPRECATED
float ortho_scale
Definition: DNA_ID.h:273