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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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
36 #include "DNA_brush_types.h"
37 #include "DNA_vec_types.h"
38 #include "DNA_listBase.h"
53 struct Base *next, *prev;
54 unsigned int lay, selcol;
57 struct Object *object;
60 typedef struct AviCodecData {
61 void *lpFormat; /* save format */
62 void *lpParms; /* compressor options */
63 unsigned int cbFormat; /* size of lpFormat buffer */
64 unsigned int cbParms; /* size of lpParms buffer */
66 unsigned int fccType; /* stream type, for consistency */
67 unsigned int fccHandler; /* compressor */
68 unsigned int dwKeyFrameEvery; /* keyframe rate */
69 unsigned int dwQuality; /* compress quality 0-10,000 */
70 unsigned int dwBytesPerSecond; /* bytes per second */
71 unsigned int dwFlags; /* flags... see below */
72 unsigned int dwInterleaveEvery; /* for non-video streams only */
75 char avicodecname[128];
78 typedef struct QuicktimeCodecData {
80 void *cdParms; /* codec/compressor options */
81 void *pad; /* padding */
83 unsigned int cdSize; /* size of cdParms buffer */
84 unsigned int pad2; /* padding */
86 char qtcodecname[128];
89 typedef struct FFMpegCodecData {
103 IDProperty *properties;
107 typedef struct AudioData {
109 float main; /* Main mix in dB */
114 typedef struct SceneRenderLayer {
115 struct SceneRenderLayer *next, *prev;
119 struct Material *mat_override;
120 struct Group *light_override;
122 unsigned int lay; /* scene->lay itself has priority over this */
123 unsigned int lay_zmask; /* has to be after lay, this is for Z-masking */
128 int passflag; /* pass_xor has to be after passflag */
133 #define SCE_LAY_SOLID 1
134 #define SCE_LAY_ZTRA 2
135 #define SCE_LAY_HALO 4
136 #define SCE_LAY_EDGE 8
137 #define SCE_LAY_SKY 16
138 #define SCE_LAY_STRAND 32
139 /* flags between 32 and 0x8000 are set to 1 already, for future options */
141 #define SCE_LAY_ALL_Z 0x8000
142 #define SCE_LAY_XOR 0x10000
143 #define SCE_LAY_DISABLE 0x20000
144 #define SCE_LAY_ZMASK 0x40000
145 #define SCE_LAY_NEG_ZMASK 0x80000
148 #define SCE_PASS_COMBINED 1
150 #define SCE_PASS_RGBA 4
151 #define SCE_PASS_DIFFUSE 8
152 #define SCE_PASS_SPEC 16
153 #define SCE_PASS_SHADOW 32
154 #define SCE_PASS_AO 64
155 #define SCE_PASS_REFLECT 128
156 #define SCE_PASS_NORMAL 256
157 #define SCE_PASS_VECTOR 512
158 #define SCE_PASS_REFRACT 1024
159 #define SCE_PASS_INDEXOB 2048
160 #define SCE_PASS_UV 4096
161 #define SCE_PASS_RADIO 8192 /* Radio removed, can use for new GI? */
162 #define SCE_PASS_MIST 16384
164 /* note, srl->passflag is treestore element 'nr' in outliner, short still... */
167 typedef struct RenderData {
169 struct AviCodecData *avicodecdata;
170 struct QuicktimeCodecData *qtcodecdata;
171 struct FFMpegCodecData ffcodecdata;
172 struct AudioData audio; /* new in 2.5 */
174 int cfra, sfra, efra; /* frames as in 'images' */
175 int psfra, pefra; /* start+end frames of preview range */
177 int images, framapto;
180 float ctime; /* use for calcutions */
181 float framelen, blurfac;
183 /** For UR edge rendering: give the edges this color */
184 float edgeR, edgeG, edgeB;
186 short fullscreen, xplay, yplay, freqplay; /* standalone player */ // XXX deprecated since 2.5
187 short depth, attrib, rt1, rt2; /* standalone player */ // XXX deprecated since 2.5
189 short stereomode; /* standalone player stereo settings */ // XXX deprecated since 2.5
191 short dimensionspreset; /* for the dimensions presets menu */
193 short filtertype; /* filter is box, tent, gauss, mitch, etc */
195 short size, maximsize; /* size in %, max in Kb */
198 * The desired number of pixels in the x direction
202 * The desired number of pixels in the y direction
206 * The number of part to use in the x direction
210 * The number of part to use in the y direction
214 short winpos, planes, imtype, subimtype;
217 /* 0: Enable backbuffering for images */
222 * Render to image editor, fullscreen or to new window.
229 * Flags for render settings. Use bit-masking to access the settings.
234 * Flags for render settings. Use bit-masking to access the settings.
238 /* render engine (deprecated), octree resolution */
239 short renderer, ocres;
242 * What to do with the sky/background. Picks sky/premul/key
243 * blending for the background
248 * The number of samples to use per pixel.
252 short frs_sec, edgeint;
254 /* safety, border and display rect */
258 /* information on different layers to be rendered */
263 * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
267 * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
274 * Value used to define filter size for all filter options */
278 /* color management settings - color profiles, gamma correction, etc */
281 /** post-production settings. Depricated, but here for upwards compat (initialized to 1) */
282 float postgamma, posthue, postsat;
284 /* Dither noise intensity */
285 float dither_intensity;
287 /* Bake Render options */
288 short bake_osa, bake_filter, bake_mode, bake_flag;
289 short bake_normal_space, bake_quad_split;
290 float bake_maxdist, bake_biasdist, bake_pad;
292 /* yafray: global panel params. TODO: move elsewhere */
293 short GIquality, GIcache, GImethod, GIphotons, GIdirect;
294 short YF_AA, YFexportxml, YF_nobump, YF_clamprgb, yfpad1;
295 int GIdepth, GIcausdepth, GIpixelspersample;
296 int GIphotoncount, GImixphotons;
297 float GIphotonradius;
298 int YF_raydepth, YF_AApasses, YF_AAsamples, yfpad2;
299 float GIshadowquality, GIrefinement, GIpower, GIindirpower;
300 float YF_gamma, YF_exposure, YF_raybias, YF_AApixelsize, YF_AAthreshold;
302 /* paths to backbufffer, output, ftype */
303 char backbuf[160], pic[160];
307 short stamp_font_id, pad3; /* select one of blenders bitmap fonts */
309 /* stamp info user data. */
310 char stamp_udata[160];
312 /* foreground/background color. */
316 /* render simplify */
317 int simplify_subsurf;
318 int simplify_shadowsamples;
319 float simplify_particles;
320 float simplify_aosss;
323 short cineonwhite, cineonblack;
327 short jp2_preset, jp2_depth;
330 /* Dome variables */ // XXX deprecated since 2.5
331 short domeres, domemode; // XXX deprecated since 2.5
332 short domeangle, dometilt; // XXX deprecated since 2.5
333 float domeresbuf; // XXX deprecated since 2.5
334 float pad2; // XXX deprecated since 2.5
335 struct Text *dometext; // XXX deprecated since 2.5
341 /* control render convert and shading engine */
342 typedef struct RenderProfile {
343 struct RenderProfile *next, *prev;
348 short shadbufsample_max;
351 float ao_error, pad2;
355 typedef struct GameDome {
359 struct Text *warptext;
362 #define DOME_FISHEYE 1
363 #define DOME_TRUNCATED_FRONT 2
364 #define DOME_TRUNCATED_REAR 3
365 #define DOME_ENVMAP 4
366 #define DOME_PANORAM_SPH 5
367 #define DOME_NUM_MODES 6
369 typedef struct GameFraming {
371 char type, pad1, pad2, pad3;
374 #define SCE_GAMEFRAMING_BARS 0
375 #define SCE_GAMEFRAMING_EXTEND 1
376 #define SCE_GAMEFRAMING_SCALE 2
378 typedef struct GameData {
380 /* physics (it was in world)*/
381 float gravity; /*Gravitation constant for the game world*/
384 * Radius of the activity bubble, in Manhattan length. Objects
385 * outside the box are activity-culled. */
386 float activityBoxRadius; //it's not being used ANYWHERE !!!!!!!!!!!!!!
388 * bit 3: (gameengine): Activity culling is enabled.
389 * bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum culling
391 short mode, flag, matmode, pad[3];
392 short occlusionRes; /* resolution of occlusion Z buffer in pixel */
394 short ticrate, maxlogicstep, physubstep, maxphystep;
396 /* standalone player */
397 struct GameFraming framing;
398 short fullscreen, xplay, yplay, freqplay;
399 short depth, attrib, rt1, rt2;
401 /* stereo/dome mode */
402 struct GameDome dome;
403 short stereoflag, stereomode, xsch, ysch; //xsch and ysch can be deleted !!!
406 #define STEREO_NOSTEREO 1
407 #define STEREO_ENABLED 2
408 #define STEREO_DOME 3
410 //#define STEREO_NOSTEREO 1
411 #define STEREO_QUADBUFFERED 2
412 #define STEREO_ABOVEBELOW 3
413 #define STEREO_INTERLACED 4
414 #define STEREO_ANAGLYPH 5
415 #define STEREO_SIDEBYSIDE 6
416 #define STEREO_VINTERLACE 7
417 //#define STEREO_DOME 8
423 #define WOPHY_DYNAMO 3
425 #define WOPHY_BULLET 5
428 #define GAME_ENABLE_ALL_FRAMES (1 << 1)
429 #define GAME_SHOW_DEBUG_PROPS (1 << 2)
430 #define GAME_SHOW_FRAMERATE (1 << 3)
431 #define GAME_SHOW_PHYSICS (1 << 4)
432 #define GAME_DISPLAY_LISTS (1 << 5)
433 #define GAME_GLSL_NO_LIGHTS (1 << 6)
434 #define GAME_GLSL_NO_SHADERS (1 << 7)
435 #define GAME_GLSL_NO_SHADOWS (1 << 8)
436 #define GAME_GLSL_NO_RAMPS (1 << 9)
437 #define GAME_GLSL_NO_NODES (1 << 10)
438 #define GAME_GLSL_NO_EXTRA_TEX (1 << 11)
439 #define GAME_IGNORE_DEPRECATION_WARNINGS (1 << 12)
441 /* GameData.matmode */
442 #define GAME_MAT_TEXFACE 0
443 #define GAME_MAT_MULTITEX 1
444 #define GAME_MAT_GLSL 2
446 typedef struct TimeMarker {
447 struct TimeMarker *next, *prev;
453 typedef struct Paint {
454 /* Array of brushes selected for use in this paint mode */
456 int active_brush_index, brush_count;
458 /* WM Paint cursor */
460 unsigned char paint_cursor_col[4];
465 typedef struct ImagePaintSettings {
470 /* for projection painting only */
471 short seam_bleed, normal_angle;
473 void *paintcursor; /* wm handle */
474 } ImagePaintSettings;
476 typedef struct ParticleBrushData {
477 short size, strength; /* common settings */
478 short step, invert; /* for specific brushes only */
481 typedef struct ParticleEditSettings {
487 ParticleBrushData brush[7]; /* 7 = PE_TOT_BRUSH */
488 void *paintcursor; /* runtime */
494 } ParticleEditSettings;
496 typedef struct TransformOrientation {
497 struct TransformOrientation *next, *prev;
500 } TransformOrientation;
502 typedef struct Sculpt {
505 /* For rotating around a pivot point */
509 /* Control tablet input */
510 char tablet_size, tablet_strength;
514 typedef struct VPaint {
517 float gamma, mul; /* should become part of struct Brush? */
519 int tot; /* allocation size of prev buffers */
520 unsigned int *vpaint_prev; /* previous mesh colors */
521 struct MDeformVert *wpaint_prev; /* previous vertex weights */
523 void *paintcursor; /* wm handle */
527 #define VP_COLINDEX 1
532 #define VP_MIRROR_X 32
534 #define VP_ONLYVGROUP 128
537 typedef struct ToolSettings {
538 VPaint *vpaint; /* vertex paint */
539 VPaint *wpaint; /* weight paint */
545 /* Subdivide Settings */
548 /*Triangle to Quad conversion threshold*/
555 float extr_offs; /* extrude offset */
556 float doublimit; /* remove doubles limit */
557 float normalsize; /* size of normals */
560 /* Selection Mode for Mesh */
563 /* Primitive Settings */
568 /* Cylinder - Tube - Circle */
574 float uvcalc_cubesize;
577 short uvcalc_mapalign;
579 short uv_flag, uv_selectmode;
583 short autoik_chainlen;
585 /* Image Paint (8 byttse aligned please!) */
586 struct ImagePaintSettings imapaint;
588 /* Particle Editing */
589 struct ParticleEditSettings particle;
591 /* Transform Proportional Area of Effect */
592 float proportional_size;
594 /* Select Group Threshold */
600 /* Auto-Keying Mode */
601 short autokey_mode, autokey_flag; /* defines in DNA_userdef_types.h */
605 char retopo_paint_tool;
606 char line_div, ellipse_div, retopo_hotspot;
609 char multires_subdiv_type;
611 /* Skeleton generation */
612 short skgen_resolution;
613 float skgen_threshold_internal;
614 float skgen_threshold_external;
615 float skgen_length_ratio;
616 float skgen_length_limit;
617 float skgen_angle_limit;
618 float skgen_correlation_limit;
619 float skgen_symmetry_limit;
620 float skgen_retarget_angle_weight;
621 float skgen_retarget_length_weight;
622 float skgen_retarget_distance_weight;
625 char skgen_postpro_passes;
626 char skgen_subdivisions[3];
627 char skgen_multi_level;
629 /* Skeleton Sketching */
630 struct Object *skgen_template;
632 char bone_sketching_convert;
633 char skgen_subdivision_number;
634 char skgen_retarget_options;
635 char skgen_retarget_roll;
636 char skgen_side_string[8];
637 char skgen_num_string[8];
643 short snap_mode, snap_flag, snap_target;
644 short proportional, prop_mode;
647 typedef struct bStats {
648 /* scene totals for visible layers */
649 int totobj, totlamp, totobjsel, totcurve, totmesh, totarmature;
650 int totvert, totface;
653 typedef struct UnitSettings {
654 /* Display/Editing unit options for each scene */
655 float scale_length; /* maybe have other unit conversions? */
657 short flag; /* imperial, metric etc */
660 typedef struct Scene {
662 struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
664 struct Object *camera;
671 struct Base *basact; /* active base */
672 struct Object *obedit; /* name replaces old G.obedit */
674 float cursor[3]; /* 3d cursor location */
675 float twcent[3]; /* center for transform widget */
676 float twmin[3], twmax[3]; /* boundbox of selection for transform widget */
680 short flag; /* various settings */
684 struct bNodeTree *nodetree;
686 struct Editing *ed; /* sequence editor data is allocated here */
688 struct ToolSettings *toolsettings; /* default allocated now */
689 struct SceneStats *stats; /* default allocated now */
691 /* migrate or replace? depends on some internal things... */
692 /* no, is on the right place (ton) */
694 struct AudioData audio; /* DEPRECATED 2.5 */
697 ListBase transform_spaces;
699 ListBase sound_handles;
701 /* none of the dependancy graph vars is mean to be saved */
702 struct DagForest *theDag;
703 short dagisvalid, dagflags;
704 short recalc; /* recalc = counterpart of ob->recalc */
711 /* User-Defined KeyingSets */
712 int active_keyingset; /* index of the active KeyingSet. first KeyingSet has index 1, 'none' active is 0, 'add new' is -1 */
713 ListBase keyingsets; /* KeyingSets for the given frame */
716 struct GameFraming framing; // XXX deprecated since 2.5
720 struct UnitSettings unit;
724 /* **************** RENDERDATA ********************* */
728 #define R_BACKBUFANIM 2
730 #define R_FRONTBUFANIM 8
734 #define R_SHADOW 0x0002
735 #define R_GAMMA 0x0004
736 #define R_ORTHO 0x0008
737 #define R_ENVMAP 0x0010
738 #define R_EDGE 0x0020
739 #define R_FIELDS 0x0040
740 #define R_FIELDSTILL 0x0080
741 #define R_RADIO 0x0100
742 #define R_BORDER 0x0200
743 #define R_PANORAMA 0x0400 /* deprecated as scene option, still used in renderer */
744 #define R_CROP 0x0800
745 #define R_COSMO 0x1000
746 #define R_ODDFIELD 0x2000
747 #define R_MBLUR 0x4000
748 /* unified was here */
749 #define R_RAYTRACE 0x10000
750 /* R_GAUSS is obsolete, but used to retrieve setting from old files */
751 #define R_GAUSS 0x20000
752 /* fbuf obsolete... */
753 #define R_FBUF 0x40000
754 /* threads obsolete... is there for old files, now use for autodetect threads */
755 #define R_THREADS 0x80000
756 /* Use the same flag for autothreads */
757 #define R_FIXED_THREADS 0x80000
759 #define R_SPEED 0x100000
760 #define R_SSS 0x200000
761 #define R_NO_OVERWRITE 0x400000 /* skip existing files */
762 #define R_TOUCH 0x800000 /* touch files before rendering */
763 #define R_SIMPLIFY 0x1000000
767 #define R_OUTPUT_SCREEN 0
768 #define R_OUTPUT_AREA 1
769 #define R_OUTPUT_WINDOW 2
770 #define R_OUTPUT_FORKED 3
773 #define R_FILTER_BOX 0
774 #define R_FILTER_TENT 1
775 #define R_FILTER_QUAD 2
776 #define R_FILTER_CUBIC 3
777 #define R_FILTER_CATROM 4
778 #define R_FILTER_GAUSS 5
779 #define R_FILTER_MITCH 6
780 #define R_FILTER_FAST_GAUSS 7 /* note, this is only used for nodes at the moment */
782 /* yafray: renderer flag (not only exclusive to yafray) */
786 /* scemode (int now) */
787 #define R_DOSEQ 0x0001
788 #define R_BG_RENDER 0x0002
789 /* passepartout is camera option now, keep this for backward compatibility */
790 #define R_PASSEPARTOUT 0x0004
791 #define R_PREVIEWBUTS 0x0008
792 #define R_EXTENSION 0x0010
793 #define R_NODE_PREVIEW 0x0020
794 #define R_DOCOMP 0x0040
795 #define R_COMP_CROP 0x0080
796 #define R_FREE_IMAGE 0x0100
797 #define R_SINGLE_LAYER 0x0200
798 #define R_EXR_TILE_FILE 0x0400
799 #define R_COMP_FREE 0x0800
800 #define R_NO_IMAGE_LOAD 0x1000
801 #define R_NO_TEX 0x2000
802 #define R_STAMP_INFO 0x4000 /* deprecated */
803 #define R_FULL_SAMPLE 0x8000
804 #define R_COMP_RERENDER 0x10000
805 #define R_RECURS_PROTECTION 0x20000
808 #define R_STAMP_TIME 0x0001
809 #define R_STAMP_FRAME 0x0002
810 #define R_STAMP_DATE 0x0004
811 #define R_STAMP_CAMERA 0x0008
812 #define R_STAMP_SCENE 0x0010
813 #define R_STAMP_NOTE 0x0020
814 #define R_STAMP_DRAW 0x0040 /* draw in the image */
815 #define R_STAMP_MARKER 0x0080
816 #define R_STAMP_FILENAME 0x0100
817 #define R_STAMP_SEQSTRIP 0x0200
818 #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)
822 #define R_ALPHAPREMUL 1
826 #define R_PLANES24 24
827 #define R_PLANES32 32
831 #define R_COLOR_MANAGEMENT 1
837 #define R_FTYPE 3 /* ftype is nomore */
845 #define R_AVICODEC 18
846 #define R_QUICKTIME 19
852 #define R_FRAMESERVER 25
855 #define R_MULTILAYER 28
862 /* subimtype, flag options for imtype */
863 #define R_OPENEXR_HALF 1
864 #define R_OPENEXR_ZBUF 2
865 #define R_PREVIEW_JPG 4
866 #define R_CINEON_LOG 8
867 #define R_TIFF_16BIT 16
869 #define R_JPEG2K_12BIT 32 /* Jpeg2000 */
870 #define R_JPEG2K_16BIT 64
871 #define R_JPEG2K_YCC 128 /* when disabled use RGB */
872 #define R_JPEG2K_CINE_PRESET 256
873 #define R_JPEG2K_CINE_48FPS 512
876 /* bake_mode: same as RE_BAKE_xxx defines */
878 #define R_BAKE_CLEAR 1
880 #define R_BAKE_TO_ACTIVE 4
881 #define R_BAKE_NORMALIZE 8
883 /* bake_normal_space */
884 #define R_BAKE_SPACE_CAMERA 0
885 #define R_BAKE_SPACE_WORLD 1
886 #define R_BAKE_SPACE_OBJECT 2
887 #define R_BAKE_SPACE_TANGENT 3
889 /* **************** SCENE ********************* */
891 /* for general use */
892 #define MAXFRAME 300000
893 #define MAXFRAMEF 300000.0f
896 #define MINFRAMEF 1.0f
898 /* (minimum frame number for current-frame) */
899 #define MINAFRAME -300000
900 #define MINAFRAMEF -300000.0f
902 /* depricate this! */
903 #define TESTBASE(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
904 #define TESTBASELIB(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
905 #define TESTBASELIB_BGMODE(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & (v3d ? v3d->lay : scene->lay)) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
906 #define BASE_SELECTABLE(v3d, base) ((base->lay & v3d->lay) && (base->object->restrictflag & (OB_RESTRICT_SELECT|OB_RESTRICT_VIEW))==0)
907 #define FIRSTBASE scene->base.first
908 #define LASTBASE scene->base.last
909 #define BASACT (scene->basact)
910 #define OBACT (BASACT? BASACT->object: 0)
912 #define ID_NEW(a) if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid
913 #define ID_NEW_US(a) if( (a)->id.newid) {(a)= (void *)(a)->id.newid; (a)->id.us++;}
914 #define ID_NEW_US2(a) if( ((ID *)a)->newid) {(a)= ((ID *)a)->newid; ((ID *)a)->us++;}
915 #define CFRA (scene->r.cfra)
916 #define F_CFRA ((float)(scene->r.cfra))
917 #define SFRA (scene->r.sfra)
918 #define EFRA (scene->r.efra)
919 #define PSFRA ((scene->r.psfra != 0)? (scene->r.psfra): (scene->r.sfra))
920 #define PEFRA ((scene->r.psfra != 0)? (scene->r.pefra): (scene->r.efra))
921 #define FRA2TIME(a) ((((double) scene->r.frs_sec_base) * (a)) / scene->r.frs_sec)
922 #define TIME2FRA(a) ((((double) scene->r.frs_sec) * (a)) / scene->r.frs_sec_base)
923 #define FPS (((double) scene->r.frs_sec) / scene->r.frs_sec_base)
925 #define RAD_PHASE_PATCHES 1
926 #define RAD_PHASE_FACES 2
928 /* base->flag is in DNA_object_types.h */
930 /* toolsettings->snap_flag */
932 #define SCE_SNAP_ROTATE 2
933 #define SCE_SNAP_PEEL_OBJECT 4
934 /* toolsettings->snap_target */
935 #define SCE_SNAP_TARGET_CLOSEST 0
936 #define SCE_SNAP_TARGET_CENTER 1
937 #define SCE_SNAP_TARGET_MEDIAN 2
938 #define SCE_SNAP_TARGET_ACTIVE 3
939 /* toolsettings->snap_mode */
940 #define SCE_SNAP_MODE_VERTEX 0
941 #define SCE_SNAP_MODE_EDGE 1
942 #define SCE_SNAP_MODE_FACE 2
943 #define SCE_SNAP_MODE_VOLUME 3
945 /* toolsettings->selectmode */
946 #define SCE_SELECT_VERTEX 1 /* for mesh */
947 #define SCE_SELECT_EDGE 2
948 #define SCE_SELECT_FACE 4
950 /* toolsettings->particle.selectmode for particles */
951 #define SCE_SELECT_PATH 1
952 #define SCE_SELECT_POINT 2
953 #define SCE_SELECT_END 4
955 /* sce->recalc (now in use by previewrender) */
956 #define SCE_PRV_CHANGED 1
958 /* toolsettings->prop_mode (proportional falloff) */
959 #define PROP_SMOOTH 0
960 #define PROP_SPHERE 1
965 #define PROP_RANDOM 6
968 #define SCE_DS_SELECTED (1<<0)
969 #define SCE_DS_COLLAPSED (1<<1)
970 #define SCE_NLA_EDIT_ON (1<<2)
973 /* return flag next_object function */
983 #define AUDIO_SCRUB 4
985 #define FFMPEG_MULTIPLEX_AUDIO 1
986 #define FFMPEG_AUTOSPLIT_OUTPUT 2
989 typedef enum SculptFlags {
993 SCULPT_INPUT_SMOOTH = 8,
994 SCULPT_DRAW_FAST = 16,
995 SCULPT_DRAW_BRUSH = 32,
1001 /* ImagePaintSettings.flag */
1002 #define IMAGEPAINT_DRAWING 1
1003 #define IMAGEPAINT_DRAW_TOOL 2
1004 #define IMAGEPAINT_DRAW_TOOL_DRAWING 4
1005 /* projection painting only */
1006 #define IMAGEPAINT_PROJECT_DISABLE 8 /* Non projection 3D painting */
1007 #define IMAGEPAINT_PROJECT_XRAY 16
1008 #define IMAGEPAINT_PROJECT_BACKFACE 32
1009 #define IMAGEPAINT_PROJECT_FLAT 64
1010 #define IMAGEPAINT_PROJECT_LAYER_CLONE 128
1011 #define IMAGEPAINT_PROJECT_LAYER_MASK 256
1012 #define IMAGEPAINT_PROJECT_LAYER_MASK_INV 512
1014 /* toolsettings->uvcalc_flag */
1015 #define UVCALC_FILLHOLES 1
1016 #define UVCALC_NO_ASPECT_CORRECT 2 /* would call this UVCALC_ASPECT_CORRECT, except it should be default with old file */
1017 #define UVCALC_TRANSFORM_CORRECT 4 /* adjust UV's while transforming to avoid distortion */
1019 /* toolsettings->uv_flag */
1020 #define UV_SYNC_SELECTION 1
1021 #define UV_SHOW_SAME_IMAGE 2
1023 /* toolsettings->uv_selectmode */
1024 #define UV_SELECT_VERTEX 1
1025 #define UV_SELECT_EDGE 2
1026 #define UV_SELECT_FACE 4
1027 #define UV_SELECT_ISLAND 8
1029 /* toolsettings->edge_mode */
1030 #define EDGE_MODE_SELECT 0
1031 #define EDGE_MODE_TAG_SEAM 1
1032 #define EDGE_MODE_TAG_SHARP 2
1033 #define EDGE_MODE_TAG_CREASE 3
1034 #define EDGE_MODE_TAG_BEVEL 4
1036 /* toolsettings->particle flag */
1037 #define PE_KEEP_LENGTHS 1
1038 #define PE_LOCK_FIRST 2
1039 #define PE_DEFLECT_EMITTER 4
1040 #define PE_INTERPOLATE_ADDED 8
1041 #define PE_SHOW_CHILD 16
1042 #define PE_SHOW_TIME 32
1043 #define PE_X_MIRROR 64
1045 /* toolsetting->particle brushtype */
1046 #define PE_BRUSH_NONE -1
1047 #define PE_BRUSH_COMB 0
1048 #define PE_BRUSH_CUT 1
1049 #define PE_BRUSH_LENGTH 2
1050 #define PE_BRUSH_PUFF 3
1051 #define PE_BRUSH_ADD 4
1052 #define PE_BRUSH_WEIGHT 5
1053 #define PE_BRUSH_SMOOTH 6
1055 /* this must equal ParticleEditSettings.brush array size */
1056 #define PE_TOT_BRUSH 7
1058 /* toolsettings->retopo_mode */
1060 #define RETOPO_PAINT 2
1062 /* toolsettings->retopo_paint_tool */
1063 #define RETOPO_PEN 1
1064 #define RETOPO_LINE 2
1065 #define RETOPO_ELLIPSE 4
1067 /* toolsettings->skgen_options */
1068 #define SKGEN_FILTER_INTERNAL (1 << 0)
1069 #define SKGEN_FILTER_EXTERNAL (1 << 1)
1070 #define SKGEN_SYMMETRY (1 << 2)
1071 #define SKGEN_CUT_LENGTH (1 << 3)
1072 #define SKGEN_CUT_ANGLE (1 << 4)
1073 #define SKGEN_CUT_CORRELATION (1 << 5)
1074 #define SKGEN_HARMONIC (1 << 6)
1075 #define SKGEN_STICK_TO_EMBEDDING (1 << 7)
1076 #define SKGEN_ADAPTIVE_DISTANCE (1 << 8)
1077 #define SKGEN_FILTER_SMART (1 << 9)
1078 #define SKGEN_DISP_LENGTH (1 << 10)
1079 #define SKGEN_DISP_WEIGHT (1 << 11)
1080 #define SKGEN_DISP_ORIG (1 << 12)
1081 #define SKGEN_DISP_EMBED (1 << 13)
1082 #define SKGEN_DISP_INDEX (1 << 14)
1084 #define SKGEN_SUB_LENGTH 0
1085 #define SKGEN_SUB_ANGLE 1
1086 #define SKGEN_SUB_CORRELATION 2
1087 #define SKGEN_SUB_TOTAL 3
1089 /* toolsettings->skgen_postpro */
1090 #define SKGEN_SMOOTH 0
1091 #define SKGEN_AVERAGE 1
1092 #define SKGEN_SHARPEN 2
1094 /* toolsettings->bone_sketching */
1095 #define BONE_SKETCHING 1
1096 #define BONE_SKETCHING_QUICK 2
1097 #define BONE_SKETCHING_ADJUST 4
1099 /* toolsettings->bone_sketching_convert */
1100 #define SK_CONVERT_CUT_FIXED 0
1101 #define SK_CONVERT_CUT_LENGTH 1
1102 #define SK_CONVERT_CUT_ADAPTATIVE 2
1103 #define SK_CONVERT_RETARGET 3
1105 /* toolsettings->skgen_retarget_options */
1106 #define SK_RETARGET_AUTONAME 1
1108 /* toolsettings->skgen_retarget_roll */
1109 #define SK_RETARGET_ROLL_VIEW 1
1110 #define SK_RETARGET_ROLL_JOINT 2
1114 /* UnitSettings->system */
1115 #define USER_UNIT_NONE 0
1116 #define USER_UNIT_METRIC 1
1117 #define USER_UNIT_IMPERIAL 2
1118 /* UnitSettings->flag */
1119 #define USER_UNIT_OPT_SPLIT 1