2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
19 * All rights reserved.
21 * The Original Code is: all of this file.
23 * Contributor(s): none yet.
25 * ***** END GPL LICENSE BLOCK *****
28 /** \file DNA_scene_types.h
32 #ifndef __DNA_SCENE_TYPES_H__
33 #define __DNA_SCENE_TYPES_H__
37 /* XXX, temp feature - campbell */
38 #define DURIAN_CAMERA_SWITCH
44 #include "DNA_color_types.h" /* color management */
45 #include "DNA_vec_types.h"
46 #include "DNA_listBase.h"
48 #include "DNA_freestyle_types.h"
49 #include "DNA_gpu_types.h"
50 #include "DNA_userdef_types.h"
69 /* ************************************************************* */
72 /* Base - Wrapper for referencing Objects in a Scene */
74 struct Base *next, *prev;
75 unsigned int lay, selcol;
78 struct Object *object;
81 /* ************************************************************* */
82 /* Output Format Data */
84 typedef struct AviCodecData {
85 void *lpFormat; /* save format */
86 void *lpParms; /* compressor options */
87 unsigned int cbFormat; /* size of lpFormat buffer */
88 unsigned int cbParms; /* size of lpParms buffer */
90 unsigned int fccType; /* stream type, for consistency */
91 unsigned int fccHandler; /* compressor */
92 unsigned int dwKeyFrameEvery; /* keyframe rate */
93 unsigned int dwQuality; /* compress quality 0-10,000 */
94 unsigned int dwBytesPerSecond; /* bytes per second */
95 unsigned int dwFlags; /* flags... see below */
96 unsigned int dwInterleaveEvery; /* for non-video streams only */
99 char avicodecname[128];
102 typedef struct QuicktimeCodecData {
103 /*Old quicktime implementation compatibility fields, read only in 2.5 - deprecated*/
104 void *cdParms; /* codec/compressor options */
105 void *pad; /* padding */
107 unsigned int cdSize; /* size of cdParms buffer */
108 unsigned int pad2; /* padding */
110 char qtcodecname[128];
111 } QuicktimeCodecData;
113 typedef struct QuicktimeCodecSettings {
114 /* Codec settings detailed for 2.5 implementation*/
115 int codecType; /* Types defined in quicktime_export.h */
116 int codecSpatialQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
118 /* Settings not available in current QTKit API */
122 int codecTemporalQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
123 int minSpatialQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
124 int minTemporalQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
126 int bitRate; /* bitrate in bps */
128 /* Audio Codec settings */
136 } QuicktimeCodecSettings;
138 typedef enum FFMpegPreset {
140 FFM_PRESET_ULTRAFAST,
141 FFM_PRESET_SUPERFAST,
152 /* Mapping from easily-understandable descriptions to CRF values.
153 * Assumes we output 8-bit video. Needs to be remapped if 10-bit
155 * We use a slightly wider than "subjectively sane range" according
156 * to https://trac.ffmpeg.org/wiki/Encode/H.264#a1.ChooseaCRFvalue
158 typedef enum FFMpegCrf {
160 FFM_CRF_LOSSLESS = 0,
161 FFM_CRF_PERC_LOSSLESS = 17,
165 FFM_CRF_VERYLOW = 29,
169 typedef struct FFMpegCodecData {
180 int max_b_frames; /* only used if FFMPEG_USE_MAX_B_FRAMES flag is set. */
182 int constant_rate_factor;
183 int ffmpeg_preset; /* see FFMpegPreset */
192 IDProperty *properties;
195 /* ************************************************************* */
198 typedef struct AudioData {
199 int mixrate; // 2.5: now in FFMpegCodecData: audio_mixrate
200 float main; // 2.5: now in FFMpegCodecData: audio_volume
201 float speed_of_sound;
202 float doppler_factor;
210 /* *************************************************************** */
214 typedef struct SceneRenderLayer {
215 struct SceneRenderLayer *next, *prev;
217 char name[64]; /* MAX_NAME */
219 struct Material *mat_override;
220 struct Group *light_override;
222 unsigned int lay; /* scene->lay itself has priority over this */
223 unsigned int lay_zmask; /* has to be after lay, this is for Z-masking */
224 unsigned int lay_exclude; /* not used by internal, exclude */
227 int passflag; /* pass_xor has to be after passflag */
231 float pass_alpha_threshold;
233 struct FreestyleConfig freestyleConfig;
237 #define SCE_LAY_SOLID 1
238 #define SCE_LAY_ZTRA 2
239 #define SCE_LAY_HALO 4
240 #define SCE_LAY_EDGE 8
241 #define SCE_LAY_SKY 16
242 #define SCE_LAY_STRAND 32
243 #define SCE_LAY_FRS 64
244 #define SCE_LAY_AO 128
245 /* flags between 256 and 0x8000 are set to 1 already, for future options */
247 #define SCE_LAY_ALL_Z 0x8000
248 #define SCE_LAY_XOR 0x10000
249 #define SCE_LAY_DISABLE 0x20000
250 #define SCE_LAY_ZMASK 0x40000
251 #define SCE_LAY_NEG_ZMASK 0x80000
254 typedef enum ScenePassType {
255 SCE_PASS_COMBINED = (1 << 0),
256 SCE_PASS_Z = (1 << 1),
257 SCE_PASS_RGBA = (1 << 2),
258 SCE_PASS_DIFFUSE = (1 << 3),
259 SCE_PASS_SPEC = (1 << 4),
260 SCE_PASS_SHADOW = (1 << 5),
261 SCE_PASS_AO = (1 << 6),
262 SCE_PASS_REFLECT = (1 << 7),
263 SCE_PASS_NORMAL = (1 << 8),
264 SCE_PASS_VECTOR = (1 << 9),
265 SCE_PASS_REFRACT = (1 << 10),
266 SCE_PASS_INDEXOB = (1 << 11),
267 SCE_PASS_UV = (1 << 12),
268 SCE_PASS_INDIRECT = (1 << 13),
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_DEBUG = (1 << 31), /* This is a virtual pass. */
289 /* note, srl->passflag is treestore element 'nr' in outliner, short still... */
291 /* View - MultiView */
292 typedef struct SceneRenderView {
293 struct SceneRenderView *next, *prev;
295 char name[64]; /* MAX_NAME */
296 char suffix[64]; /* MAX_NAME */
305 #define SCE_VIEW_DISABLE (1<<0)
307 /* scene.render.views_format */
309 SCE_VIEWS_FORMAT_STEREO_3D = 0,
310 SCE_VIEWS_FORMAT_MULTIVIEW = 1,
313 /* ImageFormatData.views_output */
315 R_IMF_VIEWS_INDIVIDUAL = 0,
316 R_IMF_VIEWS_STEREO_3D = 1,
317 R_IMF_VIEWS_MULTIVIEW = 2,
320 typedef struct Stereo3dFormat {
322 char display_mode; /* encoding mode */
323 char anaglyph_type; /* anaglyph scheme for the user display */
324 char interlace_type; /* interlace type for the user display */
328 /* Stereo3dFormat.display_mode */
329 typedef enum eStereoDisplayMode {
330 S3D_DISPLAY_ANAGLYPH = 0,
331 S3D_DISPLAY_INTERLACE = 1,
332 S3D_DISPLAY_PAGEFLIP = 2,
333 S3D_DISPLAY_SIDEBYSIDE = 3,
334 S3D_DISPLAY_TOPBOTTOM = 4,
335 } eStereoDisplayMode;
337 /* Stereo3dFormat.flag */
338 typedef enum eStereo3dFlag {
339 S3D_INTERLACE_SWAP = (1 << 0),
340 S3D_SIDEBYSIDE_CROSSEYED = (1 << 1),
341 S3D_SQUEEZED_FRAME = (1 << 2),
344 /* Stereo3dFormat.anaglyph_type */
345 typedef enum eStereo3dAnaglyphType {
346 S3D_ANAGLYPH_REDCYAN = 0,
347 S3D_ANAGLYPH_GREENMAGENTA = 1,
348 S3D_ANAGLYPH_YELLOWBLUE = 2,
349 } eStereo3dAnaglyphType;
351 /* Stereo3dFormat.interlace_type */
352 typedef enum eStereo3dInterlaceType {
353 S3D_INTERLACE_ROW = 0,
354 S3D_INTERLACE_COLUMN = 1,
355 S3D_INTERLACE_CHECKERBOARD = 2,
356 } eStereo3dInterlaceType;
358 /* *************************************************************** */
360 /* Generic image format settings,
361 * this is used for NodeImageFile and IMAGE_OT_save_as operator too.
363 * note: its a bit strange that even though this is an image format struct
364 * the imtype can still be used to select video formats.
365 * RNA ensures these enum's are only selectable for render output.
367 typedef struct ImageFormatData {
368 char imtype; /* R_IMF_IMTYPE_PNG, R_... */
369 /* note, video types should only ever be set from this
370 * structure when used from RenderData */
371 char depth; /* bits per channel, R_IMF_CHAN_DEPTH_8 -> 32,
372 * not a flag, only set 1 at a time */
374 char planes; /* - R_IMF_PLANES_BW, R_IMF_PLANES_RGB, R_IMF_PLANES_RGBA */
375 char flag; /* generic options for all image types, alpha zbuffer */
377 char quality; /* (0 - 100), eg: jpeg quality */
378 char compress; /* (0 - 100), eg: png compression */
381 /* --- format specific --- */
388 short cineon_white, cineon_black;
402 Stereo3dFormat stereo3d_format;
404 /* color management */
405 ColorManagedViewSettings view_settings;
406 ColorManagedDisplaySettings display_settings;
410 /* ImageFormatData.imtype */
411 #define R_IMF_IMTYPE_TARGA 0
412 #define R_IMF_IMTYPE_IRIS 1
413 /* #define R_HAMX 2 */ /* hamx is nomore */
414 /* #define R_FTYPE 3 */ /* ftype is nomore */
415 #define R_IMF_IMTYPE_JPEG90 4
416 /* #define R_MOVIE 5 */ /* movie is nomore */
417 #define R_IMF_IMTYPE_IRIZ 7
418 #define R_IMF_IMTYPE_RAWTGA 14
419 #define R_IMF_IMTYPE_AVIRAW 15
420 #define R_IMF_IMTYPE_AVIJPEG 16
421 #define R_IMF_IMTYPE_PNG 17
422 /* #define R_IMF_IMTYPE_AVICODEC 18 */ /* avicodec is nomore */
423 #define R_IMF_IMTYPE_QUICKTIME 19
424 #define R_IMF_IMTYPE_BMP 20
425 #define R_IMF_IMTYPE_RADHDR 21
426 #define R_IMF_IMTYPE_TIFF 22
427 #define R_IMF_IMTYPE_OPENEXR 23
428 #define R_IMF_IMTYPE_FFMPEG 24
429 #define R_IMF_IMTYPE_FRAMESERVER 25
430 #define R_IMF_IMTYPE_CINEON 26
431 #define R_IMF_IMTYPE_DPX 27
432 #define R_IMF_IMTYPE_MULTILAYER 28
433 #define R_IMF_IMTYPE_DDS 29
434 #define R_IMF_IMTYPE_JP2 30
435 #define R_IMF_IMTYPE_H264 31
436 #define R_IMF_IMTYPE_XVID 32
437 #define R_IMF_IMTYPE_THEORA 33
438 #define R_IMF_IMTYPE_PSD 34
440 #define R_IMF_IMTYPE_INVALID 255
442 /* ImageFormatData.flag */
443 #define R_IMF_FLAG_ZBUF (1<<0) /* was R_OPENEXR_ZBUF */
444 #define R_IMF_FLAG_PREVIEW_JPG (1<<1) /* was R_PREVIEW_JPG */
446 /* return values from BKE_imtype_valid_depths, note this is depts per channel */
447 #define R_IMF_CHAN_DEPTH_1 (1<<0) /* 1bits (unused) */
448 #define R_IMF_CHAN_DEPTH_8 (1<<1) /* 8bits (default) */
449 #define R_IMF_CHAN_DEPTH_10 (1<<2) /* 10bits (uncommon, Cineon/DPX support) */
450 #define R_IMF_CHAN_DEPTH_12 (1<<3) /* 12bits (uncommon, jp2/DPX support) */
451 #define R_IMF_CHAN_DEPTH_16 (1<<4) /* 16bits (tiff, halff float exr) */
452 #define R_IMF_CHAN_DEPTH_24 (1<<5) /* 24bits (unused) */
453 #define R_IMF_CHAN_DEPTH_32 (1<<6) /* 32bits (full float exr) */
455 /* ImageFormatData.planes */
456 #define R_IMF_PLANES_RGB 24
457 #define R_IMF_PLANES_RGBA 32
458 #define R_IMF_PLANES_BW 8
460 /* ImageFormatData.exr_codec */
461 #define R_IMF_EXR_CODEC_NONE 0
462 #define R_IMF_EXR_CODEC_PXR24 1
463 #define R_IMF_EXR_CODEC_ZIP 2
464 #define R_IMF_EXR_CODEC_PIZ 3
465 #define R_IMF_EXR_CODEC_RLE 4
466 #define R_IMF_EXR_CODEC_ZIPS 5
467 #define R_IMF_EXR_CODEC_B44 6
468 #define R_IMF_EXR_CODEC_B44A 7
469 #define R_IMF_EXR_CODEC_DWAA 8
470 #define R_IMF_EXR_CODEC_DWAB 9
471 #define R_IMF_EXR_CODEC_MAX 10
473 /* ImageFormatData.jp2_flag */
474 #define R_IMF_JP2_FLAG_YCC (1<<0) /* when disabled use RGB */ /* was R_JPEG2K_YCC */
475 #define R_IMF_JP2_FLAG_CINE_PRESET (1<<1) /* was R_JPEG2K_CINE_PRESET */
476 #define R_IMF_JP2_FLAG_CINE_48 (1<<2) /* was R_JPEG2K_CINE_48FPS */
478 /* ImageFormatData.jp2_codec */
479 #define R_IMF_JP2_CODEC_JP2 0
480 #define R_IMF_JP2_CODEC_J2K 1
482 /* ImageFormatData.cineon_flag */
483 #define R_IMF_CINEON_FLAG_LOG (1<<0) /* was R_CINEON_LOG */
485 /* ImageFormatData.tiff_codec */
487 R_IMF_TIFF_CODEC_DEFLATE = 0,
488 R_IMF_TIFF_CODEC_LZW = 1,
489 R_IMF_TIFF_CODEC_PACKBITS = 2,
490 R_IMF_TIFF_CODEC_NONE = 3,
493 typedef struct BakeData {
494 struct ImageFormatData im_format;
496 char filepath[1024]; /* FILE_MAX */
501 float cage_extrusion;
504 char normal_swizzle[3];
510 char cage[64]; /* MAX_NAME */
513 /* (char) normal_swizzle */
514 typedef enum BakeNormalSwizzle {
523 /* (char) save_mode */
524 typedef enum BakeSaveMode {
525 R_BAKE_SAVE_INTERNAL = 0,
526 R_BAKE_SAVE_EXTERNAL = 1,
529 /* bake->pass_filter */
530 typedef enum BakePassFilter {
531 R_BAKE_PASS_FILTER_NONE = 0,
532 R_BAKE_PASS_FILTER_AO = (1 << 0),
533 R_BAKE_PASS_FILTER_EMIT = (1 << 1),
534 R_BAKE_PASS_FILTER_DIFFUSE = (1 << 2),
535 R_BAKE_PASS_FILTER_GLOSSY = (1 << 3),
536 R_BAKE_PASS_FILTER_TRANSM = (1 << 4),
537 R_BAKE_PASS_FILTER_SUBSURFACE = (1 << 5),
538 R_BAKE_PASS_FILTER_DIRECT = (1 << 6),
539 R_BAKE_PASS_FILTER_INDIRECT = (1 << 7),
540 R_BAKE_PASS_FILTER_COLOR = (1 << 8),
543 #define R_BAKE_PASS_FILTER_ALL (~0)
545 /* *************************************************************** */
548 typedef struct RenderData {
549 struct ImageFormatData im_format;
551 struct AviCodecData *avicodecdata;
552 struct QuicktimeCodecData *qtcodecdata;
553 struct QuicktimeCodecSettings qtcodecsettings;
554 struct FFMpegCodecData ffcodecdata;
556 int cfra, sfra, efra; /* frames as in 'images' */
557 float subframe; /* subframe offset from cfra, in 0.0-1.0 */
558 int psfra, pefra; /* start+end frames of preview range */
560 int images, framapto;
563 float framelen, blurfac;
565 /** For UR edge rendering: give the edges this color */
566 float edgeR, edgeG, edgeB;
569 /* standalone player */ // XXX deprecated since 2.5
570 short fullscreen DNA_DEPRECATED, xplay DNA_DEPRECATED, yplay DNA_DEPRECATED;
571 short freqplay DNA_DEPRECATED;
572 /* standalone player */ // XXX deprecated since 2.5
573 short depth DNA_DEPRECATED, attrib DNA_DEPRECATED;
576 int frame_step; /* frames to jump during render/playback */
578 short stereomode DNA_DEPRECATED; /* standalone player stereo settings */ // XXX deprecated since 2.5
580 short dimensionspreset; /* for the dimensions presets menu */
582 short filtertype; /* filter is box, tent, gauss, mitch, etc */
584 short size; /* size in % */
586 short maximsize DNA_DEPRECATED; /* max in Kb */
592 * The desired number of pixels in the x direction
596 * The desired number of pixels in the y direction
601 * The number of part to use in the x direction
603 short xparts DNA_DEPRECATED;
605 * The number of part to use in the y direction
607 short yparts DNA_DEPRECATED;
610 * render tile dimensions
614 short planes DNA_DEPRECATED, imtype DNA_DEPRECATED, subimtype DNA_DEPRECATED, quality DNA_DEPRECATED; /*deprecated!*/
617 * Render to image editor, fullscreen or to new window.
620 char use_lock_interface;
624 * Flags for render settings. Use bit-masking to access the settings.
629 * Flags for render settings. Use bit-masking to access the settings.
634 * Flags for raytrace settings. Use bit-masking to access the settings.
636 int raytrace_options;
639 * Raytrace acceleration structure
641 short raytrace_structure;
645 /* octree resolution */
650 * What to do with the sky/background. Picks sky/premul/key
651 * blending for the background
656 * The number of samples to use per pixel.
660 short frs_sec, edgeint;
663 /* safety, border and display rect */
667 /* information on different layers to be rendered */
671 /* number of mblur samples */
675 * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
682 * Value used to define filter size for all filter options */
686 /* color management settings - color profiles, gamma correction, etc */
689 /** post-production settings. deprecated, but here for upwards compat (initialized to 1) */
690 float postgamma, posthue, postsat;
692 /* Dither noise intensity */
693 float dither_intensity;
695 /* Bake Render options */
696 short bake_osa, bake_filter, bake_mode, bake_flag;
697 short bake_normal_space, bake_quad_split;
698 float bake_maxdist, bake_biasdist;
699 short bake_samples, bake_pad;
700 float bake_user_scale, bake_pad1;
702 /* path to render output */
703 char pic[1024]; /* 1024 = FILE_MAX */
707 short stamp_font_id, pad3; /* select one of blenders bitmap fonts */
709 /* stamp info user data. */
710 char stamp_udata[768];
712 /* foreground/background color. */
716 /* sequencer options */
719 char seq_flag; /* flag use for sequence render/draw */
722 /* render simplify */
724 short simplify_subsurf;
725 short simplify_subsurf_render;
726 short simplify_shadowsamples, pad9;
727 float simplify_particles;
728 float simplify_particles_render;
729 float simplify_aosss;
732 short cineonwhite DNA_DEPRECATED, cineonblack DNA_DEPRECATED; /*deprecated*/
733 float cineongamma DNA_DEPRECATED; /*deprecated*/
736 short jp2_preset DNA_DEPRECATED, jp2_depth DNA_DEPRECATED; /*deprecated*/
739 /* Dome variables */ // XXX deprecated since 2.5
740 short domeres DNA_DEPRECATED, domemode DNA_DEPRECATED; // XXX deprecated since 2.5
741 short domeangle DNA_DEPRECATED, dometilt DNA_DEPRECATED; // XXX deprecated since 2.5
742 float domeresbuf DNA_DEPRECATED; // XXX deprecated since 2.5
744 struct Text *dometext DNA_DEPRECATED; // XXX deprecated since 2.5
746 /* Freestyle line thickness options */
747 int line_thickness_mode;
748 float unit_line_thickness; /* in pixels */
754 struct BakeData bake;
756 int preview_start_resolution;
758 /* Type of the debug pass to use.
759 * Only used when built with debug passes support.
761 short debug_pass_type;
766 ListBase views; /* SceneRenderView */
771 /* Motion blur shutter */
772 struct CurveMapping mblur_shutter_curve;
775 /* *************************************************************** */
776 /* Render Conversion/Simplfication Settings */
778 /* control render convert and shading engine */
779 typedef struct RenderProfile {
780 struct RenderProfile *next, *prev;
785 short shadbufsample_max;
788 float ao_error, pad2;
792 /* *************************************************************** */
793 /* Game Engine - Dome */
795 typedef struct GameDome {
799 struct Text *warptext;
802 #define DOME_FISHEYE 1
803 #define DOME_TRUNCATED_FRONT 2
804 #define DOME_TRUNCATED_REAR 3
805 #define DOME_ENVMAP 4
806 #define DOME_PANORAM_SPH 5
807 #define DOME_NUM_MODES 6
809 /* *************************************************************** */
812 typedef struct GameFraming {
814 char type, pad1, pad2, pad3;
817 #define SCE_GAMEFRAMING_BARS 0
818 #define SCE_GAMEFRAMING_EXTEND 1
819 #define SCE_GAMEFRAMING_SCALE 2
821 typedef struct RecastData {
831 float regionmergesize;
833 float detailsampledist;
834 float detailsamplemaxerror;
840 #define RC_PARTITION_WATERSHED 0
841 #define RC_PARTITION_MONOTONE 1
842 #define RC_PARTITION_LAYERS 2
844 typedef struct GameData {
846 /* standalone player */
847 struct GameFraming framing;
848 short playerflag, xplay, yplay, freqplay;
849 short depth, attrib, rt1, rt2;
850 short aasamples, pad4[3];
852 /* stereo/dome mode */
853 struct GameDome dome;
854 short stereoflag, stereomode;
856 RecastData recastData;
859 /* physics (it was in world)*/
860 float gravity; /*Gravitation constant for the game world*/
863 * Radius of the activity bubble, in Manhattan length. Objects
864 * outside the box are activity-culled. */
865 float activityBoxRadius;
868 * bit 3: (gameengine): Activity culling is enabled.
869 * bit 5: (gameengine) : enable Bullet DBVT tree for view frustum culling
873 short occlusionRes; /* resolution of occlusion Z buffer in pixel */
876 short vsync; /* Controls vsync: off, on, or adaptive (if supported) */
877 short ticrate, maxlogicstep, physubstep, maxphystep;
878 short obstacleSimulation;
879 short raster_storage;
881 float deactivationtime, lineardeactthreshold, angulardeactthreshold;
885 int scehysteresis, pad5;
889 #define STEREO_NOSTEREO 1
890 #define STEREO_ENABLED 2
891 #define STEREO_DOME 3
893 //#define STEREO_NOSTEREO 1
894 #define STEREO_QUADBUFFERED 2
895 #define STEREO_ABOVEBELOW 3
896 #define STEREO_INTERLACED 4
897 #define STEREO_ANAGLYPH 5
898 #define STEREO_SIDEBYSIDE 6
899 #define STEREO_VINTERLACE 7
900 //#define STEREO_DOME 8
901 #define STEREO_3DTVTOPBOTTOM 9
905 #define WOPHY_BULLET 5
907 /* obstacleSimulation */
908 #define OBSTSIMULATION_NONE 0
909 #define OBSTSIMULATION_TOI_rays 1
910 #define OBSTSIMULATION_TOI_cells 2
913 #define RAS_STORE_AUTO 0
914 #define RAS_STORE_IMMEDIATE 1
915 #define RAS_STORE_VA 2
916 #define RAS_STORE_VBO 3
921 #define VSYNC_ADAPTIVE 2
924 #define GAME_RESTRICT_ANIM_UPDATES (1 << 0)
925 #define GAME_ENABLE_ALL_FRAMES (1 << 1)
926 #define GAME_SHOW_DEBUG_PROPS (1 << 2)
927 #define GAME_SHOW_FRAMERATE (1 << 3)
928 #define GAME_SHOW_PHYSICS (1 << 4)
929 #define GAME_DISPLAY_LISTS (1 << 5)
930 #define GAME_GLSL_NO_LIGHTS (1 << 6)
931 #define GAME_GLSL_NO_SHADERS (1 << 7)
932 #define GAME_GLSL_NO_SHADOWS (1 << 8)
933 #define GAME_GLSL_NO_RAMPS (1 << 9)
934 #define GAME_GLSL_NO_NODES (1 << 10)
935 #define GAME_GLSL_NO_EXTRA_TEX (1 << 11)
936 #define GAME_IGNORE_DEPRECATION_WARNINGS (1 << 12)
937 #define GAME_ENABLE_ANIMATION_RECORD (1 << 13)
938 #define GAME_SHOW_MOUSE (1 << 14)
939 #define GAME_GLSL_NO_COLOR_MANAGEMENT (1 << 15)
940 #define GAME_SHOW_OBSTACLE_SIMULATION (1 << 16)
941 #define GAME_NO_MATERIAL_CACHING (1 << 17)
942 #define GAME_GLSL_NO_ENV_LIGHTING (1 << 18)
943 /* Note: GameData.flag is now an int (max 32 flags). A short could only take 16 flags */
945 /* GameData.playerflag */
946 #define GAME_PLAYER_FULLSCREEN (1 << 0)
947 #define GAME_PLAYER_DESKTOP_RESOLUTION (1 << 1)
949 /* GameData.matmode */
951 #ifdef DNA_DEPRECATED
952 GAME_MAT_TEXFACE = 0, /* deprecated */
954 GAME_MAT_MULTITEX = 1,
958 /* GameData.lodflag */
959 #define SCE_LOD_USE_HYST (1 << 0)
962 #define UV_SCULPT_LOCK_BORDERS 1
963 #define UV_SCULPT_ALL_ISLANDS 2
965 #define UV_SCULPT_TOOL_PINCH 1
966 #define UV_SCULPT_TOOL_RELAX 2
967 #define UV_SCULPT_TOOL_GRAB 3
969 #define UV_SCULPT_TOOL_RELAX_LAPLACIAN 1
970 #define UV_SCULPT_TOOL_RELAX_HC 2
973 #define STEREO_RIGHT_NAME "right"
974 #define STEREO_LEFT_NAME "left"
975 #define STEREO_RIGHT_SUFFIX "_R"
976 #define STEREO_LEFT_SUFFIX "_L"
978 typedef enum StereoViews {
985 /* *************************************************************** */
988 typedef struct TimeMarker {
989 struct TimeMarker *next, *prev;
993 struct Object *camera;
996 /* *************************************************************** */
997 /* Paint Mode/Tool Data */
999 #define PAINT_MAX_INPUT_SAMPLES 64
1001 /* Paint Tool Base */
1002 typedef struct Paint {
1003 struct Brush *brush;
1004 struct Palette *palette;
1005 struct CurveMapping *cavity_curve; /* cavity curve */
1007 /* WM Paint cursor */
1009 unsigned char paint_cursor_col[4];
1011 /* enum PaintFlags */
1014 /* Paint stroke can use up to PAINT_MAX_INPUT_SAMPLES inputs to
1015 * smooth the stroke */
1016 int num_input_samples;
1018 /* flags used for symmetry */
1021 float tile_offset[3];
1025 /* ------------------------------------------- */
1028 /* Texture/Image Editor */
1029 typedef struct ImagePaintSettings {
1032 short flag, missing_data;
1034 /* for projection painting only */
1035 short seam_bleed, normal_angle;
1036 short screen_grab_size[2]; /* capture size for re-projection */
1038 int mode; /* mode used for texture painting */
1040 void *paintcursor; /* wm handle */
1041 struct Image *stencil; /* workaround until we support true layer masks */
1042 struct Image *clone; /* clone layer for image mode for projective texture painting */
1043 struct Image *canvas; /* canvas when the explicit system is used for painting */
1044 float stencil_col[3];
1045 float dither; /* dither amount used when painting on byte images */
1046 } ImagePaintSettings;
1048 /* ------------------------------------------- */
1052 typedef struct Sculpt {
1055 /* For rotating around a pivot point */
1056 //float pivot[3]; XXX not used?
1059 /* Control tablet input */
1060 //char tablet_size, tablet_strength; XXX not used?
1063 /* Maximum edge length for dynamic topology sculpting (in pixels) */
1066 /* Direction used for SCULPT_OT_symmetrize operator */
1067 int symmetrize_direction;
1069 /* gravity factor for sculpting */
1070 float gravity_factor;
1072 /* scale for constant detail size */
1073 float constant_detail;
1074 float detail_percent;
1077 struct Object *gravity_object;
1080 typedef struct UvSculpt {
1084 /* ------------------------------------------- */
1088 typedef struct VPaint {
1092 int tot; /* allocation size of prev buffers */
1093 unsigned int *vpaint_prev; /* previous mesh colors */
1094 struct MDeformVert *wpaint_prev; /* previous vertex weights */
1096 void *paintcursor; /* wm handle */
1101 // VP_COLINDEX = (1 << 0), /* only paint onto active material*/ /* deprecated since before 2.49 */
1102 // VP_AREA = (1 << 1), /* deprecated since 2.70 */
1103 VP_NORMALS = (1 << 3),
1104 VP_SPRAY = (1 << 4),
1105 // VP_MIRROR_X = (1 << 5), /* deprecated in 2.5x use (me->editflag & ME_EDIT_MIRROR_X) */
1106 VP_ONLYVGROUP = (1 << 7) /* weight paint only */
1109 /* ------------------------------------------- */
1110 /* GPencil Stroke Sculpting */
1113 typedef enum eGP_EditBrush_Types {
1114 GP_EDITBRUSH_TYPE_SMOOTH = 0,
1115 GP_EDITBRUSH_TYPE_THICKNESS = 1,
1116 GP_EDITBRUSH_TYPE_GRAB = 2,
1117 GP_EDITBRUSH_TYPE_PUSH = 3,
1118 GP_EDITBRUSH_TYPE_TWIST = 4,
1119 GP_EDITBRUSH_TYPE_PINCH = 5,
1120 GP_EDITBRUSH_TYPE_RANDOMIZE = 6,
1121 GP_EDITBRUSH_TYPE_SUBDIVIDE = 7,
1122 GP_EDITBRUSH_TYPE_SIMPLIFY = 8,
1123 GP_EDITBRUSH_TYPE_CLONE = 9,
1124 GP_EDITBRUSH_TYPE_STRENGTH = 10,
1126 /* !!! Update GP_EditBrush_Data brush[###]; below !!! */
1127 TOT_GP_EDITBRUSH_TYPES
1128 } eGP_EditBrush_Types;
1130 /* Lock axis options */
1131 typedef enum eGP_Lockaxis_Types {
1132 GP_LOCKAXIS_NONE = 0,
1136 } eGP_Lockaxis_Types;
1138 /* Settings for a GPencil Stroke Sculpting Brush */
1139 typedef struct GP_EditBrush_Data {
1140 short size; /* radius of brush */
1141 short flag; /* eGP_EditBrush_Flag */
1142 float strength; /* strength of effect */
1143 } GP_EditBrush_Data;
1145 /* GP_EditBrush_Data.flag */
1146 typedef enum eGP_EditBrush_Flag {
1147 /* invert the effect of the brush */
1148 GP_EDITBRUSH_FLAG_INVERT = (1 << 0),
1149 /* adjust strength using pen pressure */
1150 GP_EDITBRUSH_FLAG_USE_PRESSURE = (1 << 1),
1152 /* strength of brush falls off with distance from cursor */
1153 GP_EDITBRUSH_FLAG_USE_FALLOFF = (1 << 2),
1155 /* smooth brush affects pressure values as well */
1156 GP_EDITBRUSH_FLAG_SMOOTH_PRESSURE = (1 << 3)
1157 } eGP_EditBrush_Flag;
1161 /* GPencil Stroke Sculpting Settings */
1162 typedef struct GP_BrushEdit_Settings {
1163 GP_EditBrush_Data brush[11]; /* TOT_GP_EDITBRUSH_TYPES */
1164 void *paintcursor; /* runtime */
1166 int brushtype; /* eGP_EditBrush_Types */
1167 int flag; /* eGP_BrushEdit_SettingsFlag */
1168 int lock_axis; /* lock drawing to one axis */
1169 float alpha; /* alpha factor for selection color */
1170 } GP_BrushEdit_Settings;
1172 /* GP_BrushEdit_Settings.flag */
1173 typedef enum eGP_BrushEdit_SettingsFlag {
1174 /* only affect selected points */
1175 GP_BRUSHEDIT_FLAG_SELECT_MASK = (1 << 0),
1176 /* apply brush to position */
1177 GP_BRUSHEDIT_FLAG_APPLY_POSITION = (1 << 1),
1178 /* apply brush to strength */
1179 GP_BRUSHEDIT_FLAG_APPLY_STRENGTH = (1 << 2),
1180 /* apply brush to thickness */
1181 GP_BRUSHEDIT_FLAG_APPLY_THICKNESS = (1 << 3),
1182 /* apply interpolation to all layers */
1183 GP_BRUSHEDIT_FLAG_INTERPOLATE_ALL_LAYERS = (1 << 4),
1184 /* apply interpolation to only selected */
1185 GP_BRUSHEDIT_FLAG_INTERPOLATE_ONLY_SELECTED = (1 << 5)
1187 } eGP_BrushEdit_SettingsFlag;
1189 /* *************************************************************** */
1190 /* Transform Orientations */
1192 typedef struct TransformOrientation {
1193 struct TransformOrientation *next, *prev;
1194 char name[64]; /* MAX_NAME */
1197 } TransformOrientation;
1199 /* *************************************************************** */
1200 /* Unified Paint Settings
1203 /* These settings can override the equivalent fields in the active
1204 * Brush for any paint mode; the flag field controls whether these
1205 * values are used */
1206 typedef struct UnifiedPaintSettings {
1207 /* unified radius of brush in pixels */
1210 /* unified radius of brush in Blender units */
1211 float unprojected_radius;
1213 /* unified strength of brush */
1216 /* unified brush weight, [0, 1] */
1219 /* unified brush color */
1221 /* unified brush secondary color */
1222 float secondary_rgb[3];
1224 /* user preferences for sculpt and paint */
1229 /* record movement of mouse so that rake can start at an intuitive angle */
1231 float last_rake_angle;
1233 int last_stroke_valid;
1234 float average_stroke_accum[3];
1235 int average_stroke_counter;
1238 float brush_rotation;
1239 float brush_rotation_sec;
1241 /*********************************************************************************
1242 * all data below are used to communicate with cursor drawing and tex sampling *
1243 *********************************************************************************/
1246 float overlap_factor; /* normalization factor due to accumulated value of curve along spacing.
1247 * Calculated when brush spacing changes to dampen strength of stroke
1248 * if space attenuation is used*/
1250 /* check is there an ongoing stroke right now */
1254 char do_linear_conversion;
1256 /* store last location of stroke or whether the mesh was hit. Valid only while stroke is active */
1257 float last_location[3];
1260 float anchored_initial_mouse[2];
1262 /* radius of brush, premultiplied with pressure.
1263 * In case of anchored brushes contains the anchored radius */
1266 /* drawing pressure */
1267 float size_pressure_value;
1269 /* position of mouse, used to sample the texture */
1272 /* position of mouse, used to sample the mask texture */
1273 float mask_tex_mouse[2];
1275 /* ColorSpace cache to avoid locking up during sampling */
1276 struct ColorSpace *colorspace;
1277 } UnifiedPaintSettings;
1280 UNIFIED_PAINT_SIZE = (1 << 0),
1281 UNIFIED_PAINT_ALPHA = (1 << 1),
1282 UNIFIED_PAINT_WEIGHT = (1 << 5),
1283 UNIFIED_PAINT_COLOR = (1 << 6),
1285 /* only used if unified size is enabled, mirrors the brush flags
1286 * BRUSH_LOCK_SIZE and BRUSH_SIZE_PRESSURE */
1287 UNIFIED_PAINT_BRUSH_LOCK_SIZE = (1 << 2),
1288 UNIFIED_PAINT_BRUSH_SIZE_PRESSURE = (1 << 3),
1290 /* only used if unified alpha is enabled, mirrors the brush flag
1291 * BRUSH_ALPHA_PRESSURE */
1292 UNIFIED_PAINT_BRUSH_ALPHA_PRESSURE = (1 << 4)
1293 } UnifiedPaintSettingsFlags;
1296 typedef struct CurvePaintSettings {
1303 short error_threshold;
1304 float radius_min, radius_max;
1305 float radius_taper_start, radius_taper_end;
1306 float surface_offset;
1308 } CurvePaintSettings;
1310 /* CurvePaintSettings.flag */
1312 CURVE_PAINT_FLAG_CORNERS_DETECT = (1 << 0),
1313 CURVE_PAINT_FLAG_PRESSURE_RADIUS = (1 << 1),
1314 CURVE_PAINT_FLAG_DEPTH_STROKE_ENDPOINTS = (1 << 2),
1315 CURVE_PAINT_FLAG_DEPTH_STROKE_OFFSET_ABS = (1 << 3),
1318 /* CurvePaintSettings.fit_method */
1320 CURVE_PAINT_FIT_METHOD_REFIT = 0,
1321 CURVE_PAINT_FIT_METHOD_SPLIT = 1,
1324 /* CurvePaintSettings.depth_mode */
1326 CURVE_PAINT_PROJECT_CURSOR = 0,
1327 CURVE_PAINT_PROJECT_SURFACE = 1,
1330 /* CurvePaintSettings.surface_plane */
1332 CURVE_PAINT_SURFACE_PLANE_NORMAL_VIEW = 0,
1333 CURVE_PAINT_SURFACE_PLANE_NORMAL_SURFACE = 1,
1334 CURVE_PAINT_SURFACE_PLANE_VIEW = 2,
1338 /* *************************************************************** */
1341 /* Stats for Meshes */
1342 typedef struct MeshStatVis {
1348 float overhang_min, overhang_max;
1351 float thickness_min, thickness_max;
1352 char thickness_samples;
1356 float distort_min, distort_max;
1359 float sharp_min, sharp_max;
1363 /* *************************************************************** */
1366 typedef struct ToolSettings {
1367 VPaint *vpaint; /* vertex paint */
1368 VPaint *wpaint; /* weight paint */
1370 UvSculpt *uvsculpt; /* uv smooth */
1372 /* Vertex group weight - used only for editmode, not weight
1374 float vgroup_weight;
1376 float doublimit; /* remove doubles limit */
1377 float normalsize; /* size of normals */
1380 /* Selection Mode for Mesh */
1383 /* UV Calculation */
1389 float uvcalc_margin;
1392 short autoik_chainlen; /* runtime only */
1395 char gpencil_flags; /* flags/options for how the tool works */
1396 char gpencil_src; /* for main 3D view Grease Pencil, where data comes from */
1398 char gpencil_v3d_align; /* stroke placement settings: 3D View */
1399 char gpencil_v2d_align; /* : General 2D Editor */
1400 char gpencil_seq_align; /* : Sequencer Preview */
1401 char gpencil_ima_align; /* : Image Editor */
1403 /* Grease Pencil Sculpt */
1404 struct GP_BrushEdit_Settings gp_sculpt;
1406 /* Grease Pencil Drawing Brushes (bGPDbrush) */
1407 ListBase gp_brushes;
1409 /* Image Paint (8 byttse aligned please!) */
1410 struct ImagePaintSettings imapaint;
1412 /* Transform Proportional Area of Effect */
1413 float proportional_size;
1415 /* Select Group Threshold */
1416 float select_thresh;
1418 /* Auto-Keying Mode */
1419 short autokey_mode, autokey_flag; /* defines in DNA_userdef_types.h */
1420 char keyframe_type; /* keyframe type (see DNA_curve_types.h) */
1423 char multires_subdiv_type;
1425 /* Skeleton generation */
1426 short skgen_resolution;
1427 float skgen_threshold_internal;
1428 float skgen_threshold_external;
1429 float skgen_length_ratio;
1430 float skgen_length_limit;
1431 float skgen_angle_limit;
1432 float skgen_correlation_limit;
1433 float skgen_symmetry_limit;
1434 float skgen_retarget_angle_weight;
1435 float skgen_retarget_length_weight;
1436 float skgen_retarget_distance_weight;
1437 short skgen_options;
1439 char skgen_postpro_passes;
1440 char skgen_subdivisions[3];
1441 char skgen_multi_level;
1443 /* Skeleton Sketching */
1444 struct Object *skgen_template;
1445 char bone_sketching;
1446 char bone_sketching_convert;
1447 char skgen_subdivision_number;
1448 char skgen_retarget_options;
1449 char skgen_retarget_roll;
1450 char skgen_side_string[8];
1451 char skgen_num_string[8];
1453 /* Alt+RMB option */
1455 char edge_mode_live_unwrap;
1458 char snap_mode, snap_node_mode;
1460 short snap_flag, snap_target;
1461 short proportional, prop_mode;
1462 char proportional_objects; /* proportional edit, object mode */
1463 char proportional_mask; /* proportional edit, mask editing */
1464 char proportional_action; /* proportional edit, action editor */
1465 char proportional_fcurve; /* proportional edit, graph editor */
1466 char lock_markers; /* lock marker editing */
1469 char auto_normalize; /*auto normalizing mode in wpaint*/
1470 char multipaint; /* paint multiple bones in wpaint */
1472 char vgroupsubset; /* subset selection filter in wpaint */
1476 int uv_sculpt_settings;
1478 int uv_relax_method;
1479 /* XXX: these sculpt_paint_* fields are deprecated, use the
1480 * unified_paint_settings field instead! */
1481 short sculpt_paint_settings DNA_DEPRECATED; short pad5;
1482 int sculpt_paint_unified_size DNA_DEPRECATED;
1483 float sculpt_paint_unified_unprojected_radius DNA_DEPRECATED;
1484 float sculpt_paint_unified_alpha DNA_DEPRECATED;
1486 /* Unified Paint Settings */
1487 struct UnifiedPaintSettings unified_paint_settings;
1489 struct CurvePaintSettings curve_paint_settings;
1491 struct MeshStatVis statvis;
1494 /* *************************************************************** */
1495 /* Assorted Scene Data */
1497 /* ------------------------------------------- */
1498 /* Stats (show in Info header) */
1500 typedef struct bStats {
1501 /* scene totals for visible layers */
1502 int totobj, totlamp, totobjsel, totcurve, totmesh, totarmature;
1503 int totvert, totface;
1506 /* ------------------------------------------- */
1509 typedef struct UnitSettings {
1510 /* Display/Editing unit options for each scene */
1511 float scale_length; /* maybe have other unit conversions? */
1512 char system; /* imperial, metric etc */
1513 char system_rotation; /* not implemented as a proper unit system yet */
1517 /* ------------------------------------------- */
1518 /* Global/Common Physics Settings */
1520 typedef struct PhysicsSettings {
1522 int flag, quick_cache_step, rt;
1525 /* ------------------------------------------- */
1526 /* Safe Area options used in Camera View & VSE
1528 typedef struct DisplaySafeAreas {
1529 /* each value represents the (x,y) margins as a multiplier.
1530 * 'center' in this context is just the name for a different kind of safe-area */
1532 float title[2]; /* Title Safe */
1533 float action[2]; /* Image/Graphics Safe */
1535 /* use for alternate aspect ratio */
1536 float title_center[2];
1537 float action_center[2];
1540 /* *************************************************************** */
1541 /* Scene ID-Block */
1543 typedef struct Scene {
1545 struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
1547 struct Object *camera;
1548 struct World *world;
1553 struct Base *basact; /* active base */
1554 struct Object *obedit; /* name replaces old G.obedit */
1556 float cursor[3]; /* 3d cursor location */
1557 float twcent[3]; /* center for transform widget */
1558 float twmin[3], twmax[3]; /* boundbox of selection for transform widget */
1560 unsigned int lay; /* bitflags for layer visibility */
1561 int layact; /* active layer */
1562 unsigned int lay_updated; /* runtime flag, has layer ever been updated since load? */
1564 short flag; /* various settings */
1569 struct bNodeTree *nodetree;
1571 struct Editing *ed; /* sequence editor data is allocated here */
1573 struct ToolSettings *toolsettings; /* default allocated now */
1574 struct SceneStats *stats; /* default allocated now */
1575 struct DisplaySafeAreas safe_areas;
1577 /* migrate or replace? depends on some internal things... */
1578 /* no, is on the right place (ton) */
1579 struct RenderData r;
1580 struct AudioData audio;
1583 ListBase transform_spaces;
1586 void *playback_handle;
1587 void *sound_scrub_handle;
1588 void *speaker_handles;
1590 void *fps_info; /* (runtime) info/cache used for presenting playback framerate info to the user */
1592 /* none of the dependency graph vars is mean to be saved */
1593 struct Depsgraph *depsgraph;
1595 struct DagForest *theDag;
1599 /* User-Defined KeyingSets */
1600 int active_keyingset; /* index of the active KeyingSet. first KeyingSet has index 1, 'none' active is 0, 'add new' is -1 */
1601 ListBase keyingsets; /* KeyingSets for this scene */
1604 struct GameFraming framing DNA_DEPRECATED; // XXX deprecated since 2.5
1608 struct UnitSettings unit;
1611 struct bGPdata *gpd;
1613 /* Physics simulation settings */
1614 struct PhysicsSettings physics_settings;
1616 /* Movie Tracking */
1617 struct MovieClip *clip; /* active movie clip */
1619 uint64_t customdata_mask; /* XXX. runtime flag for drawing, actually belongs in the window, only used by BKE_object_handle_update() */
1620 uint64_t customdata_mask_modal; /* XXX. same as above but for temp operator use (gl renders) */
1622 /* Color Management */
1623 ColorManagedViewSettings view_settings;
1624 ColorManagedDisplaySettings display_settings;
1625 ColorManagedColorspaceSettings sequencer_colorspace_settings;
1627 /* RigidBody simulation world+settings */
1628 struct RigidBodyWorld *rigidbody_world;
1630 struct PreviewImage *preview;
1633 /* **************** RENDERDATA ********************* */
1636 /* use preview range */
1637 #define SCER_PRV_RANGE (1<<0)
1638 #define SCER_LOCK_FRAME_SELECTION (1<<1)
1639 /* timeline/keyframe jumping - only selected items (on by default) */
1640 #define SCE_KEYS_NO_SELONLY (1<<2)
1642 /* mode (int now) */
1643 #define R_OSA 0x0001
1644 #define R_SHADOW 0x0002
1645 #define R_GAMMA 0x0004
1646 #define R_ORTHO 0x0008
1647 #define R_ENVMAP 0x0010
1648 #define R_EDGE 0x0020
1649 #define R_FIELDS 0x0040
1650 #define R_FIELDSTILL 0x0080
1651 /*#define R_RADIO 0x0100 */ /* deprecated */
1652 #define R_BORDER 0x0200
1653 #define R_PANORAMA 0x0400 /* deprecated as scene option, still used in renderer */
1654 #define R_CROP 0x0800
1655 /*#define R_COSMO 0x1000 deprecated */
1656 #define R_ODDFIELD 0x2000
1657 #define R_MBLUR 0x4000
1658 /* unified was here */
1659 #define R_RAYTRACE 0x10000
1660 /* R_GAUSS is obsolete, but used to retrieve setting from old files */
1661 #define R_GAUSS 0x20000
1662 /* fbuf obsolete... */
1663 /*#define R_FBUF 0x40000*/
1664 /* threads obsolete... is there for old files, now use for autodetect threads */
1665 #define R_THREADS 0x80000
1666 /* Use the same flag for autothreads */
1667 #define R_FIXED_THREADS 0x80000
1669 #define R_SPEED 0x100000
1670 #define R_SSS 0x200000
1671 #define R_NO_OVERWRITE 0x400000 /* skip existing files */
1672 #define R_TOUCH 0x800000 /* touch files before rendering */
1673 #define R_SIMPLIFY 0x1000000
1674 #define R_EDGE_FRS 0x2000000 /* R_EDGE reserved for Freestyle */
1675 #define R_PERSISTENT_DATA 0x4000000 /* keep data around for re-render */
1676 #define R_USE_WS_SHADING 0x8000000 /* use world space interpretation of lighting data */
1679 #define R_SEQ_GL_PREV 1
1680 // #define R_SEQ_GL_REND 2 // UNUSED, opengl render has its own operator now.
1681 #define R_SEQ_SOLID_TEX 4
1685 #define R_OUTPUT_SCREEN 0
1686 #define R_OUTPUT_AREA 1
1687 #define R_OUTPUT_WINDOW 2
1688 #define R_OUTPUT_NONE 3
1689 /*#define R_OUTPUT_FORKED 4*/
1692 #define R_FILTER_BOX 0
1693 #define R_FILTER_TENT 1
1694 #define R_FILTER_QUAD 2
1695 #define R_FILTER_CUBIC 3
1696 #define R_FILTER_CATROM 4
1697 #define R_FILTER_GAUSS 5
1698 #define R_FILTER_MITCH 6
1699 #define R_FILTER_FAST_GAUSS 7 /* note, this is only used for nodes at the moment */
1701 /* raytrace structure */
1702 #define R_RAYSTRUCTURE_AUTO 0
1703 #define R_RAYSTRUCTURE_OCTREE 1
1704 #define R_RAYSTRUCTURE_BLIBVH 2 /* removed */
1705 #define R_RAYSTRUCTURE_VBVH 3
1706 #define R_RAYSTRUCTURE_SIMD_SVBVH 4 /* needs SIMD */
1707 #define R_RAYSTRUCTURE_SIMD_QBVH 5 /* needs SIMD */
1709 /* raytrace_options */
1710 #define R_RAYTRACE_USE_LOCAL_COORDS 0x0001
1711 #define R_RAYTRACE_USE_INSTANCES 0x0002
1713 /* scemode (int now) */
1714 #define R_DOSEQ 0x0001
1715 #define R_BG_RENDER 0x0002
1716 /* passepartout is camera option now, keep this for backward compatibility */
1717 #define R_PASSEPARTOUT 0x0004
1718 #define R_BUTS_PREVIEW 0x0008
1719 #define R_EXTENSION 0x0010
1720 #define R_MATNODE_PREVIEW 0x0020
1721 #define R_DOCOMP 0x0040
1722 #define R_COMP_CROP 0x0080
1723 #define R_FREE_IMAGE 0x0100
1724 #define R_SINGLE_LAYER 0x0200
1725 #define R_EXR_TILE_FILE 0x0400
1726 /* #define R_COMP_FREE 0x0800 */
1727 #define R_NO_IMAGE_LOAD 0x1000
1728 #define R_NO_TEX 0x2000
1729 #define R_NO_FRAME_UPDATE 0x4000
1730 #define R_FULL_SAMPLE 0x8000
1731 /* #define R_DEPRECATED 0x10000 */
1732 /* #define R_RECURS_PROTECTION 0x20000 */
1733 #define R_TEXNODE_PREVIEW 0x40000
1734 #define R_VIEWPORT_PREVIEW 0x80000
1735 #define R_EXR_CACHE_FILE 0x100000
1736 #define R_MULTIVIEW 0x200000
1739 #define R_STAMP_TIME 0x0001
1740 #define R_STAMP_FRAME 0x0002
1741 #define R_STAMP_DATE 0x0004
1742 #define R_STAMP_CAMERA 0x0008
1743 #define R_STAMP_SCENE 0x0010
1744 #define R_STAMP_NOTE 0x0020
1745 #define R_STAMP_DRAW 0x0040 /* draw in the image */
1746 #define R_STAMP_MARKER 0x0080
1747 #define R_STAMP_FILENAME 0x0100
1748 #define R_STAMP_SEQSTRIP 0x0200
1749 #define R_STAMP_RENDERTIME 0x0400
1750 #define R_STAMP_CAMERALENS 0x0800
1751 #define R_STAMP_STRIPMETA 0x1000
1752 #define R_STAMP_MEMORY 0x2000
1753 #define R_STAMP_HIDE_LABELS 0x4000
1754 #define R_STAMP_ALL (R_STAMP_TIME|R_STAMP_FRAME|R_STAMP_DATE|R_STAMP_CAMERA|R_STAMP_SCENE| \
1755 R_STAMP_NOTE|R_STAMP_MARKER|R_STAMP_FILENAME|R_STAMP_SEQSTRIP| \
1756 R_STAMP_RENDERTIME|R_STAMP_CAMERALENS|R_STAMP_MEMORY| \
1757 R_STAMP_HIDE_LABELS)
1761 #define R_ALPHAPREMUL 1
1762 /*#define R_ALPHAKEY 2*/ /* deprecated, shouldn't be used */
1764 /* color_mgt_flag */
1766 R_COLOR_MANAGEMENT = (1 << 0), /* deprecated, should only be used in versioning code only */
1767 /*R_COLOR_MANAGEMENT_PREDIVIDE = (1 << 1)*/ /* deprecated, shouldn't be used */
1770 #ifdef DNA_DEPRECATED
1771 /* subimtype, flag options for imtype */
1773 R_OPENEXR_HALF = 1, /*deprecated*/
1774 R_OPENEXR_ZBUF = 2, /*deprecated*/
1775 R_PREVIEW_JPG = 4, /*deprecated*/
1776 R_CINEON_LOG = 8, /*deprecated*/
1777 R_TIFF_16BIT = 16, /*deprecated*/
1779 R_JPEG2K_12BIT = 32, /* Jpeg2000 */ /*deprecated*/
1780 R_JPEG2K_16BIT = 64, /*deprecated*/
1781 R_JPEG2K_YCC = 128, /* when disabled use RGB */ /*deprecated*/
1782 R_JPEG2K_CINE_PRESET = 256, /*deprecated*/
1783 R_JPEG2K_CINE_48FPS = 512, /*deprecated*/
1787 /* bake_mode: same as RE_BAKE_xxx defines */
1789 #define R_BAKE_CLEAR 1
1790 #define R_BAKE_OSA 2
1791 #define R_BAKE_TO_ACTIVE 4
1792 #define R_BAKE_NORMALIZE 8
1793 #define R_BAKE_MULTIRES 16
1794 #define R_BAKE_LORES_MESH 32
1795 #define R_BAKE_VCOL 64
1796 #define R_BAKE_USERSCALE 128
1797 #define R_BAKE_CAGE 256
1798 #define R_BAKE_SPLIT_MAT 512
1799 #define R_BAKE_AUTO_NAME 1024
1801 /* bake_normal_space */
1802 #define R_BAKE_SPACE_CAMERA 0
1803 #define R_BAKE_SPACE_WORLD 1
1804 #define R_BAKE_SPACE_OBJECT 2
1805 #define R_BAKE_SPACE_TANGENT 3
1808 #define R_SIMPLE_NO_TRIANGULATE 1
1810 /* line_thickness_mode */
1811 #define R_LINE_THICKNESS_ABSOLUTE 1
1812 #define R_LINE_THICKNESS_RELATIVE 2
1814 /* sequencer seq_prev_type seq_rend_type */
1816 /* scene->r.engine (scene.c) */
1817 extern const char *RE_engine_id_BLENDER_RENDER;
1818 extern const char *RE_engine_id_BLENDER_GAME;
1819 extern const char *RE_engine_id_CYCLES;
1821 /* **************** SCENE ********************* */
1823 /* note that much higher maxframes give imprecise sub-frames, see: T46859 */
1824 /* for general use */
1825 #define MAXFRAME 500000
1826 #define MAXFRAMEF 500000.0f
1829 #define MINFRAMEF 0.0f
1831 /* (minimum frame number for current-frame) */
1832 #define MINAFRAME -500000
1833 #define MINAFRAMEF -500000.0f
1835 /* depricate this! */
1836 #define TESTBASE(v3d, base) ( \
1837 ((base)->flag & SELECT) && \
1838 ((base)->lay & v3d->lay) && \
1839 (((base)->object->restrictflag & OB_RESTRICT_VIEW) == 0))
1840 #define TESTBASELIB(v3d, base) ( \
1841 ((base)->flag & SELECT) && \
1842 ((base)->lay & v3d->lay) && \
1843 ((base)->object->id.lib == NULL) && \
1844 (((base)->object->restrictflag & OB_RESTRICT_VIEW) == 0))
1845 #define TESTBASELIB_BGMODE(v3d, scene, base) ( \
1846 ((base)->flag & SELECT) && \
1847 ((base)->lay & (v3d ? v3d->lay : scene->lay)) && \
1848 ((base)->object->id.lib == NULL) && \
1849 (((base)->object->restrictflag & OB_RESTRICT_VIEW) == 0))
1850 #define BASE_EDITABLE_BGMODE(v3d, scene, base) ( \
1851 ((base)->lay & (v3d ? v3d->lay : scene->lay)) && \
1852 ((base)->object->id.lib == NULL) && \
1853 (((base)->object->restrictflag & OB_RESTRICT_VIEW) == 0))
1854 #define BASE_SELECTABLE(v3d, base) ( \
1855 (base->lay & v3d->lay) && \
1856 (base->object->restrictflag & (OB_RESTRICT_SELECT | OB_RESTRICT_VIEW)) == 0)
1857 #define BASE_VISIBLE(v3d, base) ( \
1858 (base->lay & v3d->lay) && \
1859 (base->object->restrictflag & OB_RESTRICT_VIEW) == 0)
1860 #define BASE_VISIBLE_BGMODE(v3d, scene, base) ( \
1861 (base->lay & (v3d ? v3d->lay : scene->lay)) && \
1862 (base->object->restrictflag & OB_RESTRICT_VIEW) == 0)
1864 #define FIRSTBASE scene->base.first
1865 #define LASTBASE scene->base.last
1866 #define BASACT (scene->basact)
1867 #define OBACT (BASACT ? BASACT->object: NULL)
1869 #define V3D_CAMERA_LOCAL(v3d) ((!(v3d)->scenelock && (v3d)->camera) ? (v3d)->camera : NULL)
1870 #define V3D_CAMERA_SCENE(scene, v3d) ((!(v3d)->scenelock && (v3d)->camera) ? (v3d)->camera : (scene)->camera)
1872 #define CFRA (scene->r.cfra)
1873 #define SUBFRA (scene->r.subframe)
1874 #define SFRA (scene->r.sfra)
1875 #define EFRA (scene->r.efra)
1876 #define PRVRANGEON (scene->r.flag & SCER_PRV_RANGE)
1877 #define PSFRA ((PRVRANGEON) ? (scene->r.psfra) : (scene->r.sfra))
1878 #define PEFRA ((PRVRANGEON) ? (scene->r.pefra) : (scene->r.efra))
1879 #define FRA2TIME(a) ((((double) scene->r.frs_sec_base) * (double)(a)) / (double)scene->r.frs_sec)
1880 #define TIME2FRA(a) ((((double) scene->r.frs_sec) * (double)(a)) / (double)scene->r.frs_sec_base)
1881 #define FPS (((double) scene->r.frs_sec) / (double)scene->r.frs_sec_base)
1883 /* base->flag is in DNA_object_types.h */
1885 /* toolsettings->snap_flag */
1887 #define SCE_SNAP_ROTATE 2
1888 #define SCE_SNAP_PEEL_OBJECT 4
1889 #define SCE_SNAP_PROJECT 8
1890 #define SCE_SNAP_NO_SELF 16
1891 #define SCE_SNAP_ABS_GRID 32
1893 /* toolsettings->snap_target */
1894 #define SCE_SNAP_TARGET_CLOSEST 0
1895 #define SCE_SNAP_TARGET_CENTER 1
1896 #define SCE_SNAP_TARGET_MEDIAN 2
1897 #define SCE_SNAP_TARGET_ACTIVE 3
1898 /* toolsettings->snap_mode */
1899 #define SCE_SNAP_MODE_INCREMENT 0
1900 #define SCE_SNAP_MODE_VERTEX 1
1901 #define SCE_SNAP_MODE_EDGE 2
1902 #define SCE_SNAP_MODE_FACE 3
1903 #define SCE_SNAP_MODE_VOLUME 4
1904 #define SCE_SNAP_MODE_NODE_X 5
1905 #define SCE_SNAP_MODE_NODE_Y 6
1906 #define SCE_SNAP_MODE_NODE_XY 7
1907 #define SCE_SNAP_MODE_GRID 8
1909 /* toolsettings->selectmode */
1910 #define SCE_SELECT_VERTEX 1 /* for mesh */
1911 #define SCE_SELECT_EDGE 2
1912 #define SCE_SELECT_FACE 4
1914 /* toolsettings->statvis->type */
1915 #define SCE_STATVIS_OVERHANG 0
1916 #define SCE_STATVIS_THICKNESS 1
1917 #define SCE_STATVIS_INTERSECT 2
1918 #define SCE_STATVIS_DISTORT 3
1919 #define SCE_STATVIS_SHARP 4
1921 /* toolsettings->particle.selectmode for particles */
1922 #define SCE_SELECT_PATH 1
1923 #define SCE_SELECT_POINT 2
1924 #define SCE_SELECT_END 4
1926 /* toolsettings->prop_mode (proportional falloff) */
1927 #define PROP_SMOOTH 0
1928 #define PROP_SPHERE 1
1930 #define PROP_SHARP 3
1932 #define PROP_CONST 5
1933 #define PROP_RANDOM 6
1934 #define PROP_INVSQUARE 7
1935 #define PROP_MODE_MAX 8
1937 /* toolsettings->proportional */
1938 #define PROP_EDIT_OFF 0
1939 #define PROP_EDIT_ON 1
1940 #define PROP_EDIT_CONNECTED 2
1941 #define PROP_EDIT_PROJECTED 3
1943 /* toolsettings->weightuser */
1945 OB_DRAW_GROUPUSER_NONE = 0,
1946 OB_DRAW_GROUPUSER_ACTIVE = 1,
1947 OB_DRAW_GROUPUSER_ALL = 2
1950 /* toolsettings->vgroupsubset */
1951 /* object_vgroup.c */
1952 typedef enum eVGroupSelect {
1954 WT_VGROUP_ACTIVE = 1,
1955 WT_VGROUP_BONE_SELECT = 2,
1956 WT_VGROUP_BONE_DEFORM = 3,
1957 WT_VGROUP_BONE_DEFORM_OFF = 4
1960 #define WT_VGROUP_MASK_ALL \
1961 ((1 << WT_VGROUP_ACTIVE) | \
1962 (1 << WT_VGROUP_BONE_SELECT) | \
1963 (1 << WT_VGROUP_BONE_DEFORM) | \
1964 (1 << WT_VGROUP_BONE_DEFORM_OFF) | \
1965 (1 << WT_VGROUP_ALL))
1969 #define SCE_DS_SELECTED (1<<0)
1970 #define SCE_DS_COLLAPSED (1<<1)
1971 #define SCE_NLA_EDIT_ON (1<<2)
1972 #define SCE_FRAME_DROP (1<<3)
1975 /* return flag BKE_scene_base_iter_next functions */
1976 /* #define F_ERROR -1 */ /* UNUSED */
1982 #define AUDIO_MUTE (1<<0)
1983 #define AUDIO_SYNC (1<<1)
1984 #define AUDIO_SCRUB (1<<2)
1985 #define AUDIO_VOLUME_ANIMATED (1<<3)
1988 #ifdef DNA_DEPRECATED
1989 FFMPEG_MULTIPLEX_AUDIO = 1, /* deprecated, you can choose none as audiocodec now */
1991 FFMPEG_AUTOSPLIT_OUTPUT = 2,
1992 FFMPEG_LOSSLESS_OUTPUT = 4,
1993 FFMPEG_USE_MAX_B_FRAMES = (1 << 3),
1998 PAINT_SHOW_BRUSH = (1 << 0),
1999 PAINT_FAST_NAVIGATE = (1 << 1),
2000 PAINT_SHOW_BRUSH_ON_SURFACE = (1 << 2),
2001 PAINT_USE_CAVITY_MASK = (1 << 3)
2004 /* Paint.symmetry_flags
2005 * (for now just a duplicate of sculpt symmetry flags) */
2006 typedef enum SymmetryFlags {
2007 PAINT_SYMM_X = (1 << 0),
2008 PAINT_SYMM_Y = (1 << 1),
2009 PAINT_SYMM_Z = (1 << 2),
2010 PAINT_SYMMETRY_FEATHER = (1 << 3),
2011 PAINT_TILE_X = (1 << 4),
2012 PAINT_TILE_Y = (1 << 5),
2013 PAINT_TILE_Z = (1 << 6),
2016 #define PAINT_SYMM_AXIS_ALL (PAINT_SYMM_X | PAINT_SYMM_Y | PAINT_SYMM_Z)
2019 /* These can eventually be moved to paint flags? */
2020 typedef enum SculptFlags {
2021 #ifdef DNA_DEPRECATED
2022 /* deprecated, part of paint struct symmetry_flags now */
2023 SCULPT_SYMM_X = (1 << 0),
2024 SCULPT_SYMM_Y = (1 << 1),
2025 SCULPT_SYMM_Z = (1 << 2),
2028 SCULPT_LOCK_X = (1 << 3),
2029 SCULPT_LOCK_Y = (1 << 4),
2030 SCULPT_LOCK_Z = (1 << 5),
2031 /* deprecated, part of paint struct symmetry_flags now */
2032 SCULPT_SYMMETRY_FEATHER = (1 << 6),
2034 SCULPT_USE_OPENMP = (1 << 7),
2035 SCULPT_ONLY_DEFORM = (1 << 8),
2036 SCULPT_SHOW_DIFFUSE = (1 << 9),
2038 /* If set, the mesh will be drawn with smooth-shading in
2039 * dynamic-topology mode */
2040 SCULPT_DYNTOPO_SMOOTH_SHADING = (1 << 10),
2042 /* If set, dynamic-topology brushes will subdivide short edges */
2043 SCULPT_DYNTOPO_SUBDIVIDE = (1 << 12),
2044 /* If set, dynamic-topology brushes will collapse short edges */
2045 SCULPT_DYNTOPO_COLLAPSE = (1 << 11),
2047 /* If set, dynamic-topology detail size will be constant in object space */
2048 SCULPT_DYNTOPO_DETAIL_CONSTANT = (1 << 13),
2049 SCULPT_DYNTOPO_DETAIL_BRUSH = (1 << 14),
2052 typedef enum ImagePaintMode {
2053 IMAGEPAINT_MODE_MATERIAL, /* detect texture paint slots from the material */
2054 IMAGEPAINT_MODE_IMAGE, /* select texture paint image directly */
2057 /* ImagePaintSettings.flag */
2058 #define IMAGEPAINT_DRAWING 1
2059 // #define IMAGEPAINT_DRAW_TOOL 2 // deprecated
2060 // #define IMAGEPAINT_DRAW_TOOL_DRAWING 4 // deprecated
2062 /* projection painting only */
2063 #define IMAGEPAINT_PROJECT_XRAY (1 << 4)
2064 #define IMAGEPAINT_PROJECT_BACKFACE (1 << 5)
2065 #define IMAGEPAINT_PROJECT_FLAT (1 << 6)
2066 #define IMAGEPAINT_PROJECT_LAYER_CLONE (1 << 7)
2067 #define IMAGEPAINT_PROJECT_LAYER_STENCIL (1 << 8)
2068 #define IMAGEPAINT_PROJECT_LAYER_STENCIL_INV (1 << 9)
2071 #define IMAGEPAINT_MISSING_UVS (1 << 0)
2072 #define IMAGEPAINT_MISSING_MATERIAL (1 << 1)
2073 #define IMAGEPAINT_MISSING_TEX (1 << 2)
2074 #define IMAGEPAINT_MISSING_STENCIL (1 << 3)
2076 /* toolsettings->uvcalc_flag */
2077 #define UVCALC_FILLHOLES 1
2078 #define UVCALC_NO_ASPECT_CORRECT 2 /* would call this UVCALC_ASPECT_CORRECT, except it should be default with old file */
2079 #define UVCALC_TRANSFORM_CORRECT 4 /* adjust UV's while transforming to avoid distortion */
2080 #define UVCALC_USESUBSURF 8 /* Use mesh data after subsurf to compute UVs*/
2082 /* toolsettings->uv_flag */
2083 #define UV_SYNC_SELECTION 1
2084 #define UV_SHOW_SAME_IMAGE 2
2086 /* toolsettings->uv_selectmode */
2087 #define UV_SELECT_VERTEX 1
2088 #define UV_SELECT_EDGE 2
2089 #define UV_SELECT_FACE 4
2090 #define UV_SELECT_ISLAND 8
2092 /* toolsettings->edge_mode */
2093 #define EDGE_MODE_SELECT 0
2094 #define EDGE_MODE_TAG_SEAM 1
2095 #define EDGE_MODE_TAG_SHARP 2
2096 #define EDGE_MODE_TAG_CREASE 3
2097 #define EDGE_MODE_TAG_BEVEL 4
2098 #define EDGE_MODE_TAG_FREESTYLE 5
2100 /* toolsettings->gpencil_flags */
2101 typedef enum eGPencil_Flags {
2102 /* "Continuous Drawing" - The drawing operator enters a mode where multiple strokes can be drawn */
2103 GP_TOOL_FLAG_PAINTSESSIONS_ON = (1 << 0),
2104 /* When creating new frames, the last frame gets used as the basis for the new one */
2105 GP_TOOL_FLAG_RETAIN_LAST = (1 << 1),
2106 /* Add the strokes below all strokes in the layer */
2107 GP_TOOL_FLAG_PAINT_ONBACK = (1 << 2)
2110 /* toolsettings->gpencil_src */
2111 typedef enum eGPencil_Source_3D {
2112 GP_TOOL_SOURCE_SCENE = 0,
2113 GP_TOOL_SOURCE_OBJECT = 1
2114 } eGPencil_Source_3d;
2116 /* toolsettings->gpencil_*_align - Stroke Placement mode flags */
2117 typedef enum eGPencil_Placement_Flags {
2118 /* New strokes are added in viewport/data space (i.e. not screen space) */
2119 GP_PROJECT_VIEWSPACE = (1 << 0),
2121 /* Viewport space, but relative to render canvas (Sequencer Preview Only) */
2122 GP_PROJECT_CANVAS = (1 << 1),
2124 /* Project into the screen's Z values */
2125 GP_PROJECT_DEPTH_VIEW = (1 << 2),
2126 GP_PROJECT_DEPTH_STROKE = (1 << 3),
2128 /* "Use Endpoints" */
2129 GP_PROJECT_DEPTH_STROKE_ENDPOINTS = (1 << 4),
2130 } eGPencil_Placement_Flags;
2132 /* toolsettings->particle flag */
2133 #define PE_KEEP_LENGTHS 1
2134 #define PE_LOCK_FIRST 2
2135 #define PE_DEFLECT_EMITTER 4
2136 #define PE_INTERPOLATE_ADDED 8
2137 #define PE_DRAW_PART 16
2138 /* #define PE_X_MIRROR 64 */ /* deprecated */
2139 #define PE_FADE_TIME 128
2140 #define PE_AUTO_VELOCITY 256
2142 /* toolsetting->particle brushtype */
2143 #define PE_BRUSH_NONE -1
2144 #define PE_BRUSH_COMB 0
2145 #define PE_BRUSH_CUT 1
2146 #define PE_BRUSH_LENGTH 2
2147 #define PE_BRUSH_PUFF 3
2148 #define PE_BRUSH_ADD 4
2149 #define PE_BRUSH_SMOOTH 5
2150 #define PE_BRUSH_WEIGHT 6
2152 /* this must equal ParticleEditSettings.brush array size */
2153 #define PE_TOT_BRUSH 6
2155 /* ParticleBrushData->flag */
2156 #define PE_BRUSH_DATA_PUFF_VOLUME 1
2158 /* tooksettings->particle edittype */
2159 #define PE_TYPE_PARTICLES 0
2160 #define PE_TYPE_SOFTBODY 1
2161 #define PE_TYPE_CLOTH 2
2163 /* toolsettings->skgen_options */
2164 #define SKGEN_FILTER_INTERNAL (1 << 0)
2165 #define SKGEN_FILTER_EXTERNAL (1 << 1)
2166 #define SKGEN_SYMMETRY (1 << 2)
2167 #define SKGEN_CUT_LENGTH (1 << 3)
2168 #define SKGEN_CUT_ANGLE (1 << 4)
2169 #define SKGEN_CUT_CORRELATION (1 << 5)
2170 #define SKGEN_HARMONIC (1 << 6)
2171 #define SKGEN_STICK_TO_EMBEDDING (1 << 7)
2172 #define SKGEN_ADAPTIVE_DISTANCE (1 << 8)
2173 #define SKGEN_FILTER_SMART (1 << 9)
2174 #define SKGEN_DISP_LENGTH (1 << 10)
2175 #define SKGEN_DISP_WEIGHT (1 << 11)
2176 #define SKGEN_DISP_ORIG (1 << 12)
2177 #define SKGEN_DISP_EMBED (1 << 13)
2178 #define SKGEN_DISP_INDEX (1 << 14)
2180 #define SKGEN_SUB_LENGTH 0
2181 #define SKGEN_SUB_ANGLE 1
2182 #define SKGEN_SUB_CORRELATION 2
2183 #define SKGEN_SUB_TOTAL 3
2185 /* toolsettings->skgen_postpro */
2186 #define SKGEN_SMOOTH 0
2187 #define SKGEN_AVERAGE 1
2188 #define SKGEN_SHARPEN 2
2190 /* toolsettings->bone_sketching */
2191 #define BONE_SKETCHING 1
2192 #define BONE_SKETCHING_QUICK 2
2193 #define BONE_SKETCHING_ADJUST 4
2195 /* toolsettings->bone_sketching_convert */
2196 #define SK_CONVERT_CUT_FIXED 0
2197 #define SK_CONVERT_CUT_LENGTH 1
2198 #define SK_CONVERT_CUT_ADAPTATIVE 2
2199 #define SK_CONVERT_RETARGET 3
2201 /* toolsettings->skgen_retarget_options */
2202 #define SK_RETARGET_AUTONAME 1
2204 /* toolsettings->skgen_retarget_roll */
2205 #define SK_RETARGET_ROLL_NONE 0
2206 #define SK_RETARGET_ROLL_VIEW 1
2207 #define SK_RETARGET_ROLL_JOINT 2
2209 /* physics_settings->flag */
2210 #define PHYS_GLOBAL_GRAVITY 1
2214 /* UnitSettings->system */
2215 #define USER_UNIT_NONE 0
2216 #define USER_UNIT_METRIC 1
2217 #define USER_UNIT_IMPERIAL 2
2218 /* UnitSettings->flag */
2219 #define USER_UNIT_OPT_SPLIT 1
2220 #define USER_UNIT_ROT_RADIANS 2
2226 #endif /* __DNA_SCENE_TYPES_H__ */