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 
20 /** \file
21  * \ingroup DNA
22  */
23 
24 #pragma once
25 
26 #include "DNA_defs.h"
27 
28 /* XXX, temp feature - campbell */
29 #define DURIAN_CAMERA_SWITCH
30 
31 #include "DNA_ID.h"
32 #include "DNA_collection_types.h"
33 #include "DNA_color_types.h" /* color management */
34 #include "DNA_curveprofile_types.h"
35 #include "DNA_customdata_types.h" /* Scene's runtime cddata masks. */
36 #include "DNA_freestyle_types.h"
37 #include "DNA_layer_types.h"
38 #include "DNA_listBase.h"
39 #include "DNA_material_types.h"
40 #include "DNA_userdef_types.h"
41 #include "DNA_vec_types.h"
42 #include "DNA_view3d_types.h"
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 struct AnimData;
49 struct Brush;
50 struct Collection;
51 struct ColorSpace;
52 struct CurveMapping;
53 struct CurveProfile;
54 struct CustomData_MeshMasks;
55 struct Editing;
56 struct Image;
57 struct MovieClip;
58 struct Object;
59 struct Scene;
60 struct SceneCollection;
61 struct World;
62 struct bGPdata;
63 struct bNodeTree;
64 
65 /* ************************************************************* */
66 /* Scene Data */
67 
68 /* ************************************************************* */
69 /* Output Format Data */
70 
71 typedef struct AviCodecData {
72   /** Save format. */
73   void *lpFormat;
74   /** Compressor options. */
75   void *lpParms;
76   /** Size of lpFormat buffer. */
77   unsigned int cbFormat;
78   /** Size of lpParms buffer. */
79   unsigned int cbParms;
80 
81   /** Stream type, for consistency. */
82   unsigned int fccType;
83   /** Compressor. */
84   unsigned int fccHandler;
85   /** Keyframe rate. */
86   unsigned int dwKeyFrameEvery;
87   /** Compress quality 0-10,000. */
88   unsigned int dwQuality;
89   /** Bytes per second. */
90   unsigned int dwBytesPerSecond;
91   /** Flags... see below. */
92   unsigned int dwFlags;
93   /** For non-video streams only. */
94   unsigned int dwInterleaveEvery;
95   char _pad[4];
96 
97   char avicodecname[128];
98 } AviCodecData;
99 
100 typedef enum eFFMpegPreset {
101   FFM_PRESET_NONE = 0,
102 
103 #ifdef DNA_DEPRECATED_ALLOW
104   /* Previously used by h.264 to control encoding speed vs. file size. */
105   FFM_PRESET_ULTRAFAST = 1, /* DEPRECATED */
106   FFM_PRESET_SUPERFAST = 2, /* DEPRECATED */
107   FFM_PRESET_VERYFAST = 3,  /* DEPRECATED */
108   FFM_PRESET_FASTER = 4,    /* DEPRECATED */
109   FFM_PRESET_FAST = 5,      /* DEPRECATED */
110   FFM_PRESET_MEDIUM = 6,    /* DEPRECATED */
111   FFM_PRESET_SLOW = 7,      /* DEPRECATED */
112   FFM_PRESET_SLOWER = 8,    /* DEPRECATED */
113   FFM_PRESET_VERYSLOW = 9,  /* DEPRECATED */
114 #endif
115 
116   /* Used by WEBM/VP9 and h.264 to control encoding speed vs. file size.
117    * WEBM/VP9 use these values directly, whereas h.264 map those to
118    * respectively the MEDIUM, SLOWER, and SUPERFAST presets.
119    */
120   /** the default and recommended for most applications */
121   FFM_PRESET_GOOD = 10,
122   /** recommended if you have lots of time and want the best compression efficiency */
123   FFM_PRESET_BEST = 11,
124   /** recommended for live / fast encoding */
125   FFM_PRESET_REALTIME = 12,
126 } eFFMpegPreset;
127 
128 /* Mapping from easily-understandable descriptions to CRF values.
129  * Assumes we output 8-bit video. Needs to be remapped if 10-bit
130  * is output.
131  * We use a slightly wider than "subjectively sane range" according
132  * to https://trac.ffmpeg.org/wiki/Encode/H.264#a1.ChooseaCRFvalue
133  */
134 typedef enum eFFMpegCrf {
135   FFM_CRF_NONE = -1,
136   FFM_CRF_LOSSLESS = 0,
137   FFM_CRF_PERC_LOSSLESS = 17,
138   FFM_CRF_HIGH = 20,
139   FFM_CRF_MEDIUM = 23,
140   FFM_CRF_LOW = 26,
141   FFM_CRF_VERYLOW = 29,
142   FFM_CRF_LOWEST = 32,
143 } eFFMpegCrf;
144 
145 typedef enum eFFMpegAudioChannels {
146   FFM_CHANNELS_MONO = 1,
147   FFM_CHANNELS_STEREO = 2,
148   FFM_CHANNELS_SURROUND4 = 4,
149   FFM_CHANNELS_SURROUND51 = 6,
150   FFM_CHANNELS_SURROUND71 = 8,
151 } eFFMpegAudioChannels;
152 
153 typedef struct FFMpegCodecData {
154   int type;
155   int codec;
156   int audio_codec;
157   int video_bitrate;
158   int audio_bitrate;
159   int audio_mixrate;
160   int audio_channels;
161   char _pad0[4];
162   float audio_volume;
163   int gop_size;
164   /** Only used if FFMPEG_USE_MAX_B_FRAMES flag is set. */
165   int max_b_frames;
166   int flags;
167   int constant_rate_factor;
168   /** See eFFMpegPreset. */
169   int ffmpeg_preset;
170 
171   int rc_min_rate;
172   int rc_max_rate;
173   int rc_buffer_size;
174   int mux_packet_size;
175   int mux_rate;
176   char _pad1[4];
177 
178   IDProperty *properties;
179 } FFMpegCodecData;
180 
181 /* ************************************************************* */
182 /* Audio */
183 
184 typedef struct AudioData {
185   int mixrate; /* 2.5: now in FFMpegCodecData: audio_mixrate */
186   float main;  /* 2.5: now in FFMpegCodecData: audio_volume */
187   float speed_of_sound;
188   float doppler_factor;
189   int distance_model;
190   short flag;
191   char _pad[2];
192   float volume;
193   char _pad2[4];
194 } AudioData;
195 
196 /* *************************************************************** */
197 /* Render Layers */
198 
199 /* Render Layer */
200 typedef struct SceneRenderLayer {
201   struct SceneRenderLayer *next, *prev;
202 
203   /** MAX_NAME. */
204   char name[64] DNA_DEPRECATED;
205 
206   /** Converted to ViewLayer setting. */
207   struct Material *mat_override DNA_DEPRECATED;
208 
209   /** Converted to LayerCollection cycles camera visibility override. */
210   unsigned int lay DNA_DEPRECATED;
211   /** Converted to LayerCollection cycles holdout override. */
212   unsigned int lay_zmask DNA_DEPRECATED;
213   unsigned int lay_exclude DNA_DEPRECATED;
214   /** Converted to ViewLayer layflag and flag. */
215   int layflag DNA_DEPRECATED;
216 
217   /* pass_xor has to be after passflag */
218   /** Pass_xor has to be after passflag. */
219   int passflag DNA_DEPRECATED;
220   /** Converted to ViewLayer passflag and flag. */
221   int pass_xor DNA_DEPRECATED;
222 
223   /** Converted to ViewLayer setting. */
224   int samples DNA_DEPRECATED;
225   /** Converted to ViewLayer pass_alpha_threshold. */
226   float pass_alpha_threshold DNA_DEPRECATED;
227 
228   /** Converted to ViewLayer id_properties. */
229   IDProperty *prop DNA_DEPRECATED;
230 
231   /** Converted to ViewLayer freestyleConfig. */
232   struct FreestyleConfig freestyleConfig DNA_DEPRECATED;
233 } SceneRenderLayer;
234 
235 /* SceneRenderLayer.layflag */
236 #define SCE_LAY_SOLID (1 << 0)
237 #define SCE_LAY_ZTRA (1 << 1)
238 #define SCE_LAY_HALO (1 << 2)
239 #define SCE_LAY_EDGE (1 << 3)
240 #define SCE_LAY_SKY (1 << 4)
241 #define SCE_LAY_STRAND (1 << 5)
242 #define SCE_LAY_FRS (1 << 6)
243 #define SCE_LAY_AO (1 << 7)
244 #define SCE_LAY_VOLUMES (1 << 8)
245 /* flags between (1 << 8) and (1 << 15) are set to 1 already, for future options */
246 
247 #define SCE_LAY_ALL_Z (1 << 15)
248 /* #define SCE_LAY_XOR         (1 << 16) */ /* UNUSED */
249 #define SCE_LAY_DISABLE (1 << 17)
250 #define SCE_LAY_ZMASK (1 << 18)
251 #define SCE_LAY_NEG_ZMASK (1 << 19)
252 
253 /* SceneRenderLayer.passflag */
254 typedef enum eScenePassType {
255   SCE_PASS_COMBINED = (1 << 0),
256   SCE_PASS_Z = (1 << 1),
257   SCE_PASS_UNUSED_1 = (1 << 2), /* RGBA */
258   SCE_PASS_UNUSED_2 = (1 << 3), /* DIFFUSE */
259   SCE_PASS_UNUSED_3 = (1 << 4), /* SPEC */
260   SCE_PASS_SHADOW = (1 << 5),
261   SCE_PASS_AO = (1 << 6),
262   SCE_PASS_UNUSED_4 = (1 << 7), /* REFLECT */
263   SCE_PASS_NORMAL = (1 << 8),
264   SCE_PASS_VECTOR = (1 << 9),
265   SCE_PASS_UNUSED_5 = (1 << 10), /* REFRACT */
266   SCE_PASS_INDEXOB = (1 << 11),
267   SCE_PASS_UV = (1 << 12),
268   SCE_PASS_UNUSED_6 = (1 << 13), /* INDIRECT */
269   SCE_PASS_MIST = (1 << 14),
270   SCE_PASS_RAYHITS = (1 << 15),
271   SCE_PASS_EMIT = (1 << 16),
272   SCE_PASS_ENVIRONMENT = (1 << 17),
273   SCE_PASS_INDEXMA = (1 << 18),
274   SCE_PASS_DIFFUSE_DIRECT = (1 << 19),
275   SCE_PASS_DIFFUSE_INDIRECT = (1 << 20),
276   SCE_PASS_DIFFUSE_COLOR = (1 << 21),
277   SCE_PASS_GLOSSY_DIRECT = (1 << 22),
278   SCE_PASS_GLOSSY_INDIRECT = (1 << 23),
279   SCE_PASS_GLOSSY_COLOR = (1 << 24),
280   SCE_PASS_TRANSM_DIRECT = (1 << 25),
281   SCE_PASS_TRANSM_INDIRECT = (1 << 26),
282   SCE_PASS_TRANSM_COLOR = (1 << 27),
283   SCE_PASS_SUBSURFACE_DIRECT = (1 << 28),
284   SCE_PASS_SUBSURFACE_INDIRECT = (1 << 29),
285   SCE_PASS_SUBSURFACE_COLOR = (1 << 30),
286   SCE_PASS_ROUGHNESS = (1u << 31u),
287 } eScenePassType;
288 
289 #define RE_PASSNAME_DEPRECATED "Deprecated"
290 
291 #define RE_PASSNAME_COMBINED "Combined"
292 #define RE_PASSNAME_Z "Depth"
293 #define RE_PASSNAME_VECTOR "Vector"
294 #define RE_PASSNAME_NORMAL "Normal"
295 #define RE_PASSNAME_UV "UV"
296 #define RE_PASSNAME_EMIT "Emit"
297 #define RE_PASSNAME_SHADOW "Shadow"
298 
299 #define RE_PASSNAME_AO "AO"
300 #define RE_PASSNAME_ENVIRONMENT "Env"
301 #define RE_PASSNAME_INDEXOB "IndexOB"
302 #define RE_PASSNAME_INDEXMA "IndexMA"
303 #define RE_PASSNAME_MIST "Mist"
304 
305 #define RE_PASSNAME_RAYHITS "RayHits"
306 #define RE_PASSNAME_DIFFUSE_DIRECT "DiffDir"
307 #define RE_PASSNAME_DIFFUSE_INDIRECT "DiffInd"
308 #define RE_PASSNAME_DIFFUSE_COLOR "DiffCol"
309 #define RE_PASSNAME_GLOSSY_DIRECT "GlossDir"
310 #define RE_PASSNAME_GLOSSY_INDIRECT "GlossInd"
311 #define RE_PASSNAME_GLOSSY_COLOR "GlossCol"
312 #define RE_PASSNAME_TRANSM_DIRECT "TransDir"
313 #define RE_PASSNAME_TRANSM_INDIRECT "TransInd"
314 #define RE_PASSNAME_TRANSM_COLOR "TransCol"
315 
316 #define RE_PASSNAME_SUBSURFACE_DIRECT "SubsurfaceDir"
317 #define RE_PASSNAME_SUBSURFACE_INDIRECT "SubsurfaceInd"
318 #define RE_PASSNAME_SUBSURFACE_COLOR "SubsurfaceCol"
319 
320 #define RE_PASSNAME_FREESTYLE "Freestyle"
321 #define RE_PASSNAME_BLOOM "BloomCol"
322 #define RE_PASSNAME_VOLUME_TRANSMITTANCE "VolumeTransmCol"
323 #define RE_PASSNAME_VOLUME_SCATTER "VolumeScatterCol"
324 
325 /* View - MultiView */
326 typedef struct SceneRenderView {
327   struct SceneRenderView *next, *prev;
328 
329   /** MAX_NAME. */
330   char name[64];
331   /** MAX_NAME. */
332   char suffix[64];
333 
334   int viewflag;
335   char _pad2[4];
336 
337 } SceneRenderView;
338 
339 /* SceneRenderView.viewflag */
340 #define SCE_VIEW_DISABLE (1 << 0)
341 
342 /* RenderData.views_format */
343 enum {
344   SCE_VIEWS_FORMAT_STEREO_3D = 0,
345   SCE_VIEWS_FORMAT_MULTIVIEW = 1,
346 };
347 
348 /* ImageFormatData.views_format (also used for Sequence.views_format) */
349 enum {
350   R_IMF_VIEWS_INDIVIDUAL = 0,
351   R_IMF_VIEWS_STEREO_3D = 1,
352   R_IMF_VIEWS_MULTIVIEW = 2,
353 };
354 
355 typedef struct Stereo3dFormat {
356   short flag;
357   /** Encoding mode. */
358   char display_mode;
359   /** Anaglyph scheme for the user display. */
360   char anaglyph_type;
361   /** Interlace type for the user display. */
362   char interlace_type;
363   char _pad[3];
364 } Stereo3dFormat;
365 
366 /* Stereo3dFormat.display_mode */
367 typedef enum eStereoDisplayMode {
368   S3D_DISPLAY_ANAGLYPH = 0,
369   S3D_DISPLAY_INTERLACE = 1,
370   S3D_DISPLAY_PAGEFLIP = 2,
371   S3D_DISPLAY_SIDEBYSIDE = 3,
372   S3D_DISPLAY_TOPBOTTOM = 4,
373 } eStereoDisplayMode;
374 
375 /* Stereo3dFormat.flag */
376 typedef enum eStereo3dFlag {
377   S3D_INTERLACE_SWAP = (1 << 0),
378   S3D_SIDEBYSIDE_CROSSEYED = (1 << 1),
379   S3D_SQUEEZED_FRAME = (1 << 2),
380 } eStereo3dFlag;
381 
382 /* Stereo3dFormat.anaglyph_type */
383 typedef enum eStereo3dAnaglyphType {
384   S3D_ANAGLYPH_REDCYAN = 0,
385   S3D_ANAGLYPH_GREENMAGENTA = 1,
386   S3D_ANAGLYPH_YELLOWBLUE = 2,
387 } eStereo3dAnaglyphType;
388 
389 /* Stereo3dFormat.interlace_type */
390 typedef enum eStereo3dInterlaceType {
391   S3D_INTERLACE_ROW = 0,
392   S3D_INTERLACE_COLUMN = 1,
393   S3D_INTERLACE_CHECKERBOARD = 2,
394 } eStereo3dInterlaceType;
395 
396 /* *************************************************************** */
397 
398 /* Generic image format settings,
399  * this is used for NodeImageFile and IMAGE_OT_save_as operator too.
400  *
401  * note: its a bit strange that even though this is an image format struct
402  * the imtype can still be used to select video formats.
403  * RNA ensures these enum's are only selectable for render output.
404  */
405 typedef struct ImageFormatData {
406   /**
407    * R_IMF_IMTYPE_PNG, R_...
408    * \note Video types should only ever be set from this structure when used from #RenderData.
409    */
410   char imtype;
411   /**
412    * bits per channel, R_IMF_CHAN_DEPTH_8 -> 32,
413    * not a flag, only set 1 at a time. */
414   char depth;
415 
416   /** R_IMF_PLANES_BW, R_IMF_PLANES_RGB, R_IMF_PLANES_RGBA. */
417   char planes;
418   /** Generic options for all image types, alpha zbuffer. */
419   char flag;
420 
421   /** (0 - 100), eg: jpeg quality. */
422   char quality;
423   /** (0 - 100), eg: png compression. */
424   char compress;
425 
426   /* --- format specific --- */
427 
428   /* OpenEXR */
429   char exr_codec;
430 
431   /* Cineon */
432   char cineon_flag;
433   short cineon_white, cineon_black;
434   float cineon_gamma;
435 
436   /* Jpeg2000 */
437   char jp2_flag;
438   char jp2_codec;
439 
440   /* TIFF */
441   char tiff_codec;
442 
443   char _pad[4];
444 
445   /* Multiview */
446   char views_format;
447   Stereo3dFormat stereo3d_format;
448 
449   /* color management */
450   ColorManagedViewSettings view_settings;
451   ColorManagedDisplaySettings display_settings;
452 } ImageFormatData;
453 
454 /* ImageFormatData.imtype */
455 #define R_IMF_IMTYPE_TARGA 0
456 #define R_IMF_IMTYPE_IRIS 1
457 /* #define R_HAMX                    2 */ /* hamx is nomore */
458 /* #define R_FTYPE                   3 */ /* ftype is nomore */
459 #define R_IMF_IMTYPE_JPEG90 4
460 /* #define R_MOVIE                   5 */ /* movie is nomore */
461 #define R_IMF_IMTYPE_IRIZ 7
462 #define R_IMF_IMTYPE_RAWTGA 14
463 #define R_IMF_IMTYPE_AVIRAW 15
464 #define R_IMF_IMTYPE_AVIJPEG 16
465 #define R_IMF_IMTYPE_PNG 17
466 /* #define R_IMF_IMTYPE_AVICODEC    18 */ /* avicodec is nomore */
467 /* #define R_IMF_IMTYPE_QUICKTIME   19 */ /* quicktime is nomore */
468 #define R_IMF_IMTYPE_BMP 20
469 #define R_IMF_IMTYPE_RADHDR 21
470 #define R_IMF_IMTYPE_TIFF 22
471 #define R_IMF_IMTYPE_OPENEXR 23
472 #define R_IMF_IMTYPE_FFMPEG 24
473 /* #define R_IMF_IMTYPE_FRAMESERVER    25 */ /* frame server is nomore */
474 #define R_IMF_IMTYPE_CINEON 26
475 #define R_IMF_IMTYPE_DPX 27
476 #define R_IMF_IMTYPE_MULTILAYER 28
477 #define R_IMF_IMTYPE_DDS 29
478 #define R_IMF_IMTYPE_JP2 30
479 #define R_IMF_IMTYPE_H264 31
480 #define R_IMF_IMTYPE_XVID 32
481 #define R_IMF_IMTYPE_THEORA 33
482 #define R_IMF_IMTYPE_PSD 34
483 
484 #define R_IMF_IMTYPE_INVALID 255
485 
486 /* ImageFormatData.flag */
487 #define R_IMF_FLAG_ZBUF (1 << 0)        /* was R_OPENEXR_ZBUF */
488 #define R_IMF_FLAG_PREVIEW_JPG (1 << 1) /* was R_PREVIEW_JPG */
489 
490 /* return values from BKE_imtype_valid_depths, note this is depts per channel */
491 /* ImageFormatData.depth */
492 typedef enum eImageFormatDepth {
493   /* 1bits  (unused) */
494   R_IMF_CHAN_DEPTH_1 = (1 << 0),
495   /* 8bits  (default) */
496   R_IMF_CHAN_DEPTH_8 = (1 << 1),
497   /* 10bits (uncommon, Cineon/DPX support) */
498   R_IMF_CHAN_DEPTH_10 = (1 << 2),
499   /* 12bits (uncommon, jp2/DPX support) */
500   R_IMF_CHAN_DEPTH_12 = (1 << 3),
501   /* 16bits (tiff, half float exr) */
502   R_IMF_CHAN_DEPTH_16 = (1 << 4),
503   /* 24bits (unused) */
504   R_IMF_CHAN_DEPTH_24 = (1 << 5),
505   /* 32bits (full float exr) */
506   R_IMF_CHAN_DEPTH_32 = (1 << 6),
507 } eImageFormatDepth;
508 
509 /* ImageFormatData.planes */
510 #define R_IMF_PLANES_RGB 24
511 #define R_IMF_PLANES_RGBA 32
512 #define R_IMF_PLANES_BW 8
513 
514 /* ImageFormatData.exr_codec */
515 #define R_IMF_EXR_CODEC_NONE 0
516 #define R_IMF_EXR_CODEC_PXR24 1
517 #define R_IMF_EXR_CODEC_ZIP 2
518 #define R_IMF_EXR_CODEC_PIZ 3
519 #define R_IMF_EXR_CODEC_RLE 4
520 #define R_IMF_EXR_CODEC_ZIPS 5
521 #define R_IMF_EXR_CODEC_B44 6
522 #define R_IMF_EXR_CODEC_B44A 7
523 #define R_IMF_EXR_CODEC_DWAA 8
524 #define R_IMF_EXR_CODEC_DWAB 9
525 #define R_IMF_EXR_CODEC_MAX 10
526 
527 /* ImageFormatData.jp2_flag */
528 #define R_IMF_JP2_FLAG_YCC (1 << 0) /* when disabled use RGB */ /* was R_JPEG2K_YCC */
529 #define R_IMF_JP2_FLAG_CINE_PRESET (1 << 1)                     /* was R_JPEG2K_CINE_PRESET */
530 #define R_IMF_JP2_FLAG_CINE_48 (1 << 2)                         /* was R_JPEG2K_CINE_48FPS */
531 
532 /* ImageFormatData.jp2_codec */
533 #define R_IMF_JP2_CODEC_JP2 0
534 #define R_IMF_JP2_CODEC_J2K 1
535 
536 /* ImageFormatData.cineon_flag */
537 #define R_IMF_CINEON_FLAG_LOG (1 << 0) /* was R_CINEON_LOG */
538 
539 /* ImageFormatData.tiff_codec */
540 enum {
541   R_IMF_TIFF_CODEC_DEFLATE = 0,
542   R_IMF_TIFF_CODEC_LZW = 1,
543   R_IMF_TIFF_CODEC_PACKBITS = 2,
544   R_IMF_TIFF_CODEC_NONE = 3,
545 };
546 
547 typedef struct BakeData {
548   struct ImageFormatData im_format;
549 
550   /** FILE_MAX. */
551   char filepath[1024];
552 
553   short width, height;
554   short margin, flag;
555 
556   float cage_extrusion;
557   float max_ray_distance;
558   int pass_filter;
559 
560   char normal_swizzle[3];
561   char normal_space;
562 
563   char save_mode;
564   char _pad[7];
565 
566   struct Object *cage_object;
567 } BakeData;
568 
569 /* BakeData.normal_swizzle (char) */
570 typedef enum eBakeNormalSwizzle {
571   R_BAKE_POSX = 0,
572   R_BAKE_POSY = 1,
573   R_BAKE_POSZ = 2,
574   R_BAKE_NEGX = 3,
575   R_BAKE_NEGY = 4,
576   R_BAKE_NEGZ = 5,
577 } eBakeNormalSwizzle;
578 
579 /* BakeData.save_mode (char) */
580 typedef enum eBakeSaveMode {
581   R_BAKE_SAVE_INTERNAL = 0,
582   R_BAKE_SAVE_EXTERNAL = 1,
583 } eBakeSaveMode;
584 
585 /* BakeData.pass_filter */
586 typedef enum eBakePassFilter {
587   R_BAKE_PASS_FILTER_NONE = 0,
588   R_BAKE_PASS_FILTER_AO = (1 << 0),
589   R_BAKE_PASS_FILTER_EMIT = (1 << 1),
590   R_BAKE_PASS_FILTER_DIFFUSE = (1 << 2),
591   R_BAKE_PASS_FILTER_GLOSSY = (1 << 3),
592   R_BAKE_PASS_FILTER_TRANSM = (1 << 4),
593   R_BAKE_PASS_FILTER_SUBSURFACE = (1 << 5),
594   R_BAKE_PASS_FILTER_DIRECT = (1 << 6),
595   R_BAKE_PASS_FILTER_INDIRECT = (1 << 7),
596   R_BAKE_PASS_FILTER_COLOR = (1 << 8),
597 } eBakePassFilter;
598 
599 #define R_BAKE_PASS_FILTER_ALL (~0)
600 
601 /* *************************************************************** */
602 /* Render Data */
603 
604 typedef struct RenderData {
605   struct ImageFormatData im_format;
606 
607   struct AviCodecData *avicodecdata;
608   struct FFMpegCodecData ffcodecdata;
609 
610   /** Frames as in 'images'. */
611   int cfra, sfra, efra;
612   /** Subframe offset from cfra, in 0.0-1.0. */
613   float subframe;
614   /** Start+end frames of preview range. */
615   int psfra, pefra;
616 
617   int images, framapto;
618   short flag, threads;
619 
620   float framelen, blurfac;
621 
622   /** Frames to jump during render/playback. */
623   int frame_step;
624 
625   /** Standalone player stereo settings */ /* XXX deprecated since .2.5 */
626   short stereomode DNA_DEPRECATED;
627 
628   /** For the dimensions presets menu. */
629   short dimensionspreset;
630 
631   /** Size in %. */
632   short size;
633 
634   char _pad6[2];
635 
636   /* from buttons: */
637   /**
638    * The desired number of pixels in the x direction
639    */
640   int xsch;
641   /**
642    * The desired number of pixels in the y direction
643    */
644   int ysch;
645 
646   /**
647    * render tile dimensions
648    */
649   int tilex, tiley;
650 
651   short planes DNA_DEPRECATED;
652   short imtype DNA_DEPRECATED;
653   short subimtype DNA_DEPRECATED;
654   short quality DNA_DEPRECATED;
655 
656   char use_lock_interface;
657   char _pad7[3];
658 
659   /**
660    * Flags for render settings. Use bit-masking to access the settings.
661    */
662   int scemode;
663 
664   /**
665    * Flags for render settings. Use bit-masking to access the settings.
666    */
667   int mode;
668 
669   short frs_sec;
670 
671   /**
672    * What to do with the sky/background.
673    * Picks sky/premul blending for the background.
674    */
675   char alphamode;
676 
677   char _pad0[1];
678 
679   /** Render border to render sub-resions. */
680   rctf border;
681 
682   /* information on different layers to be rendered */
683   /** Converted to Scene->view_layers. */
684   ListBase layers DNA_DEPRECATED;
685   /** Converted to Scene->active_layer. */
686   short actlay DNA_DEPRECATED;
687   char _pad1[2];
688 
689   /**
690    * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
691    */
692   float xasp, yasp;
693 
694   float frs_sec_base;
695 
696   /**
697    * Value used to define filter size for all filter options  */
698   float gauss;
699 
700   /* color management settings - color profiles, gamma correction, etc */
701   int color_mgt_flag;
702 
703   /* Dither noise intensity */
704   float dither_intensity;
705 
706   /* Bake Render options */
707   short bake_mode, bake_flag;
708   short bake_filter, bake_samples;
709   float bake_biasdist, bake_user_scale;
710 
711   /* path to render output */
712   /** 1024 = FILE_MAX. */
713   char pic[1024];
714 
715   /* stamps flags. */
716   int stamp;
717   /** Select one of blenders bitmap fonts. */
718   short stamp_font_id;
719   char _pad3[2];
720 
721   /* stamp info user data. */
722   char stamp_udata[768];
723 
724   /* foreground/background color. */
725   float fg_stamp[4];
726   float bg_stamp[4];
727 
728   /* sequencer options */
729   char seq_prev_type;
730   /** UNUSED!. */
731   char seq_rend_type;
732   /** Flag use for sequence render/draw. */
733   char seq_flag;
734   char _pad5[3];
735 
736   /* render simplify */
737   short simplify_subsurf;
738   short simplify_subsurf_render;
739   short simplify_gpencil;
740   float simplify_particles;
741   float simplify_particles_render;
742   float simplify_volumes;
743 
744   /* Freestyle line thickness options */
745   int line_thickness_mode;
746   /** In pixels. */
747   float unit_line_thickness;
748 
749   /* render engine */
750   char engine[32];
751   char _pad2[2];
752 
753   /* Performance Options */
754   short perf_flag;
755 
756   /* Cycles baking */
757   struct BakeData bake;
758 
759   int preview_start_resolution;
760   short preview_pixel_size;
761 
762   /* Type of the debug pass to use.
763    * Only used when built with debug passes support.
764    */
765   short debug_pass_type;
766 
767   /* MultiView */
768   /** SceneRenderView. */
769   ListBase views;
770   short actview;
771   short views_format;
772 
773   /* Hair Display */
774   short hair_type, hair_subdiv;
775 
776   /* Motion blur shutter */
777   struct CurveMapping mblur_shutter_curve;
778 } RenderData;
779 
780 /* RenderData.quality_flag */
781 typedef enum eQualityOption {
782   SCE_PERF_HQ_NORMALS = (1 << 0),
783 } eQualityOption;
784 
785 /* RenderData.hair_type */
786 typedef enum eHairType {
787   SCE_HAIR_SHAPE_STRAND = 0,
788   SCE_HAIR_SHAPE_STRIP = 1,
789 } eHairType;
790 
791 /* *************************************************************** */
792 /* Render Conversion/Simplfication Settings */
793 
794 /* control render convert and shading engine */
795 typedef struct RenderProfile {
796   struct RenderProfile *next, *prev;
797   char name[32];
798 
799   short particle_perc;
800   short subsurf_max;
801   short shadbufsample_max;
802   char _pad1[2];
803 
804   float ao_error;
805   char _pad2[4];
806 
807 } RenderProfile;
808 
809 /* UV Paint */
810 /* ToolSettings.uv_sculpt_settings */
811 #define UV_SCULPT_LOCK_BORDERS 1
812 #define UV_SCULPT_ALL_ISLANDS 2
813 
814 /* ToolSettings.uv_relax_method */
815 #define UV_SCULPT_TOOL_RELAX_LAPLACIAN 1
816 #define UV_SCULPT_TOOL_RELAX_HC 2
817 
818 /* Stereo Flags */
819 #define STEREO_RIGHT_NAME "right"
820 #define STEREO_LEFT_NAME "left"
821 #define STEREO_RIGHT_SUFFIX "_R"
822 #define STEREO_LEFT_SUFFIX "_L"
823 
824 /* View3D.stereo3d_camera / View3D.multiview_eye / ImageUser.multiview_eye */
825 typedef enum eStereoViews {
826   STEREO_LEFT_ID = 0,
827   STEREO_RIGHT_ID = 1,
828   STEREO_3D_ID = 2,
829   STEREO_MONO_ID = 3,
830 } eStereoViews;
831 
832 /* *************************************************************** */
833 /* Markers */
834 
835 typedef struct TimeMarker {
836   struct TimeMarker *next, *prev;
837   int frame;
838   char name[64];
839   unsigned int flag;
840   struct Object *camera;
841   struct IDProperty *prop;
842 } TimeMarker;
843 
844 /* *************************************************************** */
845 /* Paint Mode/Tool Data */
846 
847 #define PAINT_MAX_INPUT_SAMPLES 64
848 
849 typedef struct Paint_Runtime {
850   /* Avoid having to compare with scene pointer everywhere. */
851   unsigned int tool_offset;
852   unsigned short ob_mode;
853   char _pad[2];
854 } Paint_Runtime;
855 
856 /* We might want to store other things here. */
857 typedef struct PaintToolSlot {
858   struct Brush *brush;
859 } PaintToolSlot;
860 
861 /* Paint Tool Base */
862 typedef struct Paint {
863   struct Brush *brush;
864 
865   /* Each tool has its own active brush,
866    * The currently active tool is defined by the current 'brush'. */
867   struct PaintToolSlot *tool_slots;
868   int tool_slots_len;
869   char _pad1[4];
870 
871   struct Palette *palette;
872   /** Cavity curve. */
873   struct CurveMapping *cavity_curve;
874 
875   /* WM Paint cursor */
876   void *paint_cursor;
877   unsigned char paint_cursor_col[4];
878 
879   /* enum ePaintFlags */
880   int flags;
881 
882   /* Paint stroke can use up to PAINT_MAX_INPUT_SAMPLES inputs to
883    * smooth the stroke */
884   int num_input_samples;
885 
886   /* flags used for symmetry */
887   int symmetry_flags;
888 
889   float tile_offset[3];
890   char _pad2[4];
891 
892   struct Paint_Runtime runtime;
893 } Paint;
894 
895 /* ------------------------------------------- */
896 /* Image Paint */
897 
898 /* Texture/Image Editor */
899 typedef struct ImagePaintSettings {
900   Paint paint;
901 
902   short flag, missing_data;
903 
904   /* for projection painting only */
905   short seam_bleed, normal_angle;
906   /** Capture size for re-projection. */
907   short screen_grab_size[2];
908 
909   /** Mode used for texture painting. */
910   int mode;
911 
912   /** Workaround until we support true layer masks. */
913   struct Image *stencil;
914   /** Clone layer for image mode for projective texture painting. */
915   struct Image *clone;
916   /** Canvas when the explicit system is used for painting. */
917   struct Image *canvas;
918   float stencil_col[3];
919   /** Dither amount used when painting on byte images. */
920   float dither;
921   /** Display texture interpolation method. */
922   int interp;
923   char _pad[4];
924 } ImagePaintSettings;
925 
926 /* ------------------------------------------- */
927 /* Particle Edit */
928 
929 /* Settings for a Particle Editing Brush */
930 typedef struct ParticleBrushData {
931   /** Common setting. */
932   short size;
933   /** For specific brushes only. */
934   short step, invert, count;
935   int flag;
936   float strength;
937 } ParticleBrushData;
938 
939 /* Particle Edit Mode Settings */
940 typedef struct ParticleEditSettings {
941   short flag;
942   short totrekey;
943   short totaddkey;
944   short brushtype;
945 
946   ParticleBrushData brush[7];
947   /** Runtime. */
948   void *paintcursor;
949 
950   float emitterdist, rt;
951 
952   int selectmode;
953   int edittype;
954 
955   int draw_step, fade_frames;
956 
957   struct Scene *scene;
958   struct Object *object;
959   struct Object *shape_object;
960 } ParticleEditSettings;
961 
962 /* ------------------------------------------- */
963 /* Sculpt */
964 
965 /* Sculpt */
966 typedef struct Sculpt {
967   Paint paint;
968 
969   /* For rotating around a pivot point */
970   // float pivot[3]; XXX not used?
971   int flags;
972 
973   int automasking_flags;
974 
975   /* Control tablet input */
976   // char tablet_size, tablet_strength; XXX not used?
977   int radial_symm[3];
978 
979   /* Maximum edge length for dynamic topology sculpting (in pixels) */
980   float detail_size;
981 
982   /* Direction used for SCULPT_OT_symmetrize operator */
983   int symmetrize_direction;
984 
985   /* gravity factor for sculpting */
986   float gravity_factor;
987 
988   /* scale for constant detail size */
989   /** Constant detail resolution (Blender unit / constant_detail). */
990   float constant_detail;
991   float detail_percent;
992 
993   struct Object *gravity_object;
994 } Sculpt;
995 
996 typedef struct UvSculpt {
997   Paint paint;
998 } UvSculpt;
999 
1000 /* grease pencil drawing brushes */
1001 typedef struct GpPaint {
1002   Paint paint;
1003   int flag;
1004   /* Mode of paint (Materials or Vertex Color). */
1005   int mode;
1006 } GpPaint;
1007 
1008 /* GpPaint.flag */
1009 enum {
1010   GPPAINT_FLAG_USE_MATERIAL = 0,
1011   GPPAINT_FLAG_USE_VERTEXCOLOR = 1,
1012 };
1013 
1014 /* Grease pencil vertex paint. */
1015 typedef struct GpVertexPaint {
1016   Paint paint;
1017   int flag;
1018   char _pad[4];
1019 } GpVertexPaint;
1020 
1021 /* Grease pencil sculpt paint. */
1022 typedef struct GpSculptPaint {
1023   Paint paint;
1024   int flag;
1025   char _pad[4];
1026 } GpSculptPaint;
1027 
1028 /* Grease pencil weight paint. */
1029 typedef struct GpWeightPaint {
1030   Paint paint;
1031   int flag;
1032   char _pad[4];
1033 } GpWeightPaint;
1034 
1035 /* ------------------------------------------- */
1036 /* Vertex Paint */
1037 
1038 /* Vertex Paint */
1039 typedef struct VPaint {
1040   Paint paint;
1041   char flag;
1042   char _pad[3];
1043   /** For mirrored painting. */
1044   int radial_symm[3];
1045 } VPaint;
1046 
1047 /* VPaint.flag */
1048 enum {
1049   /* weight paint only */
1050   VP_FLAG_VGROUP_RESTRICT = (1 << 7),
1051 };
1052 
1053 /* ------------------------------------------- */
1054 /* GPencil Stroke Sculpting */
1055 
1056 /* GP_Sculpt_Settings.lock_axis */
1057 typedef enum eGP_Lockaxis_Types {
1058   GP_LOCKAXIS_VIEW = 0,
1059   GP_LOCKAXIS_X = 1,
1060   GP_LOCKAXIS_Y = 2,
1061   GP_LOCKAXIS_Z = 3,
1062   GP_LOCKAXIS_CURSOR = 4,
1063 } eGP_Lockaxis_Types;
1064 
1065 /* Settings for a GPencil Speed Guide */
1066 typedef struct GP_Sculpt_Guide {
1067   char use_guide;
1068   char use_snapping;
1069   char reference_point;
1070   char type;
1071   char _pad2[4];
1072   float angle;
1073   float angle_snap;
1074   float spacing;
1075   float location[3];
1076   struct Object *reference_object;
1077 } GP_Sculpt_Guide;
1078 
1079 /* GPencil Stroke Sculpting Settings */
1080 typedef struct GP_Sculpt_Settings {
1081   /** Runtime. */
1082   void *paintcursor;
1083   /** #eGP_Sculpt_SettingsFlag. */
1084   int flag;
1085   /** #eGP_Lockaxis_Types lock drawing to one axis. */
1086   int lock_axis;
1087   /** Threshold for intersections */
1088   float isect_threshold;
1089   char _pad_[4];
1090   /** Multiframe edit falloff effect by frame. */
1091   struct CurveMapping *cur_falloff;
1092   /** Curve used for primitive tools. */
1093   struct CurveMapping *cur_primitive;
1094   /** Guides used for paint tools */
1095   struct GP_Sculpt_Guide guide;
1096 } GP_Sculpt_Settings;
1097 
1098 /* GP_Sculpt_Settings.flag */
1099 typedef enum eGP_Sculpt_SettingsFlag {
1100   /* enable falloff for multiframe editing */
1101   GP_SCULPT_SETT_FLAG_FRAME_FALLOFF = (1 << 0),
1102   /* apply primitive curve */
1103   GP_SCULPT_SETT_FLAG_PRIMITIVE_CURVE = (1 << 1),
1104   /* Scale thickness. */
1105   GP_SCULPT_SETT_FLAG_SCALE_THICKNESS = (1 << 3),
1106 } eGP_Sculpt_SettingsFlag;
1107 
1108 /* GP_Sculpt_Settings.gpencil_selectmode_sculpt */
1109 typedef enum eGP_Sculpt_SelectMaskFlag {
1110   /* only affect selected points */
1111   GP_SCULPT_MASK_SELECTMODE_POINT = (1 << 0),
1112   /* only affect selected strokes */
1113   GP_SCULPT_MASK_SELECTMODE_STROKE = (1 << 1),
1114   /* only affect selected segmenst */
1115   GP_SCULPT_MASK_SELECTMODE_SEGMENT = (1 << 2),
1116 } eGP_Sculpt_SelectMaskFlag;
1117 
1118 /* GP_Sculpt_Settings.gpencil_selectmode_vertex */
1119 typedef enum eGP_vertex_SelectMaskFlag {
1120   /* only affect selected points */
1121   GP_VERTEX_MASK_SELECTMODE_POINT = (1 << 0),
1122   /* only affect selected strokes */
1123   GP_VERTEX_MASK_SELECTMODE_STROKE = (1 << 1),
1124   /* only affect selected segmenst */
1125   GP_VERTEX_MASK_SELECTMODE_SEGMENT = (1 << 2),
1126 } eGP_Vertex_SelectMaskFlag;
1127 
1128 /* Settings for GP Interpolation Operators */
1129 typedef struct GP_Interpolate_Settings {
1130   /** #eGP_Interpolate_SettingsFlag. */
1131   short flag;
1132 
1133   /** #eGP_Interpolate_Type - Interpolation Mode. */
1134   char type;
1135   /** #eBezTriple_Easing - Easing mode (if easing equation used). */
1136   char easing;
1137 
1138   /** BEZT_IPO_BACK. */
1139   float back;
1140   /** BEZT_IPO_ELASTIC. */
1141   float amplitude, period;
1142   /* Step between sequence interpolated frames. */
1143   int step;
1144   char _pad[4];
1145 
1146   /** Custom interpolation curve (for use with GP_IPO_CURVEMAP). */
1147   struct CurveMapping *custom_ipo;
1148 } GP_Interpolate_Settings;
1149 
1150 /* GP_Interpolate_Settings.flag */
1151 typedef enum eGP_Interpolate_SettingsFlag {
1152   /* apply interpolation to all layers */
1153   GP_TOOLFLAG_INTERPOLATE_ALL_LAYERS = (1 << 0),
1154   /* apply interpolation to only selected */
1155   GP_TOOLFLAG_INTERPOLATE_ONLY_SELECTED = (1 << 1),
1156 } eGP_Interpolate_SettingsFlag;
1157 
1158 /* GP_Interpolate_Settings.type */
1159 typedef enum eGP_Interpolate_Type {
1160   /* Traditional Linear Interpolation */
1161   GP_IPO_LINEAR = 0,
1162 
1163   /* CurveMap Defined Interpolation */
1164   GP_IPO_CURVEMAP = 1,
1165 
1166   /* Easing Equations */
1167   GP_IPO_BACK = 3,
1168   GP_IPO_BOUNCE = 4,
1169   GP_IPO_CIRC = 5,
1170   GP_IPO_CUBIC = 6,
1171   GP_IPO_ELASTIC = 7,
1172   GP_IPO_EXPO = 8,
1173   GP_IPO_QUAD = 9,
1174   GP_IPO_QUART = 10,
1175   GP_IPO_QUINT = 11,
1176   GP_IPO_SINE = 12,
1177 } eGP_Interpolate_Type;
1178 
1179 /* *************************************************************** */
1180 /* Unified Paint Settings
1181  */
1182 
1183 /* These settings can override the equivalent fields in the active
1184  * Brush for any paint mode; the flag field controls whether these
1185  * values are used */
1186 typedef struct UnifiedPaintSettings {
1187   /* unified radius of brush in pixels */
1188   int size;
1189 
1190   /* unified radius of brush in Blender units */
1191   float unprojected_radius;
1192 
1193   /* unified strength of brush */
1194   float alpha;
1195 
1196   /* unified brush weight, [0, 1] */
1197   float weight;
1198 
1199   /* unified brush color */
1200   float rgb[3];
1201   /* unified brush secondary color */
1202   float secondary_rgb[3];
1203 
1204   /* user preferences for sculpt and paint */
1205   int flag;
1206 
1207   /* rake rotation */
1208 
1209   /* record movement of mouse so that rake can start at an intuitive angle */
1210   float last_rake[2];
1211   float last_rake_angle;
1212 
1213   int last_stroke_valid;
1214   float average_stroke_accum[3];
1215   int average_stroke_counter;
1216 
1217   float brush_rotation;
1218   float brush_rotation_sec;
1219 
1220   /*******************************************************************************
1221    * all data below are used to communicate with cursor drawing and tex sampling *
1222    *******************************************************************************/
1223   int anchored_size;
1224 
1225   /**
1226    * Normalization factor due to accumulated value of curve along spacing.
1227    * Calculated when brush spacing changes to dampen strength of stroke
1228    * if space attenuation is used.
1229    */
1230   float overlap_factor;
1231   char draw_inverted;
1232   /* check is there an ongoing stroke right now */
1233   char stroke_active;
1234 
1235   char draw_anchored;
1236   char do_linear_conversion;
1237 
1238   /* store last location of stroke or whether the mesh was hit.
1239    * Valid only while stroke is active */
1240   float last_location[3];
1241   int last_hit;
1242 
1243   float anchored_initial_mouse[2];
1244 
1245   /* radius of brush, premultiplied with pressure.
1246    * In case of anchored brushes contains the anchored radius */
1247   float pixel_radius;
1248   float initial_pixel_radius;
1249 
1250   char _pad[4];
1251 
1252   /* drawing pressure */
1253   float size_pressure_value;
1254 
1255   /* position of mouse, used to sample the texture */
1256   float tex_mouse[2];
1257 
1258   /* position of mouse, used to sample the mask texture */
1259   float mask_tex_mouse[2];
1260 
1261   /* ColorSpace cache to avoid locking up during sampling */
1262   struct ColorSpace *colorspace;
1263 } UnifiedPaintSettings;
1264 
1265 /* UnifiedPaintSettings.flag */
1266 typedef enum {
1267   UNIFIED_PAINT_SIZE = (1 << 0),
1268   UNIFIED_PAINT_ALPHA = (1 << 1),
1269   UNIFIED_PAINT_WEIGHT = (1 << 5),
1270   UNIFIED_PAINT_COLOR = (1 << 6),
1271 
1272   /* only used if unified size is enabled, mirrors the brush flag BRUSH_LOCK_SIZE */
1273   UNIFIED_PAINT_BRUSH_LOCK_SIZE = (1 << 2),
1274   UNIFIED_PAINT_FLAG_UNUSED_0 = (1 << 3),
1275 
1276   UNIFIED_PAINT_FLAG_UNUSED_1 = (1 << 4),
1277 } eUnifiedPaintSettingsFlags;
1278 
1279 typedef struct CurvePaintSettings {
1280   char curve_type;
1281   char flag;
1282   char depth_mode;
1283   char surface_plane;
1284   char fit_method;
1285   char _pad;
1286   short error_threshold;
1287   float radius_min, radius_max;
1288   float radius_taper_start, radius_taper_end;
1289   float surface_offset;
1290   float corner_angle;
1291 } CurvePaintSettings;
1292 
1293 /* CurvePaintSettings.flag */
1294 enum {
1295   CURVE_PAINT_FLAG_CORNERS_DETECT = (1 << 0),
1296   CURVE_PAINT_FLAG_PRESSURE_RADIUS = (1 << 1),
1297   CURVE_PAINT_FLAG_DEPTH_STROKE_ENDPOINTS = (1 << 2),
1298   CURVE_PAINT_FLAG_DEPTH_STROKE_OFFSET_ABS = (1 << 3),
1299 };
1300 
1301 /* CurvePaintSettings.fit_method */
1302 enum {
1303   CURVE_PAINT_FIT_METHOD_REFIT = 0,
1304   CURVE_PAINT_FIT_METHOD_SPLIT = 1,
1305 };
1306 
1307 /* CurvePaintSettings.depth_mode */
1308 enum {
1309   CURVE_PAINT_PROJECT_CURSOR = 0,
1310   CURVE_PAINT_PROJECT_SURFACE = 1,
1311 };
1312 
1313 /* CurvePaintSettings.surface_plane */
1314 enum {
1315   CURVE_PAINT_SURFACE_PLANE_NORMAL_VIEW = 0,
1316   CURVE_PAINT_SURFACE_PLANE_NORMAL_SURFACE = 1,
1317   CURVE_PAINT_SURFACE_PLANE_VIEW = 2,
1318 };
1319 
1320 /* *************************************************************** */
1321 /* Stats */
1322 
1323 /* Stats for Meshes */
1324 typedef struct MeshStatVis {
1325   char type;
1326   char _pad1[2];
1327 
1328   /* overhang */
1329   char overhang_axis;
1330   float overhang_min, overhang_max;
1331 
1332   /* thickness */
1333   float thickness_min, thickness_max;
1334   char thickness_samples;
1335   char _pad2[3];
1336 
1337   /* distort */
1338   float distort_min, distort_max;
1339 
1340   /* sharp */
1341   float sharp_min, sharp_max;
1342 } MeshStatVis;
1343 
1344 /* *************************************************************** */
1345 /* Tool Settings */
1346 
1347 /* CurvePaintSettings.surface_plane */
1348 enum {
1349   AUTO_MERGE = 1 << 0,
1350   AUTO_MERGE_AND_SPLIT = 1 << 1,
1351 };
1352 
1353 typedef struct ToolSettings {
1354   /** Vertex paint. */
1355   VPaint *vpaint;
1356   /** Weight paint. */
1357   VPaint *wpaint;
1358   Sculpt *sculpt;
1359   /** Uv smooth. */
1360   UvSculpt *uvsculpt;
1361   /** Gpencil paint. */
1362   GpPaint *gp_paint;
1363   /** Gpencil vertex paint. */
1364   GpVertexPaint *gp_vertexpaint;
1365   /** Gpencil sculpt paint. */
1366   GpSculptPaint *gp_sculptpaint;
1367   /** Gpencil weight paint. */
1368   GpWeightPaint *gp_weightpaint;
1369 
1370   /* Vertex group weight - used only for editmode, not weight
1371    * paint */
1372   float vgroup_weight;
1373 
1374   /** Remove doubles limit. */
1375   float doublimit;
1376   char automerge;
1377   char object_flag;
1378 
1379   /* Selection Mode for Mesh */
1380   short selectmode;
1381 
1382   /* UV Calculation */
1383   char unwrapper;
1384   char uvcalc_flag;
1385   char uv_flag;
1386   char uv_selectmode;
1387 
1388   float uvcalc_margin;
1389 
1390   /* Auto-IK */
1391   /** Runtime only. */
1392   short autoik_chainlen;
1393 
1394   /* Grease Pencil */
1395   /** Flags/options for how the tool works. */
1396   char gpencil_flags;
1397 
1398   /** Stroke placement settings: 3D View. */
1399   char gpencil_v3d_align;
1400   /** General 2D Editor. */
1401   char gpencil_v2d_align;
1402   /** Sequencer Preview. */
1403   char gpencil_seq_align;
1404   /** Image Editor. */
1405   char gpencil_ima_align;
1406 
1407   /* Annotations */
1408   /** Stroke placement settings - 3D View. */
1409   char annotate_v3d_align;
1410 
1411   /** Default stroke thickness for annotation strokes. */
1412   short annotate_thickness;
1413   /** Stroke selection mode for Edit. */
1414   char gpencil_selectmode_edit;
1415   /** Stroke selection mode for Sculpt. */
1416   char gpencil_selectmode_sculpt;
1417 
1418   /* Grease Pencil Sculpt */
1419   struct GP_Sculpt_Settings gp_sculpt;
1420 
1421   /* Grease Pencil Interpolation Tool(s) */
1422   struct GP_Interpolate_Settings gp_interpolate;
1423 
1424   /* Image Paint (8 bytes aligned please!) */
1425   struct ImagePaintSettings imapaint;
1426 
1427   /* Particle Editing */
1428   struct ParticleEditSettings particle;
1429 
1430   /* Transform Proportional Area of Effect */
1431   float proportional_size;
1432 
1433   /* Select Group Threshold */
1434   float select_thresh;
1435 
1436   /* Auto-Keying Mode */
1437   /** Defines in DNA_userdef_types.h. */
1438   short autokey_flag;
1439   char autokey_mode;
1440   /** Keyframe type (see DNA_curve_types.h). */
1441   char keyframe_type;
1442 
1443   /* Multires */
1444   char multires_subdiv_type;
1445 
1446   /* Edge tagging, store operator settings (no UI access). */
1447   char edge_mode;
1448 
1449   char edge_mode_live_unwrap;
1450 
1451   char _pad1[1];
1452 
1453   /* Transform */
1454   char transform_pivot_point;
1455   char transform_flag;
1456   char snap_mode, snap_node_mode;
1457   char snap_uv_mode;
1458   char snap_flag;
1459   char snap_target;
1460   char snap_transform_mode_flag;
1461 
1462   char proportional_edit, prop_mode;
1463   /** Proportional edit, object mode. */
1464   char proportional_objects;
1465   /** Proportional edit, mask editing. */
1466   char proportional_mask;
1467   /** Proportional edit, action editor. */
1468   char proportional_action;
1469   /** Proportional edit, graph editor. */
1470   char proportional_fcurve;
1471   /** Lock marker editing. */
1472   char lock_markers;
1473 
1474   /** Auto normalizing mode in wpaint. */
1475   char auto_normalize;
1476   /** Present weights as if all locked vertex groups were
1477    *  deleted, and the remaining deform groups normalized. */
1478   char wpaint_lock_relative;
1479   /** Paint multiple bones in wpaint. */
1480   char multipaint;
1481   char weightuser;
1482   /** Subset selection filter in wpaint. */
1483   char vgroupsubset;
1484 
1485   /** Stroke selection mode for Vertex Paint. */
1486   char gpencil_selectmode_vertex;
1487 
1488   /* UV painting */
1489   char _pad2[1];
1490   char uv_sculpt_settings;
1491   char uv_relax_method;
1492   /* XXX: these sculpt_paint_* fields are deprecated, use the
1493    * unified_paint_settings field instead! */
1494   short sculpt_paint_settings DNA_DEPRECATED;
1495 
1496   char workspace_tool_type;
1497 
1498   char _pad5[1];
1499   int sculpt_paint_unified_size DNA_DEPRECATED;
1500   float sculpt_paint_unified_unprojected_radius DNA_DEPRECATED;
1501   float sculpt_paint_unified_alpha DNA_DEPRECATED;
1502 
1503   /* Unified Paint Settings */
1504   struct UnifiedPaintSettings unified_paint_settings;
1505 
1506   struct CurvePaintSettings curve_paint_settings;
1507 
1508   struct MeshStatVis statvis;
1509 
1510   /* Normal Editing */
1511   float normal_vector[3];
1512   char _pad6[4];
1513 
1514   /* Custom Curve Profile for bevel tool:
1515    * Temporary until there is a proper preset system that stores the profiles or maybe stores
1516    * entire bevel configurations. */
1517   struct CurveProfile *custom_bevel_profile_preset;
1518 } ToolSettings;
1519 
1520 /* *************************************************************** */
1521 /* Assorted Scene Data */
1522 
1523 /* ------------------------------------------- */
1524 /* Unit Settings */
1525 
1526 typedef struct UnitSettings {
1527   /* Display/Editing unit options for each scene */
1528   /** Maybe have other unit conversions?. */
1529   float scale_length;
1530   /** Imperial, metric etc. */
1531   char system;
1532   /** Not implemented as a proper unit system yet. */
1533   char system_rotation;
1534   short flag;
1535 
1536   char length_unit;
1537   char mass_unit;
1538   char time_unit;
1539   char temperature_unit;
1540 
1541   char _pad[4];
1542 } UnitSettings;
1543 
1544 /* ------------------------------------------- */
1545 /* Global/Common Physics Settings */
1546 
1547 typedef struct PhysicsSettings {
1548   float gravity[3];
1549   int flag, quick_cache_step, rt;
1550 } PhysicsSettings;
1551 
1552 /* ------------------------------------------- */
1553 /* Safe Area options used in Camera View & Sequencer
1554  */
1555 typedef struct DisplaySafeAreas {
1556   /* each value represents the (x,y) margins as a multiplier.
1557    * 'center' in this context is just the name for a different kind of safe-area */
1558 
1559   /** Title Safe. */
1560   float title[2];
1561   /** Image/Graphics Safe. */
1562   float action[2];
1563 
1564   /* use for alternate aspect ratio */
1565   float title_center[2];
1566   float action_center[2];
1567 } DisplaySafeAreas;
1568 
1569 /* ------------------------------------------- */
1570 /* Scene Display - used for store scene specific display settings for the 3d view */
1571 typedef struct SceneDisplay {
1572   /** Light direction for shadows/highlight. */
1573   float light_direction[3];
1574   float shadow_shift, shadow_focus;
1575 
1576   /** Settings for Cavity Shader. */
1577   float matcap_ssao_distance;
1578   float matcap_ssao_attenuation;
1579   int matcap_ssao_samples;
1580 
1581   /** Method of AA for viewport rendering and image rendering */
1582   char viewport_aa;
1583   char render_aa;
1584   char _pad[6];
1585 
1586   /** OpenGL render engine settings. */
1587   View3DShading shading;
1588 } SceneDisplay;
1589 
1590 typedef struct SceneEEVEE {
1591   int flag;
1592   int gi_diffuse_bounces;
1593   int gi_cubemap_resolution;
1594   int gi_visibility_resolution;
1595   float gi_irradiance_smoothing;
1596   float gi_glossy_clamp;
1597   float gi_filter_quality;
1598 
1599   float gi_cubemap_draw_size;
1600   float gi_irradiance_draw_size;
1601 
1602   int taa_samples;
1603   int taa_render_samples;
1604   int sss_samples;
1605   float sss_jitter_threshold;
1606 
1607   float ssr_quality;
1608   float ssr_max_roughness;
1609   float ssr_thickness;
1610   float ssr_border_fade;
1611   float ssr_firefly_fac;
1612 
1613   float volumetric_start;
1614   float volumetric_end;
1615   int volumetric_tile_size;
1616   int volumetric_samples;
1617   float volumetric_sample_distribution;
1618   float volumetric_light_clamp;
1619   int volumetric_shadow_samples;
1620 
1621   float gtao_distance;
1622   float gtao_factor;
1623   float gtao_quality;
1624 
1625   float bokeh_max_size;
1626   float bokeh_threshold;
1627 
1628   float bloom_color[3];
1629   float bloom_threshold;
1630   float bloom_knee;
1631   float bloom_intensity;
1632   float bloom_radius;
1633   float bloom_clamp;
1634 
1635   int motion_blur_samples DNA_DEPRECATED;
1636   int motion_blur_max;
1637   int motion_blur_steps;
1638   int motion_blur_position;
1639   float motion_blur_shutter;
1640   float motion_blur_depth_scale;
1641   char _pad0[4];
1642 
1643   int shadow_method DNA_DEPRECATED;
1644   int shadow_cube_size;
1645   int shadow_cascade_size;
1646 
1647   struct LightCache *light_cache DNA_DEPRECATED;
1648   struct LightCache *light_cache_data;
1649   char light_cache_info[64];
1650 
1651   float overscan;
1652   float light_threshold;
1653 } SceneEEVEE;
1654 
1655 typedef struct SceneGpencil {
1656   float smaa_threshold;
1657   char _pad[4];
1658 } SceneGpencil;
1659 
1660 /* *************************************************************** */
1661 /* Scene ID-Block */
1662 
1663 typedef struct TransformOrientationSlot {
1664   int type;
1665   int index_custom;
1666   char flag;
1667   char _pad0[7];
1668 } TransformOrientationSlot;
1669 
1670 /** Indices when used in #Scene.orientation_slots */
1671 enum {
1672   SCE_ORIENT_DEFAULT = 0,
1673   SCE_ORIENT_TRANSLATE = 1,
1674   SCE_ORIENT_ROTATE = 2,
1675   SCE_ORIENT_SCALE = 3,
1676 };
1677 
1678 typedef struct Scene {
1679   ID id;
1680   /** Animation data (must be immediately after id for utilities to use it). */
1681   struct AnimData *adt;
1682 
1683   struct Object *camera;
1684   struct World *world;
1685 
1686   struct Scene *set;
1687 
1688   ListBase base DNA_DEPRECATED;
1689   /** Active base. */
1690   struct Base *basact DNA_DEPRECATED;
1691   void *_pad1;
1692 
1693   /** 3d cursor location. */
1694   View3DCursor cursor;
1695 
1696   /** Bitflags for layer visibility (deprecated). */
1697   unsigned int lay DNA_DEPRECATED;
1698   /** Active layer (deprecated) */
1699   int layact DNA_DEPRECATED;
1700   char _pad2[4];
1701 
1702   /** Various settings. */
1703   short flag;
1704 
1705   char use_nodes;
1706   char _pad3[1];
1707 
1708   struct bNodeTree *nodetree;
1709 
1710   /** Sequence editor data is allocated here. */
1711   struct Editing *ed;
1712 
1713   /** Default allocated now. */
1714   struct ToolSettings *toolsettings;
1715   void *_pad4;
1716   struct DisplaySafeAreas safe_areas;
1717 
1718   /* migrate or replace? depends on some internal things... */
1719   /* no, is on the right place (ton) */
1720   struct RenderData r;
1721   struct AudioData audio;
1722 
1723   ListBase markers;
1724   ListBase transform_spaces;
1725 
1726   /** First is the [scene, translate, rotate, scale]. */
1727   TransformOrientationSlot orientation_slots[4];
1728 
1729   void *sound_scene;
1730   void *playback_handle;
1731   void *sound_scrub_handle;
1732   void *speaker_handles;
1733 
1734   /** (runtime) info/cache used for presenting playback framerate info to the user. */
1735   void *fps_info;
1736 
1737   /* none of the dependency graph  vars is mean to be saved */
1738   struct GHash *depsgraph_hash;
1739   char _pad7[4];
1740 
1741   /* User-Defined KeyingSets */
1742   /**
1743    * Index of the active KeyingSet.
1744    * first KeyingSet has index 1, 'none' active is 0, 'add new' is -1
1745    */
1746   int active_keyingset;
1747   /** KeyingSets for this scene */
1748   ListBase keyingsets;
1749 
1750   /* Units */
1751   struct UnitSettings unit;
1752 
1753   /** Grease Pencil - Annotations */
1754   struct bGPdata *gpd;
1755 
1756   /* Movie Tracking */
1757   /** Active movie clip. */
1758   struct MovieClip *clip;
1759 
1760   /* Physics simulation settings */
1761   struct PhysicsSettings physics_settings;
1762 
1763   void *_pad8;
1764   /* XXX. runtime flag for drawing, actually belongs in the window,
1765    * only used by BKE_object_handle_update() */
1766   struct CustomData_MeshMasks customdata_mask;
1767   /* XXX. same as above but for temp operator use (gl renders) */
1768   struct CustomData_MeshMasks customdata_mask_modal;
1769 
1770   /* Color Management */
1771   ColorManagedViewSettings view_settings;
1772   ColorManagedDisplaySettings display_settings;
1773   ColorManagedColorspaceSettings sequencer_colorspace_settings;
1774 
1775   /* RigidBody simulation world+settings */
1776   struct RigidBodyWorld *rigidbody_world;
1777 
1778   struct PreviewImage *preview;
1779 
1780   ListBase view_layers;
1781   /* Not an actual datablock, but memory owned by scene. */
1782   Collection *master_collection;
1783   struct SceneCollection *collection DNA_DEPRECATED;
1784 
1785   /** Settings to be override by workspaces. */
1786   IDProperty *layer_properties;
1787   void *_pad9;
1788 
1789   struct SceneDisplay display;
1790   struct SceneEEVEE eevee;
1791   struct SceneGpencil grease_pencil_settings;
1792 } Scene;
1793 
1794 /* **************** RENDERDATA ********************* */
1795 
1796 /** #RenderData.flag */
1797 /* use preview range */
1798 #define SCER_PRV_RANGE (1 << 0)
1799 #define SCER_LOCK_FRAME_SELECTION (1 << 1)
1800 /* show/use subframes (for checking motion blur) */
1801 #define SCER_SHOW_SUBFRAME (1 << 3)
1802 
1803 /** #RenderData.mode */
1804 #define R_MODE_UNUSED_0 (1 << 0) /* dirty */
1805 #define R_MODE_UNUSED_1 (1 << 1) /* cleared */
1806 #define R_MODE_UNUSED_2 (1 << 2) /* cleared */
1807 #define R_MODE_UNUSED_3 (1 << 3) /* cleared */
1808 #define R_MODE_UNUSED_4 (1 << 4) /* cleared */
1809 #define R_MODE_UNUSED_5 (1 << 5) /* cleared */
1810 #define R_MODE_UNUSED_6 (1 << 6) /* cleared */
1811 #define R_MODE_UNUSED_7 (1 << 7) /* cleared */
1812 #define R_MODE_UNUSED_8 (1 << 8) /* cleared */
1813 #define R_BORDER (1 << 9)
1814 #define R_MODE_UNUSED_10 (1 << 10) /* cleared */
1815 #define R_CROP (1 << 11)
1816 /* Disable camera switching: runtime (DURIAN_CAMERA_SWITCH) */
1817 #define R_NO_CAMERA_SWITCH (1 << 12)
1818 #define R_MODE_UNUSED_13 (1 << 13) /* cleared */
1819 #define R_MBLUR (1 << 14)
1820 /* unified was here */
1821 #define R_MODE_UNUSED_16 (1 << 16) /* cleared */
1822 #define R_MODE_UNUSED_17 (1 << 17) /* cleared */
1823 #define R_MODE_UNUSED_18 (1 << 18) /* cleared */
1824 #define R_MODE_UNUSED_19 (1 << 19) /* cleared */
1825 #define R_FIXED_THREADS (1 << 19)
1826 
1827 #define R_MODE_UNUSED_20 (1 << 20) /* cleared */
1828 #define R_MODE_UNUSED_21 (1 << 21) /* cleared */
1829 #define R_NO_OVERWRITE (1 << 22)   /* skip existing files */
1830 #define R_TOUCH (1 << 23)          /* touch files before rendering */
1831 #define R_SIMPLIFY (1 << 24)
1832 #define R_EDGE_FRS (1 << 25)        /* R_EDGE reserved for Freestyle */
1833 #define R_PERSISTENT_DATA (1 << 26) /* keep data around for re-render */
1834 #define R_MODE_UNUSED_27 (1 << 27)  /* cleared */
1835 
1836 /** #RenderData.seq_flag */
1837 enum {
1838   R_SEQ_UNUSED_0 = (1 << 0), /* cleared */
1839   R_SEQ_UNUSED_1 = (1 << 1), /* cleared */
1840   R_SEQ_UNUSED_2 = (1 << 2), /* cleared */
1841   R_SEQ_UNUSED_3 = (1 << 3), /* cleared */
1842   R_SEQ_UNUSED_4 = (1 << 4), /* cleared */
1843   R_SEQ_OVERRIDE_SCENE_SETTINGS = (1 << 5),
1844 };
1845 
1846 /** #RenderData.filtertype (used for nodes) */
1847 #define R_FILTER_BOX 0
1848 #define R_FILTER_TENT 1
1849 #define R_FILTER_QUAD 2
1850 #define R_FILTER_CUBIC 3
1851 #define R_FILTER_CATROM 4
1852 #define R_FILTER_GAUSS 5
1853 #define R_FILTER_MITCH 6
1854 #define R_FILTER_FAST_GAUSS 7
1855 
1856 /** #RenderData.scemode */
1857 #define R_DOSEQ (1 << 0)
1858 #define R_BG_RENDER (1 << 1)
1859 /* passepartout is camera option now, keep this for backward compatibility */
1860 #define R_PASSEPARTOUT (1 << 2)
1861 #define R_BUTS_PREVIEW (1 << 3)
1862 #define R_EXTENSION (1 << 4)
1863 #define R_MATNODE_PREVIEW (1 << 5)
1864 #define R_DOCOMP (1 << 6)
1865 #define R_COMP_CROP (1 << 7)
1866 #define R_SCEMODE_UNUSED_8 (1 << 8) /* cleared */
1867 #define R_SINGLE_LAYER (1 << 9)
1868 #define R_EXR_TILE_FILE (1 << 10)
1869 #define R_SCEMODE_UNUSED_11 (1 << 11) /* cleared */
1870 #define R_NO_IMAGE_LOAD (1 << 12)
1871 #define R_SCEMODE_UNUSED_13 (1 << 13) /* cleared */
1872 #define R_NO_FRAME_UPDATE (1 << 14)
1873 #define R_FULL_SAMPLE (1 << 15)
1874 #define R_SCEMODE_UNUSED_16 (1 << 16) /* cleared */
1875 #define R_SCEMODE_UNUSED_17 (1 << 17) /* cleared */
1876 #define R_TEXNODE_PREVIEW (1 << 18)
1877 #define R_SCEMODE_UNUSED_19 (1 << 19) /* cleared */
1878 #define R_EXR_CACHE_FILE (1 << 20)
1879 #define R_MULTIVIEW (1 << 21)
1880 
1881 /** #RenderData.stamp */
1882 #define R_STAMP_TIME (1 << 0)
1883 #define R_STAMP_FRAME (1 << 1)
1884 #define R_STAMP_DATE (1 << 2)
1885 #define R_STAMP_CAMERA (1 << 3)
1886 #define R_STAMP_SCENE (1 << 4)
1887 #define R_STAMP_NOTE (1 << 5)
1888 #define R_STAMP_DRAW (1 << 6) /* draw in the image */
1889 #define R_STAMP_MARKER (1 << 7)
1890 #define R_STAMP_FILENAME (1 << 8)
1891 #define R_STAMP_SEQSTRIP (1 << 9)
1892 #define R_STAMP_RENDERTIME (1 << 10)
1893 #define R_STAMP_CAMERALENS (1 << 11)
1894 #define R_STAMP_STRIPMETA (1 << 12)
1895 #define R_STAMP_MEMORY (1 << 13)
1896 #define R_STAMP_HIDE_LABELS (1 << 14)
1897 #define R_STAMP_FRAME_RANGE (1 << 15)
1898 #define R_STAMP_HOSTNAME (1 << 16)
1899 #define R_STAMP_ALL \
1900   (R_STAMP_TIME | R_STAMP_FRAME | R_STAMP_DATE | R_STAMP_CAMERA | R_STAMP_SCENE | R_STAMP_NOTE | \
1901    R_STAMP_MARKER | R_STAMP_FILENAME | R_STAMP_SEQSTRIP | R_STAMP_RENDERTIME | \
1902    R_STAMP_CAMERALENS | R_STAMP_MEMORY | R_STAMP_HIDE_LABELS | R_STAMP_FRAME_RANGE | \
1903    R_STAMP_HOSTNAME)
1904 
1905 /** #RenderData.alphamode */
1906 enum {
1907   R_ADDSKY = 0,
1908   R_ALPHAPREMUL = 1,
1909 };
1910 
1911 /** #RenderData.color_mgt_flag */
1912 enum {
1913   /** deprecated, should only be used in versioning code only */
1914   R_COLOR_MANAGEMENT = (1 << 0),
1915   R_COLOR_MANAGEMENT_UNUSED_1 = (1 << 1),
1916 };
1917 
1918 /* bake_mode: same as RE_BAKE_xxx defines */
1919 /* RenderData.bake_flag */
1920 #define R_BAKE_CLEAR (1 << 0)
1921 /* #define R_BAKE_OSA       (1 << 1) */ /* deprecated */
1922 #define R_BAKE_TO_ACTIVE (1 << 2)
1923 /* #define R_BAKE_NORMALIZE (1 << 3) */ /* deprecated */
1924 #define R_BAKE_MULTIRES (1 << 4)
1925 #define R_BAKE_LORES_MESH (1 << 5)
1926 /* #define R_BAKE_VCOL      (1 << 6) */ /* deprecated */
1927 #define R_BAKE_USERSCALE (1 << 7)
1928 #define R_BAKE_CAGE (1 << 8)
1929 #define R_BAKE_SPLIT_MAT (1 << 9)
1930 #define R_BAKE_AUTO_NAME (1 << 10)
1931 
1932 /* RenderData.bake_normal_space */
1933 #define R_BAKE_SPACE_CAMERA 0
1934 #define R_BAKE_SPACE_WORLD 1
1935 #define R_BAKE_SPACE_OBJECT 2
1936 #define R_BAKE_SPACE_TANGENT 3
1937 
1938 /* RenderData.line_thickness_mode */
1939 #define R_LINE_THICKNESS_ABSOLUTE 1
1940 #define R_LINE_THICKNESS_RELATIVE 2
1941 
1942 /* sequencer seq_prev_type seq_rend_type */
1943 
1944 /* RenderData.engine (scene.c) */
1945 extern const char *RE_engine_id_BLENDER_EEVEE;
1946 extern const char *RE_engine_id_BLENDER_WORKBENCH;
1947 extern const char *RE_engine_id_CYCLES;
1948 
1949 /* **************** SCENE ********************* */
1950 
1951 /* note that much higher maxframes give imprecise sub-frames, see: T46859 */
1952 /* Current precision is 16 for the sub-frames closer to MAXFRAME. */
1953 
1954 /* for general use */
1955 #define MAXFRAME 1048574
1956 #define MAXFRAMEF 1048574.0f
1957 
1958 #define MINFRAME 0
1959 #define MINFRAMEF 0.0f
1960 
1961 /* (minimum frame number for current-frame) */
1962 #define MINAFRAME -1048574
1963 #define MINAFRAMEF -1048574.0f
1964 
1965 #define BASE_VISIBLE(v3d, base) BKE_base_is_visible(v3d, base)
1966 #define BASE_SELECTABLE(v3d, base) \
1967   (BASE_VISIBLE(v3d, base) && \
1968    ((v3d == NULL) || (((1 << (base)->object->type) & (v3d)->object_type_exclude_select) == 0)) && \
1969    (((base)->flag & BASE_SELECTABLE) != 0))
1970 #define BASE_SELECTED(v3d, base) (BASE_VISIBLE(v3d, base) && (((base)->flag & BASE_SELECTED) != 0))
1971 #define BASE_EDITABLE(v3d, base) (BASE_VISIBLE(v3d, base) && ((base)->object->id.lib == NULL))
1972 #define BASE_SELECTED_EDITABLE(v3d, base) \
1973   (BASE_EDITABLE(v3d, base) && (((base)->flag & BASE_SELECTED) != 0))
1974 
1975 /* deprecate this! */
1976 #define FIRSTBASE(_view_layer) ((_view_layer)->object_bases.first)
1977 #define LASTBASE(_view_layer) ((_view_layer)->object_bases.last)
1978 #define BASACT(_view_layer) ((_view_layer)->basact)
1979 #define OBACT(_view_layer) (BASACT(_view_layer) ? BASACT(_view_layer)->object : NULL)
1980 
1981 #define OBEDIT_FROM_WORKSPACE(workspace, _view_layer) \
1982   (((workspace)->object_mode & OD_MODE_EDIT) ? OBACT(_view_layer) : NULL)
1983 #define OBEDIT_FROM_OBACT(ob) ((ob) ? (((ob)->mode & OB_MODE_EDIT) ? ob : NULL) : NULL)
1984 #define OBPOSE_FROM_OBACT(ob) ((ob) ? (((ob)->mode & OB_MODE_POSE) ? ob : NULL) : NULL)
1985 #define OBWEIGHTPAINT_FROM_OBACT(ob) \
1986   ((ob) ? (((ob)->mode & OB_MODE_WEIGHT_PAINT) ? ob : NULL) : NULL)
1987 #define OBEDIT_FROM_VIEW_LAYER(view_layer) OBEDIT_FROM_OBACT(OBACT(view_layer))
1988 
1989 #define V3D_CAMERA_LOCAL(v3d) ((!(v3d)->scenelock && (v3d)->camera) ? (v3d)->camera : NULL)
1990 #define V3D_CAMERA_SCENE(scene, v3d) \
1991   ((!(v3d)->scenelock && (v3d)->camera) ? (v3d)->camera : (scene)->camera)
1992 
1993 #define CFRA (scene->r.cfra)
1994 #define SUBFRA (scene->r.subframe)
1995 #define SFRA (scene->r.sfra)
1996 #define EFRA (scene->r.efra)
1997 #define PRVRANGEON (scene->r.flag & SCER_PRV_RANGE)
1998 #define PSFRA ((PRVRANGEON) ? (scene->r.psfra) : (scene->r.sfra))
1999 #define PEFRA ((PRVRANGEON) ? (scene->r.pefra) : (scene->r.efra))
2000 #define FRA2TIME(a) ((((double)scene->r.frs_sec_base) * (double)(a)) / (double)scene->r.frs_sec)
2001 #define TIME2FRA(a) ((((double)scene->r.frs_sec) * (double)(a)) / (double)scene->r.frs_sec_base)
2002 #define FPS (((double)scene->r.frs_sec) / (double)scene->r.frs_sec_base)
2003 
2004 /* Base.flag is in DNA_object_types.h */
2005 
2006 /* ToolSettings.transform_flag */
2007 enum {
2008   SCE_XFORM_AXIS_ALIGN = (1 << 0),
2009   SCE_XFORM_DATA_ORIGIN = (1 << 1),
2010   SCE_XFORM_SKIP_CHILDREN = (1 << 2),
2011 };
2012 
2013 /* ToolSettings.object_flag */
2014 enum {
2015   SCE_OBJECT_MODE_LOCK = (1 << 0),
2016 };
2017 
2018 /* ToolSettings.workspace_tool_flag */
2019 enum {
2020   SCE_WORKSPACE_TOOL_FALLBACK = 0,
2021   SCE_WORKSPACE_TOOL_DEFAULT = 1,
2022 };
2023 
2024 /* ToolSettings.snap_flag */
2025 #define SCE_SNAP (1 << 0)
2026 #define SCE_SNAP_ROTATE (1 << 1)
2027 #define SCE_SNAP_PEEL_OBJECT (1 << 2)
2028 #define SCE_SNAP_PROJECT (1 << 3)
2029 #define SCE_SNAP_NO_SELF (1 << 4)
2030 #define SCE_SNAP_ABS_GRID (1 << 5)
2031 #define SCE_SNAP_BACKFACE_CULLING (1 << 6)
2032 
2033 /* ToolSettings.snap_target */
2034 #define SCE_SNAP_TARGET_CLOSEST 0
2035 #define SCE_SNAP_TARGET_CENTER 1
2036 #define SCE_SNAP_TARGET_MEDIAN 2
2037 #define SCE_SNAP_TARGET_ACTIVE 3
2038 
2039 /* ToolSettings.snap_mode */
2040 #define SCE_SNAP_MODE_VERTEX (1 << 0)
2041 #define SCE_SNAP_MODE_EDGE (1 << 1)
2042 #define SCE_SNAP_MODE_FACE (1 << 2)
2043 #define SCE_SNAP_MODE_VOLUME (1 << 3)
2044 #define SCE_SNAP_MODE_INCREMENT (1 << 4)
2045 #define SCE_SNAP_MODE_EDGE_MIDPOINT (1 << 5)
2046 #define SCE_SNAP_MODE_EDGE_PERPENDICULAR (1 << 6)
2047 
2048 /* ToolSettings.snap_node_mode */
2049 #define SCE_SNAP_MODE_NODE_X (1 << 5)
2050 #define SCE_SNAP_MODE_NODE_Y (1 << 6)
2051 
2052 /* ToolSettings.snap_mode and ToolSettings.snap_node_mode */
2053 #define SCE_SNAP_MODE_GRID (1 << 7)
2054 
2055 /** #ToolSettings.snap_transform_mode_flag */
2056 enum {
2057   SCE_SNAP_TRANSFORM_MODE_TRANSLATE = (1 << 0),
2058   SCE_SNAP_TRANSFORM_MODE_ROTATE = (1 << 1),
2059   SCE_SNAP_TRANSFORM_MODE_SCALE = (1 << 2),
2060 };
2061 
2062 /* ToolSettings.selectmode */
2063 #define SCE_SELECT_VERTEX (1 << 0) /* for mesh */
2064 #define SCE_SELECT_EDGE (1 << 1)
2065 #define SCE_SELECT_FACE (1 << 2)
2066 
2067 /* MeshStatVis.type */
2068 #define SCE_STATVIS_OVERHANG 0
2069 #define SCE_STATVIS_THICKNESS 1
2070 #define SCE_STATVIS_INTERSECT 2
2071 #define SCE_STATVIS_DISTORT 3
2072 #define SCE_STATVIS_SHARP 4
2073 
2074 /* ParticleEditSettings.selectmode for particles */
2075 #define SCE_SELECT_PATH (1 << 0)
2076 #define SCE_SELECT_POINT (1 << 1)
2077 #define SCE_SELECT_END (1 << 2)
2078 
2079 /* ToolSettings.prop_mode (proportional falloff) */
2080 #define PROP_SMOOTH 0
2081 #define PROP_SPHERE 1
2082 #define PROP_ROOT 2
2083 #define PROP_SHARP 3
2084 #define PROP_LIN 4
2085 #define PROP_CONST 5
2086 #define PROP_RANDOM 6
2087 #define PROP_INVSQUARE 7
2088 #define PROP_MODE_MAX 8
2089 
2090 /** #ToolSettings.proportional_edit & similarly named members. */
2091 enum {
2092   PROP_EDIT_USE = (1 << 0),
2093   PROP_EDIT_CONNECTED = (1 << 1),
2094   PROP_EDIT_PROJECTED = (1 << 2),
2095 };
2096 
2097 /* ToolSettings.weightuser */
2098 enum {
2099   OB_DRAW_GROUPUSER_NONE = 0,
2100   OB_DRAW_GROUPUSER_ACTIVE = 1,
2101   OB_DRAW_GROUPUSER_ALL = 2,
2102 };
2103 
2104 /* object_vgroup.c */
2105 /* ToolSettings.vgroupsubset */
2106 typedef enum eVGroupSelect {
2107   WT_VGROUP_ALL = 0,
2108   WT_VGROUP_ACTIVE = 1,
2109   WT_VGROUP_BONE_SELECT = 2,
2110   WT_VGROUP_BONE_DEFORM = 3,
2111   WT_VGROUP_BONE_DEFORM_OFF = 4,
2112 } eVGroupSelect;
2113 
2114 #define WT_VGROUP_MASK_ALL \
2115   ((1 << WT_VGROUP_ACTIVE) | (1 << WT_VGROUP_BONE_SELECT) | (1 << WT_VGROUP_BONE_DEFORM) | \
2116    (1 << WT_VGROUP_BONE_DEFORM_OFF) | (1 << WT_VGROUP_ALL))
2117 
2118 /* Scene.flag */
2119 #define SCE_DS_SELECTED (1 << 0)
2120 #define SCE_DS_COLLAPSED (1 << 1)
2121 #define SCE_NLA_EDIT_ON (1 << 2)
2122 #define SCE_FRAME_DROP (1 << 3)
2123 #define SCE_KEYS_NO_SELONLY (1 << 4)
2124 #define SCE_READFILE_LIBLINK_NEED_SETSCENE_CHECK (1 << 5)
2125 
2126 /* return flag BKE_scene_base_iter_next functions */
2127 /* #define F_ERROR          -1 */ /* UNUSED */
2128 #define F_START 0
2129 #define F_SCENE 1
2130 #define F_DUPLI 3
2131 
2132 /* AudioData.flag */
2133 #define AUDIO_MUTE (1 << 0)
2134 #define AUDIO_SYNC (1 << 1)
2135 #define AUDIO_SCRUB (1 << 2)
2136 #define AUDIO_VOLUME_ANIMATED (1 << 3)
2137 
2138 /* FFMpegCodecData.flags */
2139 enum {
2140 #ifdef DNA_DEPRECATED_ALLOW
2141   FFMPEG_MULTIPLEX_AUDIO = (1 << 0), /* deprecated, you can choose none as audiocodec now */
2142 #endif
2143   FFMPEG_AUTOSPLIT_OUTPUT = (1 << 1),
2144   FFMPEG_LOSSLESS_OUTPUT = (1 << 2),
2145   FFMPEG_USE_MAX_B_FRAMES = (1 << 3),
2146 };
2147 
2148 /* Paint.flags */
2149 typedef enum ePaintFlags {
2150   PAINT_SHOW_BRUSH = (1 << 0),
2151   PAINT_FAST_NAVIGATE = (1 << 1),
2152   PAINT_SHOW_BRUSH_ON_SURFACE = (1 << 2),
2153   PAINT_USE_CAVITY_MASK = (1 << 3),
2154   PAINT_SCULPT_DELAY_UPDATES = (1 << 4),
2155 } ePaintFlags;
2156 
2157 /* Paint.symmetry_flags
2158  * (for now just a duplicate of sculpt symmetry flags) */
2159 typedef enum ePaintSymmetryFlags {
2160   PAINT_SYMM_X = (1 << 0),
2161   PAINT_SYMM_Y = (1 << 1),
2162   PAINT_SYMM_Z = (1 << 2),
2163   PAINT_SYMMETRY_FEATHER = (1 << 3),
2164   PAINT_TILE_X = (1 << 4),
2165   PAINT_TILE_Y = (1 << 5),
2166   PAINT_TILE_Z = (1 << 6),
2167 } ePaintSymmetryFlags;
2168 
2169 #define PAINT_SYMM_AXIS_ALL (PAINT_SYMM_X | PAINT_SYMM_Y | PAINT_SYMM_Z)
2170 
2171 /* Sculpt.flags */
2172 /* These can eventually be moved to paint flags? */
2173 typedef enum eSculptFlags {
2174   SCULPT_FLAG_UNUSED_0 = (1 << 0), /* cleared */
2175   SCULPT_FLAG_UNUSED_1 = (1 << 1), /* cleared */
2176   SCULPT_FLAG_UNUSED_2 = (1 << 2), /* cleared */
2177 
2178   SCULPT_LOCK_X = (1 << 3),
2179   SCULPT_LOCK_Y = (1 << 4),
2180   SCULPT_LOCK_Z = (1 << 5),
2181 
2182   SCULPT_FLAG_UNUSED_6 = (1 << 6), /* cleared */
2183 
2184   SCULPT_FLAG_UNUSED_7 = (1 << 7), /* cleared */
2185   SCULPT_ONLY_DEFORM = (1 << 8),
2186   // SCULPT_SHOW_DIFFUSE = (1 << 9), /* deprecated */
2187 
2188   /* If set, the mesh will be drawn with smooth-shading in
2189    * dynamic-topology mode */
2190   SCULPT_DYNTOPO_SMOOTH_SHADING = (1 << 10),
2191 
2192   /* If set, dynamic-topology brushes will subdivide short edges */
2193   SCULPT_DYNTOPO_SUBDIVIDE = (1 << 12),
2194   /* If set, dynamic-topology brushes will collapse short edges */
2195   SCULPT_DYNTOPO_COLLAPSE = (1 << 11),
2196 
2197   /* If set, dynamic-topology detail size will be constant in object space */
2198   SCULPT_DYNTOPO_DETAIL_CONSTANT = (1 << 13),
2199   SCULPT_DYNTOPO_DETAIL_BRUSH = (1 << 14),
2200   SCULPT_DYNTOPO_DETAIL_MANUAL = (1 << 16),
2201 
2202   /* Don't display mask in viewport, but still use it for strokes. */
2203   SCULPT_HIDE_MASK = (1 << 15),
2204 
2205   /* Don't display face sets in viewport. */
2206   SCULPT_HIDE_FACE_SETS = (1 << 17),
2207 } eSculptFlags;
2208 
2209 /* ImagePaintSettings.mode */
2210 typedef enum eImagePaintMode {
2211   IMAGEPAINT_MODE_MATERIAL = 0, /* detect texture paint slots from the material */
2212   IMAGEPAINT_MODE_IMAGE = 1,    /* select texture paint image directly */
2213 } eImagePaintMode;
2214 
2215 /* ImagePaintSettings.interp */
2216 enum {
2217   IMAGEPAINT_INTERP_LINEAR = 0,
2218   IMAGEPAINT_INTERP_CLOSEST = 1,
2219 };
2220 
2221 /* ImagePaintSettings.flag */
2222 #define IMAGEPAINT_DRAWING (1 << 0)
2223 // #define IMAGEPAINT_DRAW_TOOL         (1 << 1) /* deprecated */
2224 // #define IMAGEPAINT_DRAW_TOOL_DRAWING (1 << 2) /* deprecated */
2225 
2226 /* projection painting only */
2227 /* ImagePaintSettings.flag */
2228 #define IMAGEPAINT_PROJECT_XRAY (1 << 4)
2229 #define IMAGEPAINT_PROJECT_BACKFACE (1 << 5)
2230 #define IMAGEPAINT_PROJECT_FLAT (1 << 6)
2231 #define IMAGEPAINT_PROJECT_LAYER_CLONE (1 << 7)
2232 #define IMAGEPAINT_PROJECT_LAYER_STENCIL (1 << 8)
2233 #define IMAGEPAINT_PROJECT_LAYER_STENCIL_INV (1 << 9)
2234 
2235 /* ImagePaintSettings.missing_data */
2236 #define IMAGEPAINT_MISSING_UVS (1 << 0)
2237 #define IMAGEPAINT_MISSING_MATERIAL (1 << 1)
2238 #define IMAGEPAINT_MISSING_TEX (1 << 2)
2239 #define IMAGEPAINT_MISSING_STENCIL (1 << 3)
2240 
2241 /* ToolSettings.uvcalc_flag */
2242 #define UVCALC_FILLHOLES (1 << 0)
2243 /** would call this UVCALC_ASPECT_CORRECT, except it should be default with old file */
2244 #define UVCALC_NO_ASPECT_CORRECT (1 << 1)
2245 /** Adjust UV's while transforming with Vert or Edge Slide. */
2246 #define UVCALC_TRANSFORM_CORRECT_SLIDE (1 << 2)
2247 /** Use mesh data after subsurf to compute UVs*/
2248 #define UVCALC_USESUBSURF (1 << 3)
2249 /** adjust UV's while transforming to avoid distortion */
2250 #define UVCALC_TRANSFORM_CORRECT (1 << 4)
2251 /** Keep equal values merged while correcting custom-data. */
2252 #define UVCALC_TRANSFORM_CORRECT_KEEP_CONNECTED (1 << 5)
2253 
2254 /* ToolSettings.uv_flag */
2255 #define UV_SYNC_SELECTION 1
2256 #define UV_SHOW_SAME_IMAGE 2
2257 
2258 /* ToolSettings.uv_selectmode */
2259 #define UV_SELECT_VERTEX 1
2260 #define UV_SELECT_EDGE 2
2261 #define UV_SELECT_FACE 4
2262 #define UV_SELECT_ISLAND 8
2263 
2264 /* ToolSettings.gpencil_flags */
2265 typedef enum eGPencil_Flags {
2266   /* When creating new frames, the last frame gets used as the basis for the new one */
2267   GP_TOOL_FLAG_RETAIN_LAST = (1 << 1),
2268   /* Add the strokes below all strokes in the layer */
2269   GP_TOOL_FLAG_PAINT_ONBACK = (1 << 2),
2270   /* Show compact list of colors */
2271   GP_TOOL_FLAG_THUMBNAIL_LIST = (1 << 3),
2272   /* Generate wheight data for new strokes */
2273   GP_TOOL_FLAG_CREATE_WEIGHTS = (1 << 4),
2274 } eGPencil_Flags;
2275 
2276 /* scene->r.simplify_gpencil */
2277 typedef enum eGPencil_SimplifyFlags {
2278   /* Simplify */
2279   SIMPLIFY_GPENCIL_ENABLE = (1 << 0),
2280   /* Simplify on play */
2281   SIMPLIFY_GPENCIL_ON_PLAY = (1 << 1),
2282   /* Simplify fill on viewport */
2283   SIMPLIFY_GPENCIL_FILL = (1 << 2),
2284   /* Simplify modifier on viewport */
2285   SIMPLIFY_GPENCIL_MODIFIER = (1 << 3),
2286   /* Simplify Shader FX */
2287   SIMPLIFY_GPENCIL_FX = (1 << 5),
2288   /* Simplify layer tint */
2289   SIMPLIFY_GPENCIL_TINT = (1 << 7),
2290   /* Simplify Antialiasing */
2291   SIMPLIFY_GPENCIL_AA = (1 << 8),
2292 } eGPencil_SimplifyFlags;
2293 
2294 /* ToolSettings.gpencil_*_align - Stroke Placement mode flags */
2295 typedef enum eGPencil_Placement_Flags {
2296   /* New strokes are added in viewport/data space (i.e. not screen space) */
2297   GP_PROJECT_VIEWSPACE = (1 << 0),
2298 
2299   /* Viewport space, but relative to render canvas (Sequencer Preview Only) */
2300   /* GP_PROJECT_CANVAS = (1 << 1), */ /* UNUSED */
2301 
2302   /* Project into the screen's Z values */
2303   GP_PROJECT_DEPTH_VIEW = (1 << 2),
2304   GP_PROJECT_DEPTH_STROKE = (1 << 3),
2305 
2306   /* "Use Endpoints" */
2307   GP_PROJECT_DEPTH_STROKE_ENDPOINTS = (1 << 4),
2308   GP_PROJECT_CURSOR = (1 << 5),
2309   GP_PROJECT_DEPTH_STROKE_FIRST = (1 << 6),
2310 } eGPencil_Placement_Flags;
2311 
2312 /* ToolSettings.gpencil_selectmode */
2313 typedef enum eGPencil_Selectmode_types {
2314   GP_SELECTMODE_POINT = 0,
2315   GP_SELECTMODE_STROKE = 1,
2316   GP_SELECTMODE_SEGMENT = 2,
2317 } eGPencil_Selectmode_types;
2318 
2319 /* ToolSettings.gpencil_guide_types */
2320 typedef enum eGPencil_GuideTypes {
2321   GP_GUIDE_CIRCULAR = 0,
2322   GP_GUIDE_RADIAL = 1,
2323   GP_GUIDE_PARALLEL = 2,
2324   GP_GUIDE_GRID = 3,
2325   GP_GUIDE_ISO = 4,
2326 } eGPencil_GuideTypes;
2327 
2328 /* ToolSettings.gpencil_guide_references */
2329 typedef enum eGPencil_Guide_Reference {
2330   GP_GUIDE_REF_CURSOR = 0,
2331   GP_GUIDE_REF_CUSTOM = 1,
2332   GP_GUIDE_REF_OBJECT = 2,
2333 } eGPencil_Guide_Reference;
2334 
2335 /* ToolSettings.particle flag */
2336 #define PE_KEEP_LENGTHS (1 << 0)
2337 #define PE_LOCK_FIRST (1 << 1)
2338 #define PE_DEFLECT_EMITTER (1 << 2)
2339 #define PE_INTERPOLATE_ADDED (1 << 3)
2340 #define PE_DRAW_PART (1 << 4)
2341 #define PE_UNUSED_6 (1 << 6) /* cleared */
2342 #define PE_FADE_TIME (1 << 7)
2343 #define PE_AUTO_VELOCITY (1 << 8)
2344 
2345 /* ParticleEditSettings.brushtype */
2346 #define PE_BRUSH_NONE -1
2347 #define PE_BRUSH_COMB 0
2348 #define PE_BRUSH_CUT 1
2349 #define PE_BRUSH_LENGTH 2
2350 #define PE_BRUSH_PUFF 3
2351 #define PE_BRUSH_ADD 4
2352 #define PE_BRUSH_SMOOTH 5
2353 #define PE_BRUSH_WEIGHT 6
2354 
2355 /* ParticleBrushData.flag */
2356 #define PE_BRUSH_DATA_PUFF_VOLUME 1
2357 
2358 /* ParticleBrushData.edittype */
2359 #define PE_TYPE_PARTICLES 0
2360 #define PE_TYPE_SOFTBODY 1
2361 #define PE_TYPE_CLOTH 2
2362 
2363 /* PhysicsSettings.flag */
2364 #define PHYS_GLOBAL_GRAVITY 1
2365 
2366 /* UnitSettings */
2367 
2368 #define USER_UNIT_ADAPTIVE 0xFF
2369 /* UnitSettings.system */
2370 #define USER_UNIT_NONE 0
2371 #define USER_UNIT_METRIC 1
2372 #define USER_UNIT_IMPERIAL 2
2373 /* UnitSettings.flag */
2374 #define USER_UNIT_OPT_SPLIT 1
2375 #define USER_UNIT_ROT_RADIANS 2
2376 
2377 /* SceneEEVEE->flag */
2378 enum {
2379   // SCE_EEVEE_VOLUMETRIC_ENABLED = (1 << 0), /* Unused */
2380   SCE_EEVEE_VOLUMETRIC_LIGHTS = (1 << 1),
2381   SCE_EEVEE_VOLUMETRIC_SHADOWS = (1 << 2),
2382   //  SCE_EEVEE_VOLUMETRIC_COLORED    = (1 << 3), /* Unused */
2383   SCE_EEVEE_GTAO_ENABLED = (1 << 4),
2384   SCE_EEVEE_GTAO_BENT_NORMALS = (1 << 5),
2385   SCE_EEVEE_GTAO_BOUNCE = (1 << 6),
2386   // SCE_EEVEE_DOF_ENABLED = (1 << 7), /* Moved to camera->dof.flag */
2387   SCE_EEVEE_BLOOM_ENABLED = (1 << 8),
2388   SCE_EEVEE_MOTION_BLUR_ENABLED = (1 << 9),
2389   SCE_EEVEE_SHADOW_HIGH_BITDEPTH = (1 << 10),
2390   SCE_EEVEE_TAA_REPROJECTION = (1 << 11),
2391   // SCE_EEVEE_SSS_ENABLED = (1 << 12), /* Unused */
2392   // SCE_EEVEE_SSS_SEPARATE_ALBEDO = (1 << 13), /* Unused */
2393   SCE_EEVEE_SSR_ENABLED = (1 << 14),
2394   SCE_EEVEE_SSR_REFRACTION = (1 << 15),
2395   SCE_EEVEE_SSR_HALF_RESOLUTION = (1 << 16),
2396   SCE_EEVEE_SHOW_IRRADIANCE = (1 << 17),
2397   SCE_EEVEE_SHOW_CUBEMAPS = (1 << 18),
2398   SCE_EEVEE_GI_AUTOBAKE = (1 << 19),
2399   SCE_EEVEE_SHADOW_SOFT = (1 << 20),
2400   SCE_EEVEE_OVERSCAN = (1 << 21),
2401 };
2402 
2403 /* SceneEEVEE->shadow_method */
2404 enum {
2405   SHADOW_ESM = 1,
2406   /* SHADOW_VSM = 2, */        /* UNUSED */
2407   /* SHADOW_METHOD_MAX = 3, */ /* UNUSED */
2408 };
2409 
2410 /* SceneEEVEE->motion_blur_position */
2411 enum {
2412   SCE_EEVEE_MB_CENTER = 0,
2413   SCE_EEVEE_MB_START = 1,
2414   SCE_EEVEE_MB_END = 2,
2415 };
2416 
2417 /* SceneDisplay->render_aa, SceneDisplay->viewport_aa */
2418 enum {
2419   SCE_DISPLAY_AA_OFF = 0,
2420   SCE_DISPLAY_AA_FXAA = 1,
2421   SCE_DISPLAY_AA_SAMPLES_5 = 5,
2422   SCE_DISPLAY_AA_SAMPLES_8 = 8,
2423   SCE_DISPLAY_AA_SAMPLES_11 = 11,
2424   SCE_DISPLAY_AA_SAMPLES_16 = 16,
2425   SCE_DISPLAY_AA_SAMPLES_32 = 32,
2426 };
2427 
2428 #ifdef __cplusplus
2429 }
2430 #endif
2431