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
33 #define DURIAN_CAMERA_SWITCH
39 #include "DNA_brush_types.h"
40 #include "DNA_vec_types.h"
41 #include "DNA_listBase.h"
43 #include "DNA_freestyle_types.h"
58 struct Base *next, *prev;
59 unsigned int lay, selcol;
62 struct Object *object;
65 typedef struct AviCodecData {
66 void *lpFormat; /* save format */
67 void *lpParms; /* compressor options */
68 unsigned int cbFormat; /* size of lpFormat buffer */
69 unsigned int cbParms; /* size of lpParms buffer */
71 unsigned int fccType; /* stream type, for consistency */
72 unsigned int fccHandler; /* compressor */
73 unsigned int dwKeyFrameEvery; /* keyframe rate */
74 unsigned int dwQuality; /* compress quality 0-10,000 */
75 unsigned int dwBytesPerSecond; /* bytes per second */
76 unsigned int dwFlags; /* flags... see below */
77 unsigned int dwInterleaveEvery; /* for non-video streams only */
80 char avicodecname[128];
83 typedef struct QuicktimeCodecData {
84 /*Old quicktime implementation compatibility fields, read only in 2.5 - deprecated*/
85 void *cdParms; /* codec/compressor options */
86 void *pad; /* padding */
88 unsigned int cdSize; /* size of cdParms buffer */
89 unsigned int pad2; /* padding */
91 char qtcodecname[128];
94 typedef struct QuicktimeCodecSettings {
95 /* Codec settings detailed for 2.5 implementation*/
96 int codecType; /* Types defined in quicktime_export.h */
97 int codecSpatialQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
99 /* Settings not available in current QTKit API */
103 int codecTemporalQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
104 int minSpatialQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
105 int minTemporalQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
107 int bitRate; /* bitrate in bps */
108 } QuicktimeCodecSettings;
110 typedef struct FFMpegCodecData {
126 IDProperty *properties;
130 typedef struct AudioData {
131 int mixrate; // 2.5: now in FFMpegCodecData: audio_mixrate
132 float main; // 2.5: now in FFMpegCodecData: audio_volume
133 float speed_of_sound;
134 float doppler_factor;
140 typedef struct SceneRenderLayer {
141 struct SceneRenderLayer *next, *prev;
145 struct Material *mat_override;
146 struct Group *light_override;
148 unsigned int lay; /* scene->lay itself has priority over this */
149 unsigned int lay_zmask; /* has to be after lay, this is for Z-masking */
154 int passflag; /* pass_xor has to be after passflag */
157 struct FreestyleConfig freestyleConfig;
162 #define SCE_LAY_SOLID 1
163 #define SCE_LAY_ZTRA 2
164 #define SCE_LAY_HALO 4
165 #define SCE_LAY_EDGE 8
166 #define SCE_LAY_SKY 16
167 #define SCE_LAY_STRAND 32
168 #define SCE_LAY_FRS 64
169 /* flags between 32 and 0x8000 are set to 1 already, for future options */
171 #define SCE_LAY_ALL_Z 0x8000
172 #define SCE_LAY_XOR 0x10000
173 #define SCE_LAY_DISABLE 0x20000
174 #define SCE_LAY_ZMASK 0x40000
175 #define SCE_LAY_NEG_ZMASK 0x80000
178 #define SCE_PASS_COMBINED 1
180 #define SCE_PASS_RGBA 4
181 #define SCE_PASS_DIFFUSE 8
182 #define SCE_PASS_SPEC 16
183 #define SCE_PASS_SHADOW 32
184 #define SCE_PASS_AO 64
185 #define SCE_PASS_REFLECT 128
186 #define SCE_PASS_NORMAL 256
187 #define SCE_PASS_VECTOR 512
188 #define SCE_PASS_REFRACT 1024
189 #define SCE_PASS_INDEXOB 2048
190 #define SCE_PASS_UV 4096
191 #define SCE_PASS_RADIO 8192 /* Radio removed, can use for new GI? */
192 #define SCE_PASS_MIST 16384
193 #define SCE_PASS_RAYHITS 32768
194 #define SCE_PASS_EMIT 65536
195 #define SCE_PASS_ENVIRONMENT 131072
196 #define SCE_PASS_INDIRECT 262144
198 /* note, srl->passflag is treestore element 'nr' in outliner, short still... */
201 typedef struct RenderData {
203 struct AviCodecData *avicodecdata;
204 struct QuicktimeCodecData *qtcodecdata;
205 struct QuicktimeCodecSettings qtcodecsettings;
206 struct FFMpegCodecData ffcodecdata;
208 int cfra, sfra, efra; /* frames as in 'images' */
209 int psfra, pefra; /* start+end frames of preview range */
211 int images, framapto;
214 float ctime; /* use for calcutions */
215 float framelen, blurfac;
217 /** For UR edge rendering: give the edges this color */
218 float edgeR, edgeG, edgeB;
220 short fullscreen, xplay, yplay, freqplay; /* standalone player */ // XXX deprecated since 2.5
221 short depth, attrib, rt2; /* standalone player */ // XXX deprecated since 2.5
222 short frame_step; /* frames to jump during render/playback */
224 short stereomode; /* standalone player stereo settings */ // XXX deprecated since 2.5
226 short dimensionspreset; /* for the dimensions presets menu */
228 short filtertype; /* filter is box, tent, gauss, mitch, etc */
230 short size, maximsize; /* size in %, max in Kb */
233 * The desired number of pixels in the x direction
237 * The desired number of pixels in the y direction
241 * The number of part to use in the x direction
245 * The number of part to use in the y direction
249 short winpos, planes, imtype, subimtype;
252 /* 0: Enable backbuffering for images */
257 * Render to image editor, fullscreen or to new window.
264 * Flags for render settings. Use bit-masking to access the settings.
269 * Flags for render settings. Use bit-masking to access the settings.
274 * Flags for raytrace settings. Use bit-masking to access the settings.
276 int raytrace_options;
279 * Raytrace acceleration structure
281 short raytrace_structure;
283 /* renderer (deprecated) */
286 /* octree resolution */
291 * What to do with the sky/background. Picks sky/premul/key
292 * blending for the background
297 * The number of samples to use per pixel.
301 short frs_sec, edgeint;
304 /* safety, border and display rect */
308 /* information on different layers to be rendered */
312 /* number of mblur samples */
316 * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
320 * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
327 * Value used to define filter size for all filter options */
331 /* color management settings - color profiles, gamma correction, etc */
334 /** post-production settings. Depricated, but here for upwards compat (initialized to 1) */
335 float postgamma, posthue, postsat;
337 /* Dither noise intensity */
338 float dither_intensity;
340 /* Bake Render options */
341 short bake_osa, bake_filter, bake_mode, bake_flag;
342 short bake_normal_space, bake_quad_split;
343 float bake_maxdist, bake_biasdist, bake_pad;
345 /* yafray: global panel params. TODO: move elsewhere */
346 short GIquality, GIcache, GImethod, GIphotons, GIdirect;
347 short YF_AA, YFexportxml, YF_nobump, YF_clamprgb, yfpad1;
348 int GIdepth, GIcausdepth, GIpixelspersample;
349 int GIphotoncount, GImixphotons;
350 float GIphotonradius;
351 int YF_raydepth, YF_AApasses, YF_AAsamples, yfpad2;
352 float GIshadowquality, GIrefinement, GIpower, GIindirpower;
353 float YF_gamma, YF_exposure, YF_raybias, YF_AApixelsize, YF_AAthreshold;
355 /* paths to backbufffer, output, ftype */
356 char backbuf[160], pic[160];
360 short stamp_font_id, pad3; /* select one of blenders bitmap fonts */
362 /* stamp info user data. */
363 char stamp_udata[160];
365 /* foreground/background color. */
369 /* render simplify */
371 short simplify_subsurf;
372 short simplify_shadowsamples;
373 float simplify_particles;
374 float simplify_aosss;
377 short cineonwhite, cineonblack;
381 short jp2_preset, jp2_depth;
384 /* Dome variables */ // XXX deprecated since 2.5
385 short domeres, domemode; // XXX deprecated since 2.5
386 short domeangle, dometilt; // XXX deprecated since 2.5
387 float domeresbuf; // XXX deprecated since 2.5
388 float pad2; // XXX deprecated since 2.5
389 struct Text *dometext; // XXX deprecated since 2.5
395 /* control render convert and shading engine */
396 typedef struct RenderProfile {
397 struct RenderProfile *next, *prev;
402 short shadbufsample_max;
405 float ao_error, pad2;
409 typedef struct GameDome {
413 struct Text *warptext;
416 #define DOME_FISHEYE 1
417 #define DOME_TRUNCATED_FRONT 2
418 #define DOME_TRUNCATED_REAR 3
419 #define DOME_ENVMAP 4
420 #define DOME_PANORAM_SPH 5
421 #define DOME_NUM_MODES 6
423 typedef struct GameFraming {
425 char type, pad1, pad2, pad3;
428 #define SCE_GAMEFRAMING_BARS 0
429 #define SCE_GAMEFRAMING_EXTEND 1
430 #define SCE_GAMEFRAMING_SCALE 2
432 typedef struct GameData {
434 /* physics (it was in world)*/
435 float gravity; /*Gravitation constant for the game world*/
438 * Radius of the activity bubble, in Manhattan length. Objects
439 * outside the box are activity-culled. */
440 float activityBoxRadius; //it's not being used ANYWHERE !!!!!!!!!!!!!!
442 * bit 3: (gameengine): Activity culling is enabled.
443 * bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum culling
445 short mode, flag, matmode, pad[3];
446 short occlusionRes; /* resolution of occlusion Z buffer in pixel */
448 short ticrate, maxlogicstep, physubstep, maxphystep;
450 /* standalone player */
451 struct GameFraming framing;
452 short fullscreen, xplay, yplay, freqplay;
453 short depth, attrib, rt1, rt2;
455 /* stereo/dome mode */
456 struct GameDome dome;
457 short stereoflag, stereomode, xsch, ysch; //xsch and ysch can be deleted !!!
458 float eyeseparation, pad1;
461 #define STEREO_NOSTEREO 1
462 #define STEREO_ENABLED 2
463 #define STEREO_DOME 3
465 //#define STEREO_NOSTEREO 1
466 #define STEREO_QUADBUFFERED 2
467 #define STEREO_ABOVEBELOW 3
468 #define STEREO_INTERLACED 4
469 #define STEREO_ANAGLYPH 5
470 #define STEREO_SIDEBYSIDE 6
471 #define STEREO_VINTERLACE 7
472 //#define STEREO_DOME 8
478 #define WOPHY_DYNAMO 3
480 #define WOPHY_BULLET 5
483 #define GAME_ENABLE_ALL_FRAMES (1 << 1)
484 #define GAME_SHOW_DEBUG_PROPS (1 << 2)
485 #define GAME_SHOW_FRAMERATE (1 << 3)
486 #define GAME_SHOW_PHYSICS (1 << 4)
487 #define GAME_DISPLAY_LISTS (1 << 5)
488 #define GAME_GLSL_NO_LIGHTS (1 << 6)
489 #define GAME_GLSL_NO_SHADERS (1 << 7)
490 #define GAME_GLSL_NO_SHADOWS (1 << 8)
491 #define GAME_GLSL_NO_RAMPS (1 << 9)
492 #define GAME_GLSL_NO_NODES (1 << 10)
493 #define GAME_GLSL_NO_EXTRA_TEX (1 << 11)
494 #define GAME_IGNORE_DEPRECATION_WARNINGS (1 << 12)
495 #define GAME_ENABLE_ANIMATION_RECORD (1 << 13)
497 /* GameData.matmode */
498 #define GAME_MAT_TEXFACE 0
499 #define GAME_MAT_MULTITEX 1
500 #define GAME_MAT_GLSL 2
502 typedef struct TimeMarker {
503 struct TimeMarker *next, *prev;
507 struct Object *camera;
510 typedef struct Paint {
511 /* Array of brushes selected for use in this paint mode */
513 int active_brush_index, brush_count;
515 /* WM Paint cursor */
517 unsigned char paint_cursor_col[4];
522 typedef struct ImagePaintSettings {
527 /* for projection painting only */
528 short seam_bleed, normal_angle;
529 short screen_grab_size[2]; /* capture size for re-projection */
533 void *paintcursor; /* wm handle */
534 } ImagePaintSettings;
536 typedef struct ParticleBrushData {
537 short size, strength; /* common settings */
538 short step, invert; /* for specific brushes only */
542 typedef struct ParticleEditSettings {
548 ParticleBrushData brush[7]; /* 7 = PE_TOT_BRUSH */
549 void *paintcursor; /* runtime */
551 float emitterdist, rt;
556 int draw_step, fade_frames;
559 struct Object *object;
560 } ParticleEditSettings;
562 typedef struct TransformOrientation {
563 struct TransformOrientation *next, *prev;
566 } TransformOrientation;
568 typedef struct Sculpt {
571 /* For rotating around a pivot point */
575 /* Control tablet input */
576 char tablet_size, tablet_strength;
580 typedef struct VPaint {
584 int tot; /* allocation size of prev buffers */
585 unsigned int *vpaint_prev; /* previous mesh colors */
586 struct MDeformVert *wpaint_prev; /* previous vertex weights */
588 void *paintcursor; /* wm handle */
592 #define VP_COLINDEX 1
597 // #define VP_MIRROR_X 32 // depricated in 2.5x use (me->editflag & ME_EDIT_MIRROR_X)
598 #define VP_ONLYVGROUP 128
601 typedef struct ToolSettings {
602 VPaint *vpaint; /* vertex paint */
603 VPaint *wpaint; /* weight paint */
609 /* Subdivide Settings */
612 /*Triangle to Quad conversion threshold*/
619 float extr_offs; /* extrude offset */
620 float doublimit; /* remove doubles limit */
621 float normalsize; /* size of normals */
624 /* Selection Mode for Mesh */
627 /* Primitive Settings */
632 /* Cylinder - Tube - Circle */
638 float uvcalc_cubesize;
641 short uvcalc_mapalign;
643 short uv_flag, uv_selectmode;
647 short autoik_chainlen;
649 /* Image Paint (8 byttse aligned please!) */
650 struct ImagePaintSettings imapaint;
652 /* Particle Editing */
653 struct ParticleEditSettings particle;
655 /* Transform Proportional Area of Effect */
656 float proportional_size;
658 /* Select Group Threshold */
664 /* Auto-Keying Mode */
665 short autokey_mode, autokey_flag; /* defines in DNA_userdef_types.h */
669 char retopo_paint_tool;
670 char line_div, ellipse_div, retopo_hotspot;
673 char multires_subdiv_type;
675 /* Skeleton generation */
676 short skgen_resolution;
677 float skgen_threshold_internal;
678 float skgen_threshold_external;
679 float skgen_length_ratio;
680 float skgen_length_limit;
681 float skgen_angle_limit;
682 float skgen_correlation_limit;
683 float skgen_symmetry_limit;
684 float skgen_retarget_angle_weight;
685 float skgen_retarget_length_weight;
686 float skgen_retarget_distance_weight;
689 char skgen_postpro_passes;
690 char skgen_subdivisions[3];
691 char skgen_multi_level;
693 /* Skeleton Sketching */
694 struct Object *skgen_template;
696 char bone_sketching_convert;
697 char skgen_subdivision_number;
698 char skgen_retarget_options;
699 char skgen_retarget_roll;
700 char skgen_side_string[8];
701 char skgen_num_string[8];
707 short snap_mode, snap_flag, snap_target;
708 short proportional, prop_mode;
710 int auto_normalize, intpad; /*auto normalizing mode in wpaint*/
713 typedef struct bStats {
714 /* scene totals for visible layers */
715 int totobj, totlamp, totobjsel, totcurve, totmesh, totarmature;
716 int totvert, totface;
719 typedef struct UnitSettings {
720 /* Display/Editing unit options for each scene */
721 float scale_length; /* maybe have other unit conversions? */
723 short flag; /* imperial, metric etc */
726 typedef struct PhysicsSettings {
731 typedef struct Scene {
733 struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
735 struct Object *camera;
742 struct Base *basact; /* active base */
743 struct Object *obedit; /* name replaces old G.obedit */
745 float cursor[3]; /* 3d cursor location */
746 float twcent[3]; /* center for transform widget */
747 float twmin[3], twmax[3]; /* boundbox of selection for transform widget */
751 short flag; /* various settings */
755 struct bNodeTree *nodetree;
757 struct Editing *ed; /* sequence editor data is allocated here */
759 struct ToolSettings *toolsettings; /* default allocated now */
760 struct SceneStats *stats; /* default allocated now */
762 /* migrate or replace? depends on some internal things... */
763 /* no, is on the right place (ton) */
765 struct AudioData audio;
768 ListBase transform_spaces;
771 void *sound_scene_handle;
773 void *fps_info; /* (runtime) info/cache used for presenting playback framerate info to the user */
775 /* none of the dependancy graph vars is mean to be saved */
776 struct DagForest *theDag;
777 short dagisvalid, dagflags;
778 short recalc; /* recalc = counterpart of ob->recalc */
783 /* User-Defined KeyingSets */
784 int active_keyingset; /* index of the active KeyingSet. first KeyingSet has index 1, 'none' active is 0, 'add new' is -1 */
785 ListBase keyingsets; /* KeyingSets for the given frame */
788 struct GameFraming framing; // XXX deprecated since 2.5
792 struct UnitSettings unit;
797 /* Physics simulation settings */
798 struct PhysicsSettings physics_settings;
802 /* **************** RENDERDATA ********************* */
806 #define R_BACKBUFANIM 2
808 #define R_FRONTBUFANIM 8
811 /* use preview range */
812 #define SCER_PRV_RANGE (1<<0)
816 #define R_SHADOW 0x0002
817 #define R_GAMMA 0x0004
818 #define R_ORTHO 0x0008
819 #define R_ENVMAP 0x0010
820 #define R_EDGE 0x0020
821 #define R_FIELDS 0x0040
822 #define R_FIELDSTILL 0x0080
823 #define R_RADIO 0x0100
824 #define R_BORDER 0x0200
825 #define R_PANORAMA 0x0400 /* deprecated as scene option, still used in renderer */
826 #define R_CROP 0x0800
827 #define R_COSMO 0x1000
828 #define R_ODDFIELD 0x2000
829 #define R_MBLUR 0x4000
830 /* unified was here */
831 #define R_RAYTRACE 0x10000
832 /* R_GAUSS is obsolete, but used to retrieve setting from old files */
833 #define R_GAUSS 0x20000
834 /* fbuf obsolete... */
835 #define R_FBUF 0x40000
836 /* threads obsolete... is there for old files, now use for autodetect threads */
837 #define R_THREADS 0x80000
838 /* Use the same flag for autothreads */
839 #define R_FIXED_THREADS 0x80000
841 #define R_SPEED 0x100000
842 #define R_SSS 0x200000
843 #define R_NO_OVERWRITE 0x400000 /* skip existing files */
844 #define R_TOUCH 0x800000 /* touch files before rendering */
845 #define R_SIMPLIFY 0x1000000
846 #define R_EDGE_FRS 0x2000000 /* R_EDGE for Freestyle */
850 #define R_OUTPUT_SCREEN 0
851 #define R_OUTPUT_AREA 1
852 #define R_OUTPUT_WINDOW 2
853 #define R_OUTPUT_FORKED 3
856 #define R_FILTER_BOX 0
857 #define R_FILTER_TENT 1
858 #define R_FILTER_QUAD 2
859 #define R_FILTER_CUBIC 3
860 #define R_FILTER_CATROM 4
861 #define R_FILTER_GAUSS 5
862 #define R_FILTER_MITCH 6
863 #define R_FILTER_FAST_GAUSS 7 /* note, this is only used for nodes at the moment */
865 /* yafray: renderer flag (not only exclusive to yafray) */
869 /* raytrace structure */
870 #define R_RAYSTRUCTURE_AUTO 0
871 #define R_RAYSTRUCTURE_OCTREE 1
872 #define R_RAYSTRUCTURE_BLIBVH 2
873 #define R_RAYSTRUCTURE_VBVH 3
874 #define R_RAYSTRUCTURE_SIMD_SVBVH 4 /* needs SIMD */
875 #define R_RAYSTRUCTURE_SIMD_QBVH 5 /* needs SIMD */
877 /* raytrace_options */
878 #define R_RAYTRACE_USE_LOCAL_COORDS 0x0001
879 #define R_RAYTRACE_USE_INSTANCES 0x0002
881 /* scemode (int now) */
882 #define R_DOSEQ 0x0001
883 #define R_BG_RENDER 0x0002
884 /* passepartout is camera option now, keep this for backward compatibility */
885 #define R_PASSEPARTOUT 0x0004
886 #define R_PREVIEWBUTS 0x0008
887 #define R_EXTENSION 0x0010
888 #define R_MATNODE_PREVIEW 0x0020
889 #define R_DOCOMP 0x0040
890 #define R_COMP_CROP 0x0080
891 #define R_FREE_IMAGE 0x0100
892 #define R_SINGLE_LAYER 0x0200
893 #define R_EXR_TILE_FILE 0x0400
894 #define R_COMP_FREE 0x0800
895 #define R_NO_IMAGE_LOAD 0x1000
896 #define R_NO_TEX 0x2000
897 #define R_STAMP_INFO 0x4000 /* deprecated */
898 #define R_FULL_SAMPLE 0x8000
899 #define R_COMP_RERENDER 0x10000
900 #define R_RECURS_PROTECTION 0x20000
901 #define R_TEXNODE_PREVIEW 0x40000
904 #define R_STAMP_TIME 0x0001
905 #define R_STAMP_FRAME 0x0002
906 #define R_STAMP_DATE 0x0004
907 #define R_STAMP_CAMERA 0x0008
908 #define R_STAMP_SCENE 0x0010
909 #define R_STAMP_NOTE 0x0020
910 #define R_STAMP_DRAW 0x0040 /* draw in the image */
911 #define R_STAMP_MARKER 0x0080
912 #define R_STAMP_FILENAME 0x0100
913 #define R_STAMP_SEQSTRIP 0x0200
914 #define R_STAMP_RENDERTIME 0x0400
915 #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)
919 #define R_ALPHAPREMUL 1
923 #define R_PLANES24 24
924 #define R_PLANES32 32
928 #define R_COLOR_MANAGEMENT 1
934 #define R_FTYPE 3 /* ftype is nomore */
942 #define R_AVICODEC 18
943 #define R_QUICKTIME 19
949 #define R_FRAMESERVER 25
952 #define R_MULTILAYER 28
959 /* subimtype, flag options for imtype */
960 #define R_OPENEXR_HALF 1
961 #define R_OPENEXR_ZBUF 2
962 #define R_PREVIEW_JPG 4
963 #define R_CINEON_LOG 8
964 #define R_TIFF_16BIT 16
966 #define R_JPEG2K_12BIT 32 /* Jpeg2000 */
967 #define R_JPEG2K_16BIT 64
968 #define R_JPEG2K_YCC 128 /* when disabled use RGB */
969 #define R_JPEG2K_CINE_PRESET 256
970 #define R_JPEG2K_CINE_48FPS 512
973 /* bake_mode: same as RE_BAKE_xxx defines */
975 #define R_BAKE_CLEAR 1
977 #define R_BAKE_TO_ACTIVE 4
978 #define R_BAKE_NORMALIZE 8
980 /* bake_normal_space */
981 #define R_BAKE_SPACE_CAMERA 0
982 #define R_BAKE_SPACE_WORLD 1
983 #define R_BAKE_SPACE_OBJECT 2
984 #define R_BAKE_SPACE_TANGENT 3
987 #define R_SIMPLE_NO_TRIANGULATE 1
989 /* **************** SCENE ********************* */
991 /* for general use */
992 #define MAXFRAME 300000
993 #define MAXFRAMEF 300000.0f
996 #define MINFRAMEF 0.0f
998 /* (minimum frame number for current-frame) */
999 #define MINAFRAME -300000
1000 #define MINAFRAMEF -300000.0f
1002 /* depricate this! */
1003 #define TESTBASE(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
1004 #define TESTBASELIB(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
1005 #define TESTBASELIB_BGMODE(v3d, scene, base) ( ((base)->flag & SELECT) && ((base)->lay & (v3d ? v3d->lay : scene->lay)) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
1006 #define BASE_EDITABLE_BGMODE(v3d, scene, base) (((base)->lay & (v3d ? v3d->lay : scene->lay)) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
1007 #define BASE_SELECTABLE(v3d, base) ((base->lay & v3d->lay) && (base->object->restrictflag & (OB_RESTRICT_SELECT|OB_RESTRICT_VIEW))==0)
1008 #define FIRSTBASE scene->base.first
1009 #define LASTBASE scene->base.last
1010 #define BASACT (scene->basact)
1011 #define OBACT (BASACT? BASACT->object: 0)
1013 #define ID_NEW(a) if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid
1014 #define ID_NEW_US(a) if( (a)->id.newid) {(a)= (void *)(a)->id.newid; (a)->id.us++;}
1015 #define ID_NEW_US2(a) if( ((ID *)a)->newid) {(a)= ((ID *)a)->newid; ((ID *)a)->us++;}
1016 #define CFRA (scene->r.cfra)
1017 #define F_CFRA ((float)(scene->r.cfra))
1018 #define SFRA (scene->r.sfra)
1019 #define EFRA (scene->r.efra)
1020 #define PRVRANGEON (scene->r.flag & SCER_PRV_RANGE)
1021 #define PSFRA ((PRVRANGEON)? (scene->r.psfra): (scene->r.sfra))
1022 #define PEFRA ((PRVRANGEON)? (scene->r.pefra): (scene->r.efra))
1023 #define FRA2TIME(a) ((((double) scene->r.frs_sec_base) * (a)) / scene->r.frs_sec)
1024 #define TIME2FRA(a) ((((double) scene->r.frs_sec) * (a)) / scene->r.frs_sec_base)
1025 #define FPS (((double) scene->r.frs_sec) / scene->r.frs_sec_base)
1027 #define RAD_PHASE_PATCHES 1
1028 #define RAD_PHASE_FACES 2
1030 /* base->flag is in DNA_object_types.h */
1032 /* toolsettings->snap_flag */
1034 #define SCE_SNAP_ROTATE 2
1035 #define SCE_SNAP_PEEL_OBJECT 4
1036 #define SCE_SNAP_PROJECT 8
1037 /* toolsettings->snap_target */
1038 #define SCE_SNAP_TARGET_CLOSEST 0
1039 #define SCE_SNAP_TARGET_CENTER 1
1040 #define SCE_SNAP_TARGET_MEDIAN 2
1041 #define SCE_SNAP_TARGET_ACTIVE 3
1042 /* toolsettings->snap_mode */
1043 #define SCE_SNAP_MODE_INCREMENT 0
1044 #define SCE_SNAP_MODE_VERTEX 1
1045 #define SCE_SNAP_MODE_EDGE 2
1046 #define SCE_SNAP_MODE_FACE 3
1047 #define SCE_SNAP_MODE_VOLUME 4
1049 /* toolsettings->selectmode */
1050 #define SCE_SELECT_VERTEX 1 /* for mesh */
1051 #define SCE_SELECT_EDGE 2
1052 #define SCE_SELECT_FACE 4
1054 /* toolsettings->particle.selectmode for particles */
1055 #define SCE_SELECT_PATH 1
1056 #define SCE_SELECT_POINT 2
1057 #define SCE_SELECT_END 4
1059 /* sce->recalc (now in use by previewrender) */
1060 #define SCE_PRV_CHANGED 1
1062 /* toolsettings->prop_mode (proportional falloff) */
1063 #define PROP_SMOOTH 0
1064 #define PROP_SPHERE 1
1066 #define PROP_SHARP 3
1068 #define PROP_CONST 5
1069 #define PROP_RANDOM 6
1071 /* toolsettings->proportional */
1072 #define PROP_EDIT_OFF 0
1073 #define PROP_EDIT_ON 1
1074 #define PROP_EDIT_CONNECTED 2
1077 #define SCE_DS_SELECTED (1<<0)
1078 #define SCE_DS_COLLAPSED (1<<1)
1079 #define SCE_NLA_EDIT_ON (1<<2)
1080 #define SCE_FRAME_DROP (1<<3)
1083 /* return flag next_object function */
1091 #define AUDIO_MUTE 1
1092 #define AUDIO_SYNC 2
1093 #define AUDIO_SCRUB 4
1095 #define FFMPEG_MULTIPLEX_AUDIO 1 /* deprecated, you can choose none as audiocodec now */
1096 #define FFMPEG_AUTOSPLIT_OUTPUT 2
1100 PAINT_SHOW_BRUSH = 1,
1101 PAINT_FAST_NAVIGATE = 2
1105 /* These can eventually be moved to paint flags? */
1106 typedef enum SculptFlags {
1111 SCULPT_LOCK_Y = 128,
1115 /* ImagePaintSettings.flag */
1116 #define IMAGEPAINT_DRAWING 1
1117 #define IMAGEPAINT_DRAW_TOOL 2
1118 #define IMAGEPAINT_DRAW_TOOL_DRAWING 4
1119 /* projection painting only */
1120 #define IMAGEPAINT_PROJECT_DISABLE 8 /* Non projection 3D painting */
1121 #define IMAGEPAINT_PROJECT_XRAY 16
1122 #define IMAGEPAINT_PROJECT_BACKFACE 32
1123 #define IMAGEPAINT_PROJECT_FLAT 64
1124 #define IMAGEPAINT_PROJECT_LAYER_CLONE 128
1125 #define IMAGEPAINT_PROJECT_LAYER_STENCIL 256
1126 #define IMAGEPAINT_PROJECT_LAYER_STENCIL_INV 512
1128 /* toolsettings->uvcalc_flag */
1129 #define UVCALC_FILLHOLES 1
1130 #define UVCALC_NO_ASPECT_CORRECT 2 /* would call this UVCALC_ASPECT_CORRECT, except it should be default with old file */
1131 #define UVCALC_TRANSFORM_CORRECT 4 /* adjust UV's while transforming to avoid distortion */
1133 /* toolsettings->uv_flag */
1134 #define UV_SYNC_SELECTION 1
1135 #define UV_SHOW_SAME_IMAGE 2
1137 /* toolsettings->uv_selectmode */
1138 #define UV_SELECT_VERTEX 1
1139 #define UV_SELECT_EDGE 2
1140 #define UV_SELECT_FACE 4
1141 #define UV_SELECT_ISLAND 8
1143 /* toolsettings->edge_mode */
1144 #define EDGE_MODE_SELECT 0
1145 #define EDGE_MODE_TAG_SEAM 1
1146 #define EDGE_MODE_TAG_SHARP 2
1147 #define EDGE_MODE_TAG_CREASE 3
1148 #define EDGE_MODE_TAG_BEVEL 4
1150 /* toolsettings->particle flag */
1151 #define PE_KEEP_LENGTHS 1
1152 #define PE_LOCK_FIRST 2
1153 #define PE_DEFLECT_EMITTER 4
1154 #define PE_INTERPOLATE_ADDED 8
1155 #define PE_DRAW_PART 16
1156 #define PE_X_MIRROR 64 /* deprecated */
1157 #define PE_FADE_TIME 128
1158 #define PE_AUTO_VELOCITY 256
1160 /* toolsetting->particle brushtype */
1161 #define PE_BRUSH_NONE -1
1162 #define PE_BRUSH_COMB 0
1163 #define PE_BRUSH_CUT 1
1164 #define PE_BRUSH_LENGTH 2
1165 #define PE_BRUSH_PUFF 3
1166 #define PE_BRUSH_ADD 4
1167 #define PE_BRUSH_SMOOTH 5
1168 #define PE_BRUSH_WEIGHT 6
1170 /* this must equal ParticleEditSettings.brush array size */
1171 #define PE_TOT_BRUSH 6
1173 /* ParticleBrushData->flag */
1174 #define PE_BRUSH_DATA_PUFF_VOLUME 1
1176 /* tooksettings->particle edittype */
1177 #define PE_TYPE_PARTICLES 0
1178 #define PE_TYPE_SOFTBODY 1
1179 #define PE_TYPE_CLOTH 2
1181 /* toolsettings->retopo_mode */
1183 #define RETOPO_PAINT 2
1185 /* toolsettings->retopo_paint_tool */
1186 #define RETOPO_PEN 1
1187 #define RETOPO_LINE 2
1188 #define RETOPO_ELLIPSE 4
1190 /* toolsettings->skgen_options */
1191 #define SKGEN_FILTER_INTERNAL (1 << 0)
1192 #define SKGEN_FILTER_EXTERNAL (1 << 1)
1193 #define SKGEN_SYMMETRY (1 << 2)
1194 #define SKGEN_CUT_LENGTH (1 << 3)
1195 #define SKGEN_CUT_ANGLE (1 << 4)
1196 #define SKGEN_CUT_CORRELATION (1 << 5)
1197 #define SKGEN_HARMONIC (1 << 6)
1198 #define SKGEN_STICK_TO_EMBEDDING (1 << 7)
1199 #define SKGEN_ADAPTIVE_DISTANCE (1 << 8)
1200 #define SKGEN_FILTER_SMART (1 << 9)
1201 #define SKGEN_DISP_LENGTH (1 << 10)
1202 #define SKGEN_DISP_WEIGHT (1 << 11)
1203 #define SKGEN_DISP_ORIG (1 << 12)
1204 #define SKGEN_DISP_EMBED (1 << 13)
1205 #define SKGEN_DISP_INDEX (1 << 14)
1207 #define SKGEN_SUB_LENGTH 0
1208 #define SKGEN_SUB_ANGLE 1
1209 #define SKGEN_SUB_CORRELATION 2
1210 #define SKGEN_SUB_TOTAL 3
1212 /* toolsettings->skgen_postpro */
1213 #define SKGEN_SMOOTH 0
1214 #define SKGEN_AVERAGE 1
1215 #define SKGEN_SHARPEN 2
1217 /* toolsettings->bone_sketching */
1218 #define BONE_SKETCHING 1
1219 #define BONE_SKETCHING_QUICK 2
1220 #define BONE_SKETCHING_ADJUST 4
1222 /* toolsettings->bone_sketching_convert */
1223 #define SK_CONVERT_CUT_FIXED 0
1224 #define SK_CONVERT_CUT_LENGTH 1
1225 #define SK_CONVERT_CUT_ADAPTATIVE 2
1226 #define SK_CONVERT_RETARGET 3
1228 /* toolsettings->skgen_retarget_options */
1229 #define SK_RETARGET_AUTONAME 1
1231 /* toolsettings->skgen_retarget_roll */
1232 #define SK_RETARGET_ROLL_NONE 0
1233 #define SK_RETARGET_ROLL_VIEW 1
1234 #define SK_RETARGET_ROLL_JOINT 2
1236 /* physics_settings->flag */
1237 #define PHYS_GLOBAL_GRAVITY 1
1241 /* UnitSettings->system */
1242 #define USER_UNIT_NONE 0
1243 #define USER_UNIT_METRIC 1
1244 #define USER_UNIT_IMPERIAL 2
1245 /* UnitSettings->flag */
1246 #define USER_UNIT_OPT_SPLIT 1
1247 #define USER_UNIT_ROT_RADIANS 2