Blender V4.5
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 Ipo;
19struct Object;
20
21/* ------------------------------------------- */
22/* Stereo Settings */
23typedef struct CameraStereoSettings {
27 short pivot;
28 short flag;
29 char _pad[2];
30 /* Cut-off angle at which interocular distance start to fade down. */
32 /* Cut-off angle at which interocular distance stops to fade down. */
35
36/* Background Picture */
37typedef struct CameraBGImage {
39
40 struct Image *ima;
42 struct MovieClip *clip;
44 float offset[2], scale, rotation;
45 float alpha;
46 short flag;
47 short source;
49
63
64typedef struct Camera_Runtime {
65 /* For draw manager. */
66 float drw_corners[2][4][2];
67 float drw_tria[2][2];
68 float drw_depth[2];
69 float drw_focusmat[4][4];
70 float drw_normalmat[4][4];
72
73typedef struct Camera {
74#ifdef __cplusplus
76 static constexpr ID_Type id_type = ID_CA;
77#endif
78
81 struct AnimData *adt;
82
84 char type;
86 char dtx;
87 short flag;
92 float shiftx, shifty;
93 float dof_distance DNA_DEPRECATED;
94
97 char _pad[2];
98
99 /* Fish-eye properties. */
109
110 /* Central cylindrical range properties. */
116 float _pad2;
117
118 /* Custom Camera properties. */
120
121 char custom_filepath[/*FILE_MAX*/ 1024];
122
126 int _pad3;
127
129 struct Ipo *ipo DNA_DEPRECATED;
130
131 struct Object *dof_ob DNA_DEPRECATED;
134
135 /* CameraBGImage reference images */
137
138 /* Stereo settings */
140
144
145/* **************** CAMERA ********************* */
146
147/* type */
148enum {
153};
154
155/* panorama_type */
156enum {
164};
165
166/* custom_mode */
167enum {
170};
171
172/* dtx */
173enum {
174 CAM_DTX_CENTER = (1 << 0),
176 CAM_DTX_THIRDS = (1 << 2),
177 CAM_DTX_GOLDEN = (1 << 3),
182};
183
184/* flag */
185enum {
186 CAM_SHOWLIMITS = (1 << 0),
187 CAM_SHOWMIST = (1 << 1),
190 CAM_SHOWNAME = (1 << 4),
191 CAM_ANGLETOGGLE = (1 << 5),
192 CAM_DS_EXPAND = (1 << 6),
194 CAM_PANORAMA = (1 << 7), /* deprecated */
195#endif
196 CAM_SHOWSENSOR = (1 << 8),
198 CAM_SHOW_BG_IMAGE = (1 << 10),
199};
200
201/* Sensor fit */
202enum {
206};
207
208#define DEFAULT_SENSOR_WIDTH 36.0f
209#define DEFAULT_SENSOR_HEIGHT 24.0f
210
211/* stereo->convergence_mode */
212enum {
216};
217
218/* stereo->pivot */
219enum {
223};
224
225/* stereo->flag */
226enum {
229};
230
231/* CameraBGImage->flag */
232/* may want to use 1 for select ? */
233enum {
238
239 /* Camera framing options */
244
245 /* Axis flip options */
248
249 /* That background image has been inserted in local override (i.e. it can be fully edited!). */
251};
252
253/* CameraBGImage->source */
254/* may want to use 1 for select? */
255enum {
258};
259
260/* CameraDOFSettings->flag */
261enum {
262 CAM_DOF_ENABLED = (1 << 0),
263};
ID and Library types, which are fundamental for SDNA.
ID_Type
@ ID_CA
@ CAMERA_SENSOR_FIT_HOR
@ CAMERA_SENSOR_FIT_AUTO
@ CAMERA_SENSOR_FIT_VERT
@ CAM_S3D_PARALLEL
@ CAM_S3D_OFFAXIS
@ CAM_S3D_TOE
@ CAM_BGIMG_SOURCE_IMAGE
@ CAM_BGIMG_SOURCE_MOVIE
@ CAM_S3D_SPHERICAL
@ CAM_S3D_POLE_MERGE
@ 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_CUSTOM_SHADER_EXTERNAL
@ CAM_CUSTOM_SHADER_INTERNAL
@ 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
@ CAM_PERSP
@ CAM_PANO
@ CAM_CUSTOM
@ CAM_ORTHO
@ CAM_S3D_PIVOT_CENTER
@ CAM_S3D_PIVOT_RIGHT
@ CAM_S3D_PIVOT_LEFT
@ 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_PANORAMA
@ CAM_SHOWSENSOR
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 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:404
#define DNA_DEPRECATED_ALLOW
Definition versioning.cc:11