Blender V5.0
DNA_camera_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "DNA_ID.h"
12#include "DNA_defs.h"
13#include "DNA_gpu_types.h"
14#include "DNA_image_types.h"
15#include "DNA_movieclip_types.h"
16
17struct AnimData;
18struct Object;
19
20/* ------------------------------------------- */
21/* Stereo Settings */
22typedef struct CameraStereoSettings {
26 short pivot;
27 short flag;
28 char _pad[2];
29 /* Cut-off angle at which interocular distance start to fade down. */
31 /* Cut-off angle at which interocular distance stops to fade down. */
34
35/* Background Picture */
36typedef struct CameraBGImage {
38
39 struct Image *ima;
41 struct MovieClip *clip;
43 float offset[2], scale, rotation;
44 float alpha;
45 short flag;
46 short source;
48
62
63typedef struct Camera_Runtime {
64 /* For draw manager. */
65 float drw_corners[2][4][2];
66 float drw_tria[2][2];
67 float drw_depth[2];
68 float drw_focusmat[4][4];
69 float drw_normalmat[4][4];
71
72typedef struct Camera {
73#ifdef __cplusplus
75 static constexpr ID_Type id_type = ID_CA;
76#endif
77
80 struct AnimData *adt;
81
83 char type;
85 char dtx;
86 short flag;
91 float shiftx, shifty;
92 float dof_distance DNA_DEPRECATED;
93
96 char _pad[2];
97
98 /* Fish-eye properties. */
108
109 /* Central cylindrical range properties. */
115 float _pad2;
116
117 /* Custom Camera properties. */
119
120 char custom_filepath[/*FILE_MAX*/ 1024];
121
125 int _pad3;
126
127 struct Object *dof_ob DNA_DEPRECATED;
130
131 /* CameraBGImage reference images */
133
134 /* Stereo settings */
136
137 /* Compositional guide overlay color */
139
143
144/* **************** CAMERA ********************* */
145
146/* type */
147enum {
152};
153
154/* panorama_type */
155enum {
163};
164
165/* custom_mode */
166enum {
169};
170
171/* dtx */
172enum {
173 CAM_DTX_CENTER = (1 << 0),
175 CAM_DTX_THIRDS = (1 << 2),
176 CAM_DTX_GOLDEN = (1 << 3),
181};
182
183/* flag */
184enum {
185 CAM_SHOWLIMITS = (1 << 0),
186 CAM_SHOWMIST = (1 << 1),
189 CAM_SHOWNAME = (1 << 4),
190 CAM_ANGLETOGGLE = (1 << 5),
191 CAM_DS_EXPAND = (1 << 6),
193 CAM_PANORAMA = (1 << 7), /* deprecated */
194#endif
195 CAM_SHOWSENSOR = (1 << 8),
197 CAM_SHOW_BG_IMAGE = (1 << 10),
198};
199
200/* Sensor fit */
201enum {
205};
206
207#define DEFAULT_SENSOR_WIDTH 36.0f
208#define DEFAULT_SENSOR_HEIGHT 24.0f
209
210/* stereo->convergence_mode */
211enum {
215};
216
217/* stereo->pivot */
218enum {
222};
223
224/* stereo->flag */
225enum {
228};
229
230/* CameraBGImage->flag */
231/* may want to use 1 for select ? */
232enum {
237
238 /* Camera framing options */
243
244 /* Axis flip options */
247
248 /* That background image has been inserted in local override (i.e. it can be fully edited!). */
250};
251
252/* CameraBGImage->source */
253/* may want to use 1 for select? */
254enum {
257};
258
259/* CameraDOFSettings->flag */
260enum {
261 CAM_DOF_ENABLED = (1 << 0),
262};
ID and Library types, which are fundamental for SDNA.
ID_Type
@ ID_CA
@ CAM_DOF_ENABLED
@ CAM_S3D_PARALLEL
@ CAM_S3D_OFFAXIS
@ CAM_S3D_TOE
@ CAM_S3D_SPHERICAL
@ CAM_S3D_POLE_MERGE
@ CAM_CUSTOM_SHADER_EXTERNAL
@ CAM_CUSTOM_SHADER_INTERNAL
@ CAM_PERSP
@ CAM_PANO
@ CAM_CUSTOM
@ CAM_ORTHO
@ 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_PANORAMA
@ CAM_SHOWSENSOR
@ CAM_PANORAMA_CENTRAL_CYLINDRICAL
@ CAM_PANORAMA_FISHEYE_EQUIDISTANT
@ CAM_PANORAMA_MIRRORBALL
@ CAM_PANORAMA_EQUIANGULAR_CUBEMAP_FACE
@ CAM_PANORAMA_FISHEYE_EQUISOLID
@ CAM_PANORAMA_EQUIRECTANGULAR
@ CAM_PANORAMA_FISHEYE_LENS_POLYNOMIAL
@ 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_BGIMG_SOURCE_IMAGE
@ CAM_BGIMG_SOURCE_MOVIE
@ CAM_S3D_PIVOT_CENTER
@ CAM_S3D_PIVOT_RIGHT
@ CAM_S3D_PIVOT_LEFT
@ CAMERA_SENSOR_FIT_HOR
@ CAMERA_SENSOR_FIT_AUTO
@ CAMERA_SENSOR_FIT_VERT
@ 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_OVERRIDE_LIBRARY_LOCAL
@ CAM_BGIMG_FLAG_EXPANDED
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 panorama_type
char sensor_fit
float sensor_y
float composition_guide_color[4]
float latitude_max
float central_cylindrical_range_v_min
Camera_Runtime runtime
float fisheye_polynomial_k3
float longitude_max
struct ListBase bg_images
float central_cylindrical_range_u_min
char custom_bytecode_hash[64]
char * custom_bytecode
float fisheye_polynomial_k1
float central_cylindrical_range_u_max
float latitude_min
float fisheye_polynomial_k2
float central_cylindrical_radius
struct Text * custom_shader
struct CameraStereoSettings stereo
char custom_filepath[1024]
float fisheye_fov
float passepartalpha
float fisheye_polynomial_k0
struct AnimData * adt
float fisheye_polynomial_k4
float dof_distance DNA_DEPRECATED
float sensor_x
float clip_start
float fisheye_lens
char _pad[2]
float central_cylindrical_range_v_max
float drawsize
float longitude_min
struct CameraDOFSettings dof
float ortho_scale
Definition DNA_ID.h:414
#define DNA_DEPRECATED_ALLOW
Definition versioning.cc:11