Blender V5.3
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 "BLI_enum_flags.hh"
12#include "BLI_math_constants.hh"
13
14#include "DNA_ID.h"
15#include "DNA_defs.h"
16#include "DNA_gpu_types.h"
17#include "DNA_image_types.h"
18#include "DNA_movieclip_types.h"
19
20namespace blender {
21
22struct AnimData;
23struct Object;
24
25/* type */
26enum eCamera_Type : char {
31};
32
33/* panorama_type */
43
44/* custom_mode */
49
50/* Composition Guides */
62
63/* flag */
64enum eCamera_Flag : short {
65 CAM_SHOWLIMITS = (1 << 0),
66 CAM_SHOWMIST = (1 << 1),
69 CAM_SHOWNAME = (1 << 4),
70 CAM_ANGLETOGGLE = (1 << 5),
71 CAM_DS_EXPAND = (1 << 6),
73 CAM_PANORAMA = (1 << 7), /* deprecated */
74#endif
75 CAM_SHOWSENSOR = (1 << 8),
77 CAM_SHOW_BG_IMAGE = (1 << 10),
78};
80
81/* Sensor fit */
87
88#define DEFAULT_SENSOR_WIDTH 36.0f
89#define DEFAULT_SENSOR_HEIGHT 24.0f
90
91/* stereo->convergence_mode */
97
98/* stereo->pivot */
104
105/* stereo->flag */
109};
111
112/* CameraBGImage->flag */
113/* may want to use 1 for select ? */
119
120 /* Camera framing options */
125
126 /* Axis flip options */
129
130 /* That background image has been inserted in local override (i.e. it can be fully edited!). */
132};
134
135/* CameraBGImage->source */
136/* may want to use 1 for select? */
141
142/* CameraDOFSettings->flag */
143enum eCamera_DOF_Flag : short {
144 CAM_DOF_ENABLED = (1 << 0),
145};
147
148/* ------------------------------------------- */
149/* Stereo Settings */
151 float interocular_distance = 0.065f;
152 float convergence_distance = 30.0f * 0.065f;
156 char _pad[2] = {};
157 /* Cut-off angle at which interocular distance start to fade down. */
159 /* Cut-off angle at which interocular distance stops to fade down. */
161};
162
163/* Background Picture */
165 struct CameraBGImage *next = nullptr, *prev = nullptr;
166
167 struct Image *ima = nullptr;
169 struct MovieClip *clip = nullptr;
171 float offset[2] = {}, scale = 0, rotation = 0;
172 float alpha = 0;
175};
176
180 struct Object *focus_object = nullptr;
181 char focus_subtarget[64] = "";
182 float focus_distance = 10.0f;
183 float aperture_fstop = 2.8f;
185 float aperture_ratio = 1.0f;
188 char _pad[2] = {};
189};
190
192 /* For draw manager. */
193 float drw_corners[2][4][2] = {};
194 float drw_tria[2][2] = {};
195 float drw_depth[2] = {};
196 float drw_focusmat[4][4] = {};
197 float drw_normalmat[4][4] = {};
198};
199
200struct Camera {
201#ifdef __cplusplus
203 static constexpr ID_Type id_type = ID_CA;
204#endif
205
208 struct AnimData *adt = nullptr;
209
212 char _pad0[1] = {};
216 char _pad1[2] = {};
217 float passepartalpha = 0.5f;
218 float clip_start = 0.1f, clip_end = 1000.0f;
219 float lens = 50.0f, ortho_scale = 6.0, drawsize = 1.0f;
221 float shiftx = 0, shifty = 0;
223
226 char _pad2[6] = {};
227
228 /* Fish-eye properties. */
230 float fisheye_lens = 10.5f;
231 float latitude_min = -0.5f * float(M_PI), latitude_max = 0.5f * float(M_PI);
233 float fisheye_polynomial_k0 = -1.1735143712967577e-05f;
234 float fisheye_polynomial_k1 = -0.019988736953434998f;
235 float fisheye_polynomial_k2 = -3.3525322965709175e-06f;
236 float fisheye_polynomial_k3 = 3.099275275886036e-06f;
237 float fisheye_polynomial_k4 = -2.6064646454854524e-08f;
238
239 /* Central cylindrical range properties. */
245 float _pad3 = {};
246
247 /* Custom Camera properties. */
248 struct Text *custom_shader = nullptr;
249
250 char custom_filepath[/*FILE_MAX*/ 1024] = "";
251
252 char custom_bytecode_hash[64] = "";
253 char *custom_bytecode = nullptr;
255 int _pad4 = {};
256
257 DNA_DEPRECATED struct Object *dof_ob = nullptr;
260
261 /* CameraBGImage reference images */
262 ListBaseT<CameraBGImage> bg_images = {nullptr, nullptr};
263
264 /* Stereo settings */
266
267 /* Compositional guide overlay color */
268 float composition_guide_color[4] = {0.5f, 0.5f, 0.5f, 1.0f};
269
272};
273
274/* **************** CAMERA ********************* */
275
276} // namespace blender
#define ENUM_OPERATORS(_enum_type)
#define DEG2RADF(_deg)
#define M_PI
ID and Library types, which are fundamental for SDNA.
#define DEFAULT_SENSOR_HEIGHT
#define DEFAULT_SENSOR_WIDTH
#define DNA_DEPRECATED
Definition DNA_defs.h:21
float3x3 scale(float3x3 mat, float2 scale)
BMesh Iterators.
@ CAM_CUSTOM_SHADER_EXTERNAL
@ CAM_CUSTOM_SHADER_INTERNAL
@ COMPOSITION_GUIDES_THIRDS
@ COMPOSITION_GUIDES_GOLDEN
@ COMPOSITION_GUIDES_CENTER_DIAG
@ COMPOSITION_GUIDES_HARMONY_TRI_B
@ COMPOSITION_GUIDES_GOLDEN_TRI_A
@ COMPOSITION_GUIDES_HARMONY_TRI_A
@ COMPOSITION_GUIDES_CENTER
@ COMPOSITION_GUIDES_GOLDEN_TRI_B
eCamera_Stereo_ConvergenceMode
@ CAMERA_SENSOR_FIT_VERT
@ CAMERA_SENSOR_FIT_AUTO
@ CAMERA_SENSOR_FIT_HOR
@ CAM_PANORAMA_CENTRAL_CYLINDRICAL
@ CAM_PANORAMA_EQUIRECTANGULAR
@ CAM_PANORAMA_MIRRORBALL
@ CAM_PANORAMA_FISHEYE_EQUISOLID
@ CAM_PANORAMA_EQUIANGULAR_CUBEMAP_FACE
@ CAM_PANORAMA_FISHEYE_LENS_POLYNOMIAL
@ CAM_PANORAMA_FISHEYE_EQUIDISTANT
@ CAM_BGIMG_FLAG_CAMERACLIP
@ CAM_BGIMG_FLAG_FOREGROUND
@ CAM_BGIMG_FLAG_OVERRIDE_LIBRARY_LOCAL
@ CAM_BGIMG_FLAG_EXPANDED
@ CAM_BGIMG_FLAG_CAMERA_ASPECT
@ CAM_BGIMG_FLAG_CAMERA_CROP
@ CAM_BGIMG_FLAG_DISABLED
@ CAM_SHOW_SAFE_MARGINS
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
struct CameraBGImage * next
struct MovieClip * clip
struct CameraBGImage * prev
struct MovieClipUser cuser
eCamera_BGImage_Flag flag
eCamera_BGImage_Source source
eCamera_Stereo_ConvergenceMode convergence_mode
struct CameraStereoSettings stereo
struct Text * custom_shader
Camera_Runtime runtime
DNA_DEPRECATED struct GPUDOFSettings gpu_dof
char custom_bytecode_hash[64]
DNA_DEPRECATED float dof_distance
DNA_DEPRECATED struct Object * dof_ob
struct CameraDOFSettings dof
float central_cylindrical_range_v_max
eCamera_PanoType panorama_type
eCamera_CustomMode custom_mode
float composition_guide_color[4]
float central_cylindrical_range_u_min
eCompositionGuideFlags composition_guide_flags
char custom_filepath[1024]
float central_cylindrical_range_u_max
eCamera_SensorFit sensor_fit
float central_cylindrical_range_v_min
struct AnimData * adt
ListBaseT< CameraBGImage > bg_images
#define DNA_DEPRECATED_ALLOW
Definition versioning.cc:11