4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
21 * All rights reserved.
23 * The Original Code is: all of this file.
25 * Contributor(s): none yet.
27 * ***** END GPL LICENSE BLOCK *****
29 #ifndef DNA_SCENE_TYPES_H
30 #define DNA_SCENE_TYPES_H
32 /** \file DNA_scene_types.h
37 #define DURIAN_CAMERA_SWITCH
43 #include "DNA_vec_types.h"
44 #include "DNA_listBase.h"
61 struct Base *next, *prev;
62 unsigned int lay, selcol;
65 struct Object *object;
68 typedef struct AviCodecData {
69 void *lpFormat; /* save format */
70 void *lpParms; /* compressor options */
71 unsigned int cbFormat; /* size of lpFormat buffer */
72 unsigned int cbParms; /* size of lpParms buffer */
74 unsigned int fccType; /* stream type, for consistency */
75 unsigned int fccHandler; /* compressor */
76 unsigned int dwKeyFrameEvery; /* keyframe rate */
77 unsigned int dwQuality; /* compress quality 0-10,000 */
78 unsigned int dwBytesPerSecond; /* bytes per second */
79 unsigned int dwFlags; /* flags... see below */
80 unsigned int dwInterleaveEvery; /* for non-video streams only */
83 char avicodecname[128];
86 typedef struct QuicktimeCodecData {
87 /*Old quicktime implementation compatibility fields, read only in 2.5 - deprecated*/
88 void *cdParms; /* codec/compressor options */
89 void *pad; /* padding */
91 unsigned int cdSize; /* size of cdParms buffer */
92 unsigned int pad2; /* padding */
94 char qtcodecname[128];
97 typedef struct QuicktimeCodecSettings {
98 /* Codec settings detailed for 2.5 implementation*/
99 int codecType; /* Types defined in quicktime_export.h */
100 int codecSpatialQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
102 /* Settings not available in current QTKit API */
106 int codecTemporalQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
107 int minSpatialQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
108 int minTemporalQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
110 int bitRate; /* bitrate in bps */
112 /* Audio Codec settings */
120 } QuicktimeCodecSettings;
122 typedef struct FFMpegCodecData {
138 IDProperty *properties;
142 typedef struct AudioData {
143 int mixrate; // 2.5: now in FFMpegCodecData: audio_mixrate
144 float main; // 2.5: now in FFMpegCodecData: audio_volume
145 float speed_of_sound;
146 float doppler_factor;
152 typedef struct SceneRenderLayer {
153 struct SceneRenderLayer *next, *prev;
157 struct Material *mat_override;
158 struct Group *light_override;
160 unsigned int lay; /* scene->lay itself has priority over this */
161 unsigned int lay_zmask; /* has to be after lay, this is for Z-masking */
166 int passflag; /* pass_xor has to be after passflag */
171 #define SCE_LAY_SOLID 1
172 #define SCE_LAY_ZTRA 2
173 #define SCE_LAY_HALO 4
174 #define SCE_LAY_EDGE 8
175 #define SCE_LAY_SKY 16
176 #define SCE_LAY_STRAND 32
177 /* flags between 32 and 0x8000 are set to 1 already, for future options */
179 #define SCE_LAY_ALL_Z 0x8000
180 #define SCE_LAY_XOR 0x10000
181 #define SCE_LAY_DISABLE 0x20000
182 #define SCE_LAY_ZMASK 0x40000
183 #define SCE_LAY_NEG_ZMASK 0x80000
186 #define SCE_PASS_COMBINED (1<<0)
187 #define SCE_PASS_Z (1<<1)
188 #define SCE_PASS_RGBA (1<<2)
189 #define SCE_PASS_DIFFUSE (1<<3)
190 #define SCE_PASS_SPEC (1<<4)
191 #define SCE_PASS_SHADOW (1<<5)
192 #define SCE_PASS_AO (1<<6)
193 #define SCE_PASS_REFLECT (1<<7)
194 #define SCE_PASS_NORMAL (1<<8)
195 #define SCE_PASS_VECTOR (1<<9)
196 #define SCE_PASS_REFRACT (1<<10)
197 #define SCE_PASS_INDEXOB (1<<11)
198 #define SCE_PASS_UV (1<<12)
199 #define SCE_PASS_INDIRECT (1<<13)
200 #define SCE_PASS_MIST (1<<14)
201 #define SCE_PASS_RAYHITS (1<<15)
202 #define SCE_PASS_EMIT (1<<16)
203 #define SCE_PASS_ENVIRONMENT (1<<17)
205 /* note, srl->passflag is treestore element 'nr' in outliner, short still... */
208 typedef struct RenderData {
210 struct AviCodecData *avicodecdata;
211 struct QuicktimeCodecData *qtcodecdata;
212 struct QuicktimeCodecSettings qtcodecsettings;
213 struct FFMpegCodecData ffcodecdata;
215 int cfra, sfra, efra; /* frames as in 'images' */
216 float subframe; /* subframe offset from cfra, in 0.0-1.0 */
217 int psfra, pefra; /* start+end frames of preview range */
219 int images, framapto;
222 float framelen, blurfac;
224 /** For UR edge rendering: give the edges this color */
225 float edgeR, edgeG, edgeB;
227 short fullscreen, xplay, yplay, freqplay; /* standalone player */ // XXX deprecated since 2.5
228 short depth, attrib; /* standalone player */ // XXX deprecated since 2.5
229 int frame_step; /* frames to jump during render/playback */
231 short stereomode; /* standalone player stereo settings */ // XXX deprecated since 2.5
233 short dimensionspreset; /* for the dimensions presets menu */
235 short filtertype; /* filter is box, tent, gauss, mitch, etc */
237 short size, maximsize; /* size in %, max in Kb */
240 * The desired number of pixels in the x direction
244 * The desired number of pixels in the y direction
248 * The number of part to use in the x direction
252 * The number of part to use in the y direction
256 short winpos, planes, imtype, subimtype;
259 /* 0: Enable backbuffering for images */
264 * Render to image editor, fullscreen or to new window.
271 * Flags for render settings. Use bit-masking to access the settings.
276 * Flags for render settings. Use bit-masking to access the settings.
281 * Flags for raytrace settings. Use bit-masking to access the settings.
283 int raytrace_options;
286 * Raytrace acceleration structure
288 short raytrace_structure;
290 /* renderer (deprecated) */
293 /* octree resolution */
298 * What to do with the sky/background. Picks sky/premul/key
299 * blending for the background
304 * The number of samples to use per pixel.
308 short frs_sec, edgeint;
311 /* safety, border and display rect */
315 /* information on different layers to be rendered */
319 /* number of mblur samples */
323 * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
327 * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
334 * Value used to define filter size for all filter options */
338 /* color management settings - color profiles, gamma correction, etc */
341 /** post-production settings. Depricated, but here for upwards compat (initialized to 1) */
342 float postgamma, posthue, postsat;
344 /* Dither noise intensity */
345 float dither_intensity;
347 /* Bake Render options */
348 short bake_osa, bake_filter, bake_mode, bake_flag;
349 short bake_normal_space, bake_quad_split;
350 float bake_maxdist, bake_biasdist, bake_pad;
352 /* paths to backbufffer, output */
353 char backbuf[160], pic[160];
357 short stamp_font_id, pad3; /* select one of blenders bitmap fonts */
359 /* stamp info user data. */
360 char stamp_udata[160];
362 /* foreground/background color. */
366 /* sequencer options */
369 char seq_flag; /* flag use for sequence render/draw */
372 /* render simplify */
374 short simplify_subsurf;
375 short simplify_shadowsamples;
376 float simplify_particles;
377 float simplify_aosss;
380 short cineonwhite, cineonblack;
384 short jp2_preset, jp2_depth;
387 /* Dome variables */ // XXX deprecated since 2.5
388 short domeres, domemode; // XXX deprecated since 2.5
389 short domeangle, dometilt; // XXX deprecated since 2.5
390 float domeresbuf; // XXX deprecated since 2.5
391 float pad2; // XXX deprecated since 2.5
392 struct Text *dometext; // XXX deprecated since 2.5
398 /* control render convert and shading engine */
399 typedef struct RenderProfile {
400 struct RenderProfile *next, *prev;
405 short shadbufsample_max;
408 float ao_error, pad2;
412 typedef struct GameDome {
416 struct Text *warptext;
419 #define DOME_FISHEYE 1
420 #define DOME_TRUNCATED_FRONT 2
421 #define DOME_TRUNCATED_REAR 3
422 #define DOME_ENVMAP 4
423 #define DOME_PANORAM_SPH 5
424 #define DOME_NUM_MODES 6
426 typedef struct GameFraming {
428 char type, pad1, pad2, pad3;
431 #define SCE_GAMEFRAMING_BARS 0
432 #define SCE_GAMEFRAMING_EXTEND 1
433 #define SCE_GAMEFRAMING_SCALE 2
435 typedef struct GameData {
437 /* physics (it was in world)*/
438 float gravity; /*Gravitation constant for the game world*/
441 * Radius of the activity bubble, in Manhattan length. Objects
442 * outside the box are activity-culled. */
443 float activityBoxRadius; //it's not being used ANYWHERE !!!!!!!!!!!!!!
445 * bit 3: (gameengine): Activity culling is enabled.
446 * bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum culling
448 short mode, flag, matmode, pad[3];
449 short occlusionRes; /* resolution of occlusion Z buffer in pixel */
451 short ticrate, maxlogicstep, physubstep, maxphystep;
453 /* standalone player */
454 struct GameFraming framing;
455 short fullscreen, xplay, yplay, freqplay;
456 short depth, attrib, rt1, rt2;
458 /* stereo/dome mode */
459 struct GameDome dome;
460 short stereoflag, stereomode, xsch, ysch; //xsch and ysch used for backwards compat.
461 float eyeseparation, pad1;
464 #define STEREO_NOSTEREO 1
465 #define STEREO_ENABLED 2
466 #define STEREO_DOME 3
468 //#define STEREO_NOSTEREO 1
469 #define STEREO_QUADBUFFERED 2
470 #define STEREO_ABOVEBELOW 3
471 #define STEREO_INTERLACED 4
472 #define STEREO_ANAGLYPH 5
473 #define STEREO_SIDEBYSIDE 6
474 #define STEREO_VINTERLACE 7
475 //#define STEREO_DOME 8
481 #define WOPHY_DYNAMO 3
483 #define WOPHY_BULLET 5
486 #define GAME_ENABLE_ALL_FRAMES (1 << 1)
487 #define GAME_SHOW_DEBUG_PROPS (1 << 2)
488 #define GAME_SHOW_FRAMERATE (1 << 3)
489 #define GAME_SHOW_PHYSICS (1 << 4)
490 #define GAME_DISPLAY_LISTS (1 << 5)
491 #define GAME_GLSL_NO_LIGHTS (1 << 6)
492 #define GAME_GLSL_NO_SHADERS (1 << 7)
493 #define GAME_GLSL_NO_SHADOWS (1 << 8)
494 #define GAME_GLSL_NO_RAMPS (1 << 9)
495 #define GAME_GLSL_NO_NODES (1 << 10)
496 #define GAME_GLSL_NO_EXTRA_TEX (1 << 11)
497 #define GAME_IGNORE_DEPRECATION_WARNINGS (1 << 12)
498 #define GAME_ENABLE_ANIMATION_RECORD (1 << 13)
499 #define GAME_SHOW_MOUSE (1 << 14)
500 #define GAME_GLSL_NO_COLOR_MANAGEMENT (1 << 15)
502 /* GameData.matmode */
503 #define GAME_MAT_TEXFACE 0
504 #define GAME_MAT_MULTITEX 1
505 #define GAME_MAT_GLSL 2
507 typedef struct TimeMarker {
508 struct TimeMarker *next, *prev;
512 struct Object *camera;
515 typedef struct Paint {
518 /* WM Paint cursor */
520 unsigned char paint_cursor_col[4];
525 typedef struct ImagePaintSettings {
530 /* for projection painting only */
531 short seam_bleed, normal_angle;
532 short screen_grab_size[2]; /* capture size for re-projection */
536 void *paintcursor; /* wm handle */
537 } ImagePaintSettings;
539 typedef struct ParticleBrushData {
540 short size; /* common setting */
541 short step, invert, count; /* for specific brushes only */
546 typedef struct ParticleEditSettings {
552 ParticleBrushData brush[7]; /* 7 = PE_TOT_BRUSH */
553 void *paintcursor; /* runtime */
555 float emitterdist, rt;
560 int draw_step, fade_frames;
563 struct Object *object;
564 } ParticleEditSettings;
566 typedef struct TransformOrientation {
567 struct TransformOrientation *next, *prev;
570 } TransformOrientation;
572 typedef struct Sculpt {
575 /* For rotating around a pivot point */
576 //float pivot[3]; XXX not used?
579 /* Control tablet input */
580 //char tablet_size, tablet_strength; XXX not used?
583 // all this below is used to communicate with the cursor drawing routine
585 /* record movement of mouse so that rake can start at an intuitive angle */
586 float last_x, last_y;
591 float anchored_location[3];
592 float anchored_initial_mouse[2];
595 float pressure_value;
597 float special_rotation;
602 typedef struct VPaint {
606 int tot; /* allocation size of prev buffers */
607 unsigned int *vpaint_prev; /* previous mesh colors */
608 struct MDeformVert *wpaint_prev; /* previous vertex weights */
610 void *paintcursor; /* wm handle */
614 #define VP_COLINDEX 1
619 // #define VP_MIRROR_X 32 // depricated in 2.5x use (me->editflag & ME_EDIT_MIRROR_X)
620 #define VP_ONLYVGROUP 128
623 typedef struct ToolSettings {
624 VPaint *vpaint; /* vertex paint */
625 VPaint *wpaint; /* weight paint */
631 /* Subdivide Settings */
634 /*Triangle to Quad conversion threshold*/
641 float extr_offs; /* extrude offset */
642 float doublimit; /* remove doubles limit */
643 float normalsize; /* size of normals */
646 /* Selection Mode for Mesh */
649 /* Primitive Settings */
654 /* Cylinder - Tube - Circle */
660 float uvcalc_cubesize;
663 short uvcalc_mapalign;
665 short uv_flag, uv_selectmode;
672 short autoik_chainlen;
674 /* Image Paint (8 byttse aligned please!) */
675 struct ImagePaintSettings imapaint;
677 /* Particle Editing */
678 struct ParticleEditSettings particle;
680 /* Transform Proportional Area of Effect */
681 float proportional_size;
683 /* Select Group Threshold */
689 /* Auto-Keying Mode */
690 short autokey_mode, autokey_flag; /* defines in DNA_userdef_types.h */
694 char retopo_paint_tool;
695 char line_div, ellipse_div, retopo_hotspot;
698 char multires_subdiv_type;
700 /* Skeleton generation */
701 short skgen_resolution;
702 float skgen_threshold_internal;
703 float skgen_threshold_external;
704 float skgen_length_ratio;
705 float skgen_length_limit;
706 float skgen_angle_limit;
707 float skgen_correlation_limit;
708 float skgen_symmetry_limit;
709 float skgen_retarget_angle_weight;
710 float skgen_retarget_length_weight;
711 float skgen_retarget_distance_weight;
714 char skgen_postpro_passes;
715 char skgen_subdivisions[3];
716 char skgen_multi_level;
718 /* Skeleton Sketching */
719 struct Object *skgen_template;
721 char bone_sketching_convert;
722 char skgen_subdivision_number;
723 char skgen_retarget_options;
724 char skgen_retarget_roll;
725 char skgen_side_string[8];
726 char skgen_num_string[8];
730 char edge_mode_live_unwrap;
734 short snap_flag, snap_target;
735 short proportional, prop_mode;
736 char proportional_objects; /* proportional edit, object mode */
739 int auto_normalize; /*auto normalizing mode in wpaint*/
741 short sculpt_paint_settings; /* user preferences for sculpt and paint */
743 int sculpt_paint_unified_size; /* unified radius of brush in pixels */
744 float sculpt_paint_unified_unprojected_radius;/* unified radius of brush in Blender units */
745 float sculpt_paint_unified_alpha; /* unified strength of brush */
748 typedef struct bStats {
749 /* scene totals for visible layers */
750 int totobj, totlamp, totobjsel, totcurve, totmesh, totarmature;
751 int totvert, totface;
754 typedef struct UnitSettings {
755 /* Display/Editing unit options for each scene */
756 float scale_length; /* maybe have other unit conversions? */
757 char system; /* imperial, metric etc */
758 char system_rotation; /* not implimented as a propper unit system yet */
763 typedef struct PhysicsSettings {
765 int flag, quick_cache_step, rt;
768 typedef struct Scene {
770 struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
772 struct Object *camera;
778 struct Base *basact; /* active base */
779 struct Object *obedit; /* name replaces old G.obedit */
781 float cursor[3]; /* 3d cursor location */
782 float twcent[3]; /* center for transform widget */
783 float twmin[3], twmax[3]; /* boundbox of selection for transform widget */
785 unsigned int lay; /* bitflags for layer visibility */
786 int layact; /* active layer */
787 unsigned int lay_updated; /* runtime flag, has layer ever been updated since load? */
788 unsigned int customdata_mask; /* XXX. runtime flag for drawing, actually belongs in the window, only used by object_handle_update() */
789 unsigned int customdata_mask_modal; /* XXX. same as above but for temp operator use (gl renders) */
791 short flag; /* various settings */
795 struct bNodeTree *nodetree;
797 struct Editing *ed; /* sequence editor data is allocated here */
799 struct ToolSettings *toolsettings; /* default allocated now */
800 struct SceneStats *stats; /* default allocated now */
802 /* migrate or replace? depends on some internal things... */
803 /* no, is on the right place (ton) */
805 struct AudioData audio;
808 ListBase transform_spaces;
811 void *sound_scene_handle;
812 void *sound_scrub_handle;
814 void *fps_info; /* (runtime) info/cache used for presenting playback framerate info to the user */
816 /* none of the dependancy graph vars is mean to be saved */
817 struct DagForest *theDag;
818 short dagisvalid, dagflags;
819 short recalc; /* recalc = counterpart of ob->recalc */
824 /* User-Defined KeyingSets */
825 int active_keyingset; /* index of the active KeyingSet. first KeyingSet has index 1, 'none' active is 0, 'add new' is -1 */
826 ListBase keyingsets; /* KeyingSets for the given frame */
829 struct GameFraming framing; // XXX deprecated since 2.5
833 struct UnitSettings unit;
838 /* Physics simulation settings */
839 struct PhysicsSettings physics_settings;
843 /* **************** RENDERDATA ********************* */
846 /* use preview range */
847 #define SCER_PRV_RANGE (1<<0)
851 #define R_SHADOW 0x0002
852 #define R_GAMMA 0x0004
853 #define R_ORTHO 0x0008
854 #define R_ENVMAP 0x0010
855 #define R_EDGE 0x0020
856 #define R_FIELDS 0x0040
857 #define R_FIELDSTILL 0x0080
858 #define R_RADIO 0x0100
859 #define R_BORDER 0x0200
860 #define R_PANORAMA 0x0400 /* deprecated as scene option, still used in renderer */
861 #define R_CROP 0x0800
862 /*#define R_COSMO 0x1000 deprecated */
863 #define R_ODDFIELD 0x2000
864 #define R_MBLUR 0x4000
865 /* unified was here */
866 #define R_RAYTRACE 0x10000
867 /* R_GAUSS is obsolete, but used to retrieve setting from old files */
868 #define R_GAUSS 0x20000
869 /* fbuf obsolete... */
870 /*#define R_FBUF 0x40000*/
871 /* threads obsolete... is there for old files, now use for autodetect threads */
872 #define R_THREADS 0x80000
873 /* Use the same flag for autothreads */
874 #define R_FIXED_THREADS 0x80000
876 #define R_SPEED 0x100000
877 #define R_SSS 0x200000
878 #define R_NO_OVERWRITE 0x400000 /* skip existing files */
879 #define R_TOUCH 0x800000 /* touch files before rendering */
880 #define R_SIMPLIFY 0x1000000
883 #define R_SEQ_GL_PREV 1
884 #define R_SEQ_GL_REND 2
888 #define R_OUTPUT_SCREEN 0
889 #define R_OUTPUT_AREA 1
890 #define R_OUTPUT_WINDOW 2
891 #define R_OUTPUT_NONE 3
892 /*#define R_OUTPUT_FORKED 4*/
895 #define R_FILTER_BOX 0
896 #define R_FILTER_TENT 1
897 #define R_FILTER_QUAD 2
898 #define R_FILTER_CUBIC 3
899 #define R_FILTER_CATROM 4
900 #define R_FILTER_GAUSS 5
901 #define R_FILTER_MITCH 6
902 #define R_FILTER_FAST_GAUSS 7 /* note, this is only used for nodes at the moment */
904 /* yafray: renderer flag (not only exclusive to yafray) */
908 /* raytrace structure */
909 #define R_RAYSTRUCTURE_AUTO 0
910 #define R_RAYSTRUCTURE_OCTREE 1
911 #define R_RAYSTRUCTURE_BLIBVH 2
912 #define R_RAYSTRUCTURE_VBVH 3
913 #define R_RAYSTRUCTURE_SIMD_SVBVH 4 /* needs SIMD */
914 #define R_RAYSTRUCTURE_SIMD_QBVH 5 /* needs SIMD */
916 /* raytrace_options */
917 #define R_RAYTRACE_USE_LOCAL_COORDS 0x0001
918 #define R_RAYTRACE_USE_INSTANCES 0x0002
920 /* scemode (int now) */
921 #define R_DOSEQ 0x0001
922 #define R_BG_RENDER 0x0002
923 /* passepartout is camera option now, keep this for backward compatibility */
924 #define R_PASSEPARTOUT 0x0004
925 #define R_PREVIEWBUTS 0x0008
926 #define R_EXTENSION 0x0010
927 #define R_MATNODE_PREVIEW 0x0020
928 #define R_DOCOMP 0x0040
929 #define R_COMP_CROP 0x0080
930 #define R_FREE_IMAGE 0x0100
931 #define R_SINGLE_LAYER 0x0200
932 #define R_EXR_TILE_FILE 0x0400
933 #define R_COMP_FREE 0x0800
934 #define R_NO_IMAGE_LOAD 0x1000
935 #define R_NO_TEX 0x2000
936 #define R_NO_FRAME_UPDATE 0x4000
937 #define R_FULL_SAMPLE 0x8000
938 /* #define R_DEPRECATED 0x10000 */
939 /* #define R_RECURS_PROTECTION 0x20000 */
940 #define R_TEXNODE_PREVIEW 0x40000
943 #define R_STAMP_TIME 0x0001
944 #define R_STAMP_FRAME 0x0002
945 #define R_STAMP_DATE 0x0004
946 #define R_STAMP_CAMERA 0x0008
947 #define R_STAMP_SCENE 0x0010
948 #define R_STAMP_NOTE 0x0020
949 #define R_STAMP_DRAW 0x0040 /* draw in the image */
950 #define R_STAMP_MARKER 0x0080
951 #define R_STAMP_FILENAME 0x0100
952 #define R_STAMP_SEQSTRIP 0x0200
953 #define R_STAMP_RENDERTIME 0x0400
954 #define R_STAMP_CAMERALENS 0x0800
955 #define R_STAMP_ALL (R_STAMP_TIME|R_STAMP_FRAME|R_STAMP_DATE|R_STAMP_CAMERA|R_STAMP_SCENE|R_STAMP_NOTE|R_STAMP_MARKER|R_STAMP_FILENAME|R_STAMP_SEQSTRIP|R_STAMP_RENDERTIME|R_STAMP_CAMERALENS)
959 #define R_ALPHAPREMUL 1
963 #define R_PLANES24 24
964 #define R_PLANES32 32
968 #define R_COLOR_MANAGEMENT 1
973 /* #define R_HAMX 2 */ /* hamx is nomore */
974 /* #define R_FTYPE 3 */ /* ftype is nomore */
976 /*#define R_MOVIE 5*/ /* movie is nomore */
982 #define R_AVICODEC 18
983 #define R_QUICKTIME 19
989 #define R_FRAMESERVER 25
992 #define R_MULTILAYER 28
999 /* subimtype, flag options for imtype */
1000 #define R_OPENEXR_HALF 1
1001 #define R_OPENEXR_ZBUF 2
1002 #define R_PREVIEW_JPG 4
1003 #define R_CINEON_LOG 8
1004 #define R_TIFF_16BIT 16
1006 #define R_JPEG2K_12BIT 32 /* Jpeg2000 */
1007 #define R_JPEG2K_16BIT 64
1008 #define R_JPEG2K_YCC 128 /* when disabled use RGB */
1009 #define R_JPEG2K_CINE_PRESET 256
1010 #define R_JPEG2K_CINE_48FPS 512
1013 /* bake_mode: same as RE_BAKE_xxx defines */
1015 #define R_BAKE_CLEAR 1
1016 #define R_BAKE_OSA 2
1017 #define R_BAKE_TO_ACTIVE 4
1018 #define R_BAKE_NORMALIZE 8
1020 /* bake_normal_space */
1021 #define R_BAKE_SPACE_CAMERA 0
1022 #define R_BAKE_SPACE_WORLD 1
1023 #define R_BAKE_SPACE_OBJECT 2
1024 #define R_BAKE_SPACE_TANGENT 3
1027 #define R_SIMPLE_NO_TRIANGULATE 1
1029 /* sequencer seq_prev_type seq_rend_type */
1032 /* **************** SCENE ********************* */
1034 /* for general use */
1035 #define MAXFRAME 300000
1036 #define MAXFRAMEF 300000.0f
1039 #define MINFRAMEF 0.0f
1041 /* (minimum frame number for current-frame) */
1042 #define MINAFRAME -300000
1043 #define MINAFRAMEF -300000.0f
1045 /* depricate this! */
1046 #define TESTBASE(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
1047 #define TESTBASELIB(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && ((base)->object->id.lib==NULL) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
1048 #define TESTBASELIB_BGMODE(v3d, scene, base) ( ((base)->flag & SELECT) && ((base)->lay & (v3d ? v3d->lay : scene->lay)) && ((base)->object->id.lib==NULL) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
1049 #define BASE_EDITABLE_BGMODE(v3d, scene, base) (((base)->lay & (v3d ? v3d->lay : scene->lay)) && ((base)->object->id.lib==NULL) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
1050 #define BASE_SELECTABLE(v3d, base) ((base->lay & v3d->lay) && (base->object->restrictflag & (OB_RESTRICT_SELECT|OB_RESTRICT_VIEW))==0)
1051 #define BASE_VISIBLE(v3d, base) ((base->lay & v3d->lay) && (base->object->restrictflag & OB_RESTRICT_VIEW)==0)
1052 #define FIRSTBASE scene->base.first
1053 #define LASTBASE scene->base.last
1054 #define BASACT (scene->basact)
1055 #define OBACT (BASACT? BASACT->object: NULL)
1057 #define V3D_CAMERA_LOCAL(v3d) ((!(v3d)->scenelock && (v3d)->camera) ? (v3d)->camera : NULL)
1058 #define V3D_CAMERA_SCENE(scene, v3d) ((!(v3d)->scenelock && (v3d)->camera) ? (v3d)->camera : (scene)->camera)
1060 #define ID_NEW(a) if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid
1061 #define ID_NEW_US(a) if( (a)->id.newid) {(a)= (void *)(a)->id.newid; (a)->id.us++;}
1062 #define ID_NEW_US2(a) if( ((ID *)a)->newid) {(a)= ((ID *)a)->newid; ((ID *)a)->us++;}
1063 #define CFRA (scene->r.cfra)
1064 #define SUBFRA (scene->r.subframe)
1065 #define SFRA (scene->r.sfra)
1066 #define EFRA (scene->r.efra)
1067 #define PRVRANGEON (scene->r.flag & SCER_PRV_RANGE)
1068 #define PSFRA ((PRVRANGEON)? (scene->r.psfra): (scene->r.sfra))
1069 #define PEFRA ((PRVRANGEON)? (scene->r.pefra): (scene->r.efra))
1070 #define FRA2TIME(a) ((((double) scene->r.frs_sec_base) * (double)(a)) / (double)scene->r.frs_sec)
1071 #define TIME2FRA(a) ((((double) scene->r.frs_sec) * (double)(a)) / (double)scene->r.frs_sec_base)
1072 #define FPS (((double) scene->r.frs_sec) / (double)scene->r.frs_sec_base)
1074 #define RAD_PHASE_PATCHES 1
1075 #define RAD_PHASE_FACES 2
1077 /* base->flag is in DNA_object_types.h */
1079 /* toolsettings->snap_flag */
1081 #define SCE_SNAP_ROTATE 2
1082 #define SCE_SNAP_PEEL_OBJECT 4
1083 #define SCE_SNAP_PROJECT 8
1084 /* toolsettings->snap_target */
1085 #define SCE_SNAP_TARGET_CLOSEST 0
1086 #define SCE_SNAP_TARGET_CENTER 1
1087 #define SCE_SNAP_TARGET_MEDIAN 2
1088 #define SCE_SNAP_TARGET_ACTIVE 3
1089 /* toolsettings->snap_mode */
1090 #define SCE_SNAP_MODE_INCREMENT 0
1091 #define SCE_SNAP_MODE_VERTEX 1
1092 #define SCE_SNAP_MODE_EDGE 2
1093 #define SCE_SNAP_MODE_FACE 3
1094 #define SCE_SNAP_MODE_VOLUME 4
1096 /* toolsettings->selectmode */
1097 #define SCE_SELECT_VERTEX 1 /* for mesh */
1098 #define SCE_SELECT_EDGE 2
1099 #define SCE_SELECT_FACE 4
1101 /* toolsettings->particle.selectmode for particles */
1102 #define SCE_SELECT_PATH 1
1103 #define SCE_SELECT_POINT 2
1104 #define SCE_SELECT_END 4
1106 /* sce->recalc (now in use by previewrender) */
1107 #define SCE_PRV_CHANGED 1
1109 /* toolsettings->prop_mode (proportional falloff) */
1110 #define PROP_SMOOTH 0
1111 #define PROP_SPHERE 1
1113 #define PROP_SHARP 3
1115 #define PROP_CONST 5
1116 #define PROP_RANDOM 6
1118 /* toolsettings->proportional */
1119 #define PROP_EDIT_OFF 0
1120 #define PROP_EDIT_ON 1
1121 #define PROP_EDIT_CONNECTED 2
1124 #define SCE_DS_SELECTED (1<<0)
1125 #define SCE_DS_COLLAPSED (1<<1)
1126 #define SCE_NLA_EDIT_ON (1<<2)
1127 #define SCE_FRAME_DROP (1<<3)
1130 /* return flag next_object function */
1137 #define AUDIO_MUTE 1
1138 #define AUDIO_SYNC 2
1139 #define AUDIO_SCRUB 4
1141 #define FFMPEG_MULTIPLEX_AUDIO 1 /* deprecated, you can choose none as audiocodec now */
1142 #define FFMPEG_AUTOSPLIT_OUTPUT 2
1146 PAINT_SHOW_BRUSH = (1<<0),
1147 PAINT_FAST_NAVIGATE = (1<<1),
1148 PAINT_SHOW_BRUSH_ON_SURFACE = (1<<2),
1152 /* These can eventually be moved to paint flags? */
1153 typedef enum SculptFlags {
1154 SCULPT_SYMM_X = (1<<0),
1155 SCULPT_SYMM_Y = (1<<1),
1156 SCULPT_SYMM_Z = (1<<2),
1157 SCULPT_LOCK_X = (1<<3),
1158 SCULPT_LOCK_Y = (1<<4),
1159 SCULPT_LOCK_Z = (1<<5),
1160 SCULPT_SYMMETRY_FEATHER = (1<<6),
1161 SCULPT_USE_OPENMP = (1<<7),
1164 /* sculpt_paint_settings */
1165 #define SCULPT_PAINT_USE_UNIFIED_SIZE (1<<0)
1166 #define SCULPT_PAINT_USE_UNIFIED_ALPHA (1<<1)
1167 #define SCULPT_PAINT_UNIFIED_LOCK_BRUSH_SIZE (1<<2)
1168 #define SCULPT_PAINT_UNIFIED_SIZE_PRESSURE (1<<3)
1169 #define SCULPT_PAINT_UNIFIED_ALPHA_PRESSURE (1<<4)
1171 /* ImagePaintSettings.flag */
1172 #define IMAGEPAINT_DRAWING 1
1173 // #define IMAGEPAINT_DRAW_TOOL 2 // deprecated
1174 // #define IMAGEPAINT_DRAW_TOOL_DRAWING 4 // deprecated
1176 /* projection painting only */
1177 #define IMAGEPAINT_PROJECT_DISABLE 8 /* Non projection 3D painting */
1178 #define IMAGEPAINT_PROJECT_XRAY 16
1179 #define IMAGEPAINT_PROJECT_BACKFACE 32
1180 #define IMAGEPAINT_PROJECT_FLAT 64
1181 #define IMAGEPAINT_PROJECT_LAYER_CLONE 128
1182 #define IMAGEPAINT_PROJECT_LAYER_STENCIL 256
1183 #define IMAGEPAINT_PROJECT_LAYER_STENCIL_INV 512
1185 /* toolsettings->uvcalc_flag */
1186 #define UVCALC_FILLHOLES 1
1187 #define UVCALC_NO_ASPECT_CORRECT 2 /* would call this UVCALC_ASPECT_CORRECT, except it should be default with old file */
1188 #define UVCALC_TRANSFORM_CORRECT 4 /* adjust UV's while transforming to avoid distortion */
1190 /* toolsettings->uv_flag */
1191 #define UV_SYNC_SELECTION 1
1192 #define UV_SHOW_SAME_IMAGE 2
1194 /* toolsettings->uv_selectmode */
1195 #define UV_SELECT_VERTEX 1
1196 #define UV_SELECT_EDGE 2
1197 #define UV_SELECT_FACE 4
1198 #define UV_SELECT_ISLAND 8
1200 /* toolsettings->edge_mode */
1201 #define EDGE_MODE_SELECT 0
1202 #define EDGE_MODE_TAG_SEAM 1
1203 #define EDGE_MODE_TAG_SHARP 2
1204 #define EDGE_MODE_TAG_CREASE 3
1205 #define EDGE_MODE_TAG_BEVEL 4
1207 /* toolsettings->gpencil_flags */
1208 #define GP_TOOL_FLAG_PAINTSESSIONS_ON (1<<0)
1210 /* toolsettings->particle flag */
1211 #define PE_KEEP_LENGTHS 1
1212 #define PE_LOCK_FIRST 2
1213 #define PE_DEFLECT_EMITTER 4
1214 #define PE_INTERPOLATE_ADDED 8
1215 #define PE_DRAW_PART 16
1216 /* #define PE_X_MIRROR 64 */ /* deprecated */
1217 #define PE_FADE_TIME 128
1218 #define PE_AUTO_VELOCITY 256
1220 /* toolsetting->particle brushtype */
1221 #define PE_BRUSH_NONE -1
1222 #define PE_BRUSH_COMB 0
1223 #define PE_BRUSH_CUT 1
1224 #define PE_BRUSH_LENGTH 2
1225 #define PE_BRUSH_PUFF 3
1226 #define PE_BRUSH_ADD 4
1227 #define PE_BRUSH_SMOOTH 5
1228 #define PE_BRUSH_WEIGHT 6
1230 /* this must equal ParticleEditSettings.brush array size */
1231 #define PE_TOT_BRUSH 6
1233 /* ParticleBrushData->flag */
1234 #define PE_BRUSH_DATA_PUFF_VOLUME 1
1236 /* tooksettings->particle edittype */
1237 #define PE_TYPE_PARTICLES 0
1238 #define PE_TYPE_SOFTBODY 1
1239 #define PE_TYPE_CLOTH 2
1241 /* toolsettings->retopo_mode */
1243 #define RETOPO_PAINT 2
1245 /* toolsettings->retopo_paint_tool */ /*UNUSED*/
1246 /* #define RETOPO_PEN 1 */
1247 /* #define RETOPO_LINE 2 */
1248 /* #define RETOPO_ELLIPSE 4 */
1250 /* toolsettings->skgen_options */
1251 #define SKGEN_FILTER_INTERNAL (1 << 0)
1252 #define SKGEN_FILTER_EXTERNAL (1 << 1)
1253 #define SKGEN_SYMMETRY (1 << 2)
1254 #define SKGEN_CUT_LENGTH (1 << 3)
1255 #define SKGEN_CUT_ANGLE (1 << 4)
1256 #define SKGEN_CUT_CORRELATION (1 << 5)
1257 #define SKGEN_HARMONIC (1 << 6)
1258 #define SKGEN_STICK_TO_EMBEDDING (1 << 7)
1259 #define SKGEN_ADAPTIVE_DISTANCE (1 << 8)
1260 #define SKGEN_FILTER_SMART (1 << 9)
1261 #define SKGEN_DISP_LENGTH (1 << 10)
1262 #define SKGEN_DISP_WEIGHT (1 << 11)
1263 #define SKGEN_DISP_ORIG (1 << 12)
1264 #define SKGEN_DISP_EMBED (1 << 13)
1265 #define SKGEN_DISP_INDEX (1 << 14)
1267 #define SKGEN_SUB_LENGTH 0
1268 #define SKGEN_SUB_ANGLE 1
1269 #define SKGEN_SUB_CORRELATION 2
1270 #define SKGEN_SUB_TOTAL 3
1272 /* toolsettings->skgen_postpro */
1273 #define SKGEN_SMOOTH 0
1274 #define SKGEN_AVERAGE 1
1275 #define SKGEN_SHARPEN 2
1277 /* toolsettings->bone_sketching */
1278 #define BONE_SKETCHING 1
1279 #define BONE_SKETCHING_QUICK 2
1280 #define BONE_SKETCHING_ADJUST 4
1282 /* toolsettings->bone_sketching_convert */
1283 #define SK_CONVERT_CUT_FIXED 0
1284 #define SK_CONVERT_CUT_LENGTH 1
1285 #define SK_CONVERT_CUT_ADAPTATIVE 2
1286 #define SK_CONVERT_RETARGET 3
1288 /* toolsettings->skgen_retarget_options */
1289 #define SK_RETARGET_AUTONAME 1
1291 /* toolsettings->skgen_retarget_roll */
1292 #define SK_RETARGET_ROLL_NONE 0
1293 #define SK_RETARGET_ROLL_VIEW 1
1294 #define SK_RETARGET_ROLL_JOINT 2
1296 /* physics_settings->flag */
1297 #define PHYS_GLOBAL_GRAVITY 1
1301 /* UnitSettings->system */
1302 #define USER_UNIT_NONE 0
1303 #define USER_UNIT_METRIC 1
1304 #define USER_UNIT_IMPERIAL 2
1305 /* UnitSettings->flag */
1306 #define USER_UNIT_OPT_SPLIT 1
1307 #define USER_UNIT_ROT_RADIANS 2