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"
54 struct Base *next, *prev;
55 unsigned int lay, selcol;
58 struct Object *object;
61 typedef struct AviCodecData {
62 void *lpFormat; /* save format */
63 void *lpParms; /* compressor options */
64 unsigned int cbFormat; /* size of lpFormat buffer */
65 unsigned int cbParms; /* size of lpParms buffer */
67 unsigned int fccType; /* stream type, for consistency */
68 unsigned int fccHandler; /* compressor */
69 unsigned int dwKeyFrameEvery; /* keyframe rate */
70 unsigned int dwQuality; /* compress quality 0-10,000 */
71 unsigned int dwBytesPerSecond; /* bytes per second */
72 unsigned int dwFlags; /* flags... see below */
73 unsigned int dwInterleaveEvery; /* for non-video streams only */
76 char avicodecname[128];
79 typedef struct QuicktimeCodecData {
81 void *cdParms; /* codec/compressor options */
82 void *pad; /* padding */
84 unsigned int cdSize; /* size of cdParms buffer */
85 unsigned int pad2; /* padding */
87 char qtcodecname[128];
90 typedef struct FFMpegCodecData {
106 IDProperty *properties;
110 typedef struct AudioData {
111 int mixrate; // 2.5: now in FFMpegCodecData: audio_mixrate
112 float main; // 2.5: now in FFMpegCodecData: audio_volume
113 float speed_of_sound;
114 float doppler_factor;
120 typedef struct SceneRenderLayer {
121 struct SceneRenderLayer *next, *prev;
125 struct Material *mat_override;
126 struct Group *light_override;
128 unsigned int lay; /* scene->lay itself has priority over this */
129 unsigned int lay_zmask; /* has to be after lay, this is for Z-masking */
134 int passflag; /* pass_xor has to be after passflag */
139 #define SCE_LAY_SOLID 1
140 #define SCE_LAY_ZTRA 2
141 #define SCE_LAY_HALO 4
142 #define SCE_LAY_EDGE 8
143 #define SCE_LAY_SKY 16
144 #define SCE_LAY_STRAND 32
145 /* flags between 32 and 0x8000 are set to 1 already, for future options */
147 #define SCE_LAY_ALL_Z 0x8000
148 #define SCE_LAY_XOR 0x10000
149 #define SCE_LAY_DISABLE 0x20000
150 #define SCE_LAY_ZMASK 0x40000
151 #define SCE_LAY_NEG_ZMASK 0x80000
154 #define SCE_PASS_COMBINED 1
156 #define SCE_PASS_RGBA 4
157 #define SCE_PASS_DIFFUSE 8
158 #define SCE_PASS_SPEC 16
159 #define SCE_PASS_SHADOW 32
160 #define SCE_PASS_AO 64
161 #define SCE_PASS_REFLECT 128
162 #define SCE_PASS_NORMAL 256
163 #define SCE_PASS_VECTOR 512
164 #define SCE_PASS_REFRACT 1024
165 #define SCE_PASS_INDEXOB 2048
166 #define SCE_PASS_UV 4096
167 #define SCE_PASS_RADIO 8192 /* Radio removed, can use for new GI? */
168 #define SCE_PASS_MIST 16384
170 /* note, srl->passflag is treestore element 'nr' in outliner, short still... */
173 typedef struct RenderData {
175 struct AviCodecData *avicodecdata;
176 struct QuicktimeCodecData *qtcodecdata;
177 struct FFMpegCodecData ffcodecdata;
179 int cfra, sfra, efra; /* frames as in 'images' */
180 int psfra, pefra; /* start+end frames of preview range */
182 int images, framapto;
185 float ctime; /* use for calcutions */
186 float framelen, blurfac;
188 /** For UR edge rendering: give the edges this color */
189 float edgeR, edgeG, edgeB;
191 short fullscreen, xplay, yplay, freqplay; /* standalone player */ // XXX deprecated since 2.5
192 short depth, attrib, rt1, rt2; /* standalone player */ // XXX deprecated since 2.5
194 short stereomode; /* standalone player stereo settings */ // XXX deprecated since 2.5
196 short dimensionspreset; /* for the dimensions presets menu */
198 short filtertype; /* filter is box, tent, gauss, mitch, etc */
200 short size, maximsize; /* size in %, max in Kb */
203 * The desired number of pixels in the x direction
207 * The desired number of pixels in the y direction
211 * The number of part to use in the x direction
215 * The number of part to use in the y direction
219 short winpos, planes, imtype, subimtype;
222 /* 0: Enable backbuffering for images */
227 * Render to image editor, fullscreen or to new window.
234 * Flags for render settings. Use bit-masking to access the settings.
239 * Flags for render settings. Use bit-masking to access the settings.
243 /* render engine (deprecated), octree resolution */
244 short renderer, ocres;
247 * What to do with the sky/background. Picks sky/premul/key
248 * blending for the background
253 * The number of samples to use per pixel.
257 short frs_sec, edgeint;
259 /* safety, border and display rect */
263 /* information on different layers to be rendered */
268 * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
272 * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
279 * Value used to define filter size for all filter options */
283 /* color management settings - color profiles, gamma correction, etc */
286 /** post-production settings. Depricated, but here for upwards compat (initialized to 1) */
287 float postgamma, posthue, postsat;
289 /* Dither noise intensity */
290 float dither_intensity;
292 /* Bake Render options */
293 short bake_osa, bake_filter, bake_mode, bake_flag;
294 short bake_normal_space, bake_quad_split;
295 float bake_maxdist, bake_biasdist, bake_pad;
297 /* yafray: global panel params. TODO: move elsewhere */
298 short GIquality, GIcache, GImethod, GIphotons, GIdirect;
299 short YF_AA, YFexportxml, YF_nobump, YF_clamprgb, yfpad1;
300 int GIdepth, GIcausdepth, GIpixelspersample;
301 int GIphotoncount, GImixphotons;
302 float GIphotonradius;
303 int YF_raydepth, YF_AApasses, YF_AAsamples, yfpad2;
304 float GIshadowquality, GIrefinement, GIpower, GIindirpower;
305 float YF_gamma, YF_exposure, YF_raybias, YF_AApixelsize, YF_AAthreshold;
307 /* paths to backbufffer, output, ftype */
308 char backbuf[160], pic[160];
312 short stamp_font_id, pad3; /* select one of blenders bitmap fonts */
314 /* stamp info user data. */
315 char stamp_udata[160];
317 /* foreground/background color. */
321 /* render simplify */
322 int simplify_subsurf;
323 int simplify_shadowsamples;
324 float simplify_particles;
325 float simplify_aosss;
328 short cineonwhite, cineonblack;
332 short jp2_preset, jp2_depth;
335 /* Dome variables */ // XXX deprecated since 2.5
336 short domeres, domemode; // XXX deprecated since 2.5
337 short domeangle, dometilt; // XXX deprecated since 2.5
338 float domeresbuf; // XXX deprecated since 2.5
339 float pad2; // XXX deprecated since 2.5
340 struct Text *dometext; // XXX deprecated since 2.5
346 /* control render convert and shading engine */
347 typedef struct RenderProfile {
348 struct RenderProfile *next, *prev;
353 short shadbufsample_max;
356 float ao_error, pad2;
360 typedef struct GameDome {
364 struct Text *warptext;
367 #define DOME_FISHEYE 1
368 #define DOME_TRUNCATED_FRONT 2
369 #define DOME_TRUNCATED_REAR 3
370 #define DOME_ENVMAP 4
371 #define DOME_PANORAM_SPH 5
372 #define DOME_NUM_MODES 6
374 typedef struct GameFraming {
376 char type, pad1, pad2, pad3;
379 #define SCE_GAMEFRAMING_BARS 0
380 #define SCE_GAMEFRAMING_EXTEND 1
381 #define SCE_GAMEFRAMING_SCALE 2
383 typedef struct GameData {
385 /* physics (it was in world)*/
386 float gravity; /*Gravitation constant for the game world*/
389 * Radius of the activity bubble, in Manhattan length. Objects
390 * outside the box are activity-culled. */
391 float activityBoxRadius; //it's not being used ANYWHERE !!!!!!!!!!!!!!
393 * bit 3: (gameengine): Activity culling is enabled.
394 * bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum culling
396 short mode, flag, matmode, pad[3];
397 short occlusionRes; /* resolution of occlusion Z buffer in pixel */
399 short ticrate, maxlogicstep, physubstep, maxphystep;
401 /* standalone player */
402 struct GameFraming framing;
403 short fullscreen, xplay, yplay, freqplay;
404 short depth, attrib, rt1, rt2;
406 /* stereo/dome mode */
407 struct GameDome dome;
408 short stereoflag, stereomode, xsch, ysch; //xsch and ysch can be deleted !!!
411 #define STEREO_NOSTEREO 1
412 #define STEREO_ENABLED 2
413 #define STEREO_DOME 3
415 //#define STEREO_NOSTEREO 1
416 #define STEREO_QUADBUFFERED 2
417 #define STEREO_ABOVEBELOW 3
418 #define STEREO_INTERLACED 4
419 #define STEREO_ANAGLYPH 5
420 #define STEREO_SIDEBYSIDE 6
421 #define STEREO_VINTERLACE 7
422 //#define STEREO_DOME 8
428 #define WOPHY_DYNAMO 3
430 #define WOPHY_BULLET 5
433 #define GAME_ENABLE_ALL_FRAMES (1 << 1)
434 #define GAME_SHOW_DEBUG_PROPS (1 << 2)
435 #define GAME_SHOW_FRAMERATE (1 << 3)
436 #define GAME_SHOW_PHYSICS (1 << 4)
437 #define GAME_DISPLAY_LISTS (1 << 5)
438 #define GAME_GLSL_NO_LIGHTS (1 << 6)
439 #define GAME_GLSL_NO_SHADERS (1 << 7)
440 #define GAME_GLSL_NO_SHADOWS (1 << 8)
441 #define GAME_GLSL_NO_RAMPS (1 << 9)
442 #define GAME_GLSL_NO_NODES (1 << 10)
443 #define GAME_GLSL_NO_EXTRA_TEX (1 << 11)
444 #define GAME_IGNORE_DEPRECATION_WARNINGS (1 << 12)
446 /* GameData.matmode */
447 #define GAME_MAT_TEXFACE 0
448 #define GAME_MAT_MULTITEX 1
449 #define GAME_MAT_GLSL 2
451 typedef struct TimeMarker {
452 struct TimeMarker *next, *prev;
458 typedef struct Paint {
459 /* Array of brushes selected for use in this paint mode */
461 int active_brush_index, brush_count;
463 /* WM Paint cursor */
465 unsigned char paint_cursor_col[4];
470 typedef struct ImagePaintSettings {
475 /* for projection painting only */
476 short seam_bleed, normal_angle;
478 void *paintcursor; /* wm handle */
479 } ImagePaintSettings;
481 typedef struct ParticleBrushData {
482 short size, strength; /* common settings */
483 short step, invert; /* for specific brushes only */
486 typedef struct ParticleEditSettings {
492 ParticleBrushData brush[7]; /* 7 = PE_TOT_BRUSH */
493 void *paintcursor; /* runtime */
495 float emitterdist, rt;
500 int draw_step, fade_frames;
503 struct Object *object;
504 } ParticleEditSettings;
506 typedef struct TransformOrientation {
507 struct TransformOrientation *next, *prev;
510 } TransformOrientation;
512 typedef struct Sculpt {
515 /* For rotating around a pivot point */
519 /* Control tablet input */
520 char tablet_size, tablet_strength;
524 typedef struct VPaint {
527 float gamma, mul; /* should become part of struct Brush? */
529 int tot; /* allocation size of prev buffers */
530 unsigned int *vpaint_prev; /* previous mesh colors */
531 struct MDeformVert *wpaint_prev; /* previous vertex weights */
533 void *paintcursor; /* wm handle */
537 #define VP_COLINDEX 1
542 #define VP_MIRROR_X 32
544 #define VP_ONLYVGROUP 128
547 typedef struct ToolSettings {
548 VPaint *vpaint; /* vertex paint */
549 VPaint *wpaint; /* weight paint */
555 /* Subdivide Settings */
558 /*Triangle to Quad conversion threshold*/
565 float extr_offs; /* extrude offset */
566 float doublimit; /* remove doubles limit */
567 float normalsize; /* size of normals */
570 /* Selection Mode for Mesh */
573 /* Primitive Settings */
578 /* Cylinder - Tube - Circle */
584 float uvcalc_cubesize;
587 short uvcalc_mapalign;
589 short uv_flag, uv_selectmode;
593 short autoik_chainlen;
595 /* Image Paint (8 byttse aligned please!) */
596 struct ImagePaintSettings imapaint;
598 /* Particle Editing */
599 struct ParticleEditSettings particle;
601 /* Transform Proportional Area of Effect */
602 float proportional_size;
604 /* Select Group Threshold */
610 /* Auto-Keying Mode */
611 short autokey_mode, autokey_flag; /* defines in DNA_userdef_types.h */
615 char retopo_paint_tool;
616 char line_div, ellipse_div, retopo_hotspot;
619 char multires_subdiv_type;
621 /* Skeleton generation */
622 short skgen_resolution;
623 float skgen_threshold_internal;
624 float skgen_threshold_external;
625 float skgen_length_ratio;
626 float skgen_length_limit;
627 float skgen_angle_limit;
628 float skgen_correlation_limit;
629 float skgen_symmetry_limit;
630 float skgen_retarget_angle_weight;
631 float skgen_retarget_length_weight;
632 float skgen_retarget_distance_weight;
635 char skgen_postpro_passes;
636 char skgen_subdivisions[3];
637 char skgen_multi_level;
639 /* Skeleton Sketching */
640 struct Object *skgen_template;
642 char bone_sketching_convert;
643 char skgen_subdivision_number;
644 char skgen_retarget_options;
645 char skgen_retarget_roll;
646 char skgen_side_string[8];
647 char skgen_num_string[8];
653 short snap_mode, snap_flag, snap_target;
654 short proportional, prop_mode;
657 typedef struct bStats {
658 /* scene totals for visible layers */
659 int totobj, totlamp, totobjsel, totcurve, totmesh, totarmature;
660 int totvert, totface;
663 typedef struct UnitSettings {
664 /* Display/Editing unit options for each scene */
665 float scale_length; /* maybe have other unit conversions? */
667 short flag; /* imperial, metric etc */
670 typedef struct PhysicsSettings {
675 typedef struct Scene {
677 struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
679 struct Object *camera;
686 struct Base *basact; /* active base */
687 struct Object *obedit; /* name replaces old G.obedit */
689 float cursor[3]; /* 3d cursor location */
690 float twcent[3]; /* center for transform widget */
691 float twmin[3], twmax[3]; /* boundbox of selection for transform widget */
695 short flag; /* various settings */
699 struct bNodeTree *nodetree;
701 struct Editing *ed; /* sequence editor data is allocated here */
703 struct ToolSettings *toolsettings; /* default allocated now */
704 struct SceneStats *stats; /* default allocated now */
706 /* migrate or replace? depends on some internal things... */
707 /* no, is on the right place (ton) */
709 struct AudioData audio;
712 ListBase transform_spaces;
714 ListBase sound_handles;
716 /* none of the dependancy graph vars is mean to be saved */
717 struct DagForest *theDag;
718 short dagisvalid, dagflags;
719 short recalc; /* recalc = counterpart of ob->recalc */
726 /* User-Defined KeyingSets */
727 int active_keyingset; /* index of the active KeyingSet. first KeyingSet has index 1, 'none' active is 0, 'add new' is -1 */
728 ListBase keyingsets; /* KeyingSets for the given frame */
731 struct GameFraming framing; // XXX deprecated since 2.5
735 struct UnitSettings unit;
740 /* Physics simulation settings */
741 struct PhysicsSettings physics_settings;
745 /* **************** RENDERDATA ********************* */
749 #define R_BACKBUFANIM 2
751 #define R_FRONTBUFANIM 8
755 #define R_SHADOW 0x0002
756 #define R_GAMMA 0x0004
757 #define R_ORTHO 0x0008
758 #define R_ENVMAP 0x0010
759 #define R_EDGE 0x0020
760 #define R_FIELDS 0x0040
761 #define R_FIELDSTILL 0x0080
762 #define R_RADIO 0x0100
763 #define R_BORDER 0x0200
764 #define R_PANORAMA 0x0400 /* deprecated as scene option, still used in renderer */
765 #define R_CROP 0x0800
766 #define R_COSMO 0x1000
767 #define R_ODDFIELD 0x2000
768 #define R_MBLUR 0x4000
769 /* unified was here */
770 #define R_RAYTRACE 0x10000
771 /* R_GAUSS is obsolete, but used to retrieve setting from old files */
772 #define R_GAUSS 0x20000
773 /* fbuf obsolete... */
774 #define R_FBUF 0x40000
775 /* threads obsolete... is there for old files, now use for autodetect threads */
776 #define R_THREADS 0x80000
777 /* Use the same flag for autothreads */
778 #define R_FIXED_THREADS 0x80000
780 #define R_SPEED 0x100000
781 #define R_SSS 0x200000
782 #define R_NO_OVERWRITE 0x400000 /* skip existing files */
783 #define R_TOUCH 0x800000 /* touch files before rendering */
784 #define R_SIMPLIFY 0x1000000
788 #define R_OUTPUT_SCREEN 0
789 #define R_OUTPUT_AREA 1
790 #define R_OUTPUT_WINDOW 2
791 #define R_OUTPUT_FORKED 3
794 #define R_FILTER_BOX 0
795 #define R_FILTER_TENT 1
796 #define R_FILTER_QUAD 2
797 #define R_FILTER_CUBIC 3
798 #define R_FILTER_CATROM 4
799 #define R_FILTER_GAUSS 5
800 #define R_FILTER_MITCH 6
801 #define R_FILTER_FAST_GAUSS 7 /* note, this is only used for nodes at the moment */
803 /* yafray: renderer flag (not only exclusive to yafray) */
807 /* scemode (int now) */
808 #define R_DOSEQ 0x0001
809 #define R_BG_RENDER 0x0002
810 /* passepartout is camera option now, keep this for backward compatibility */
811 #define R_PASSEPARTOUT 0x0004
812 #define R_PREVIEWBUTS 0x0008
813 #define R_EXTENSION 0x0010
814 #define R_NODE_PREVIEW 0x0020
815 #define R_DOCOMP 0x0040
816 #define R_COMP_CROP 0x0080
817 #define R_FREE_IMAGE 0x0100
818 #define R_SINGLE_LAYER 0x0200
819 #define R_EXR_TILE_FILE 0x0400
820 #define R_COMP_FREE 0x0800
821 #define R_NO_IMAGE_LOAD 0x1000
822 #define R_NO_TEX 0x2000
823 #define R_STAMP_INFO 0x4000 /* deprecated */
824 #define R_FULL_SAMPLE 0x8000
825 #define R_COMP_RERENDER 0x10000
826 #define R_RECURS_PROTECTION 0x20000
829 #define R_STAMP_TIME 0x0001
830 #define R_STAMP_FRAME 0x0002
831 #define R_STAMP_DATE 0x0004
832 #define R_STAMP_CAMERA 0x0008
833 #define R_STAMP_SCENE 0x0010
834 #define R_STAMP_NOTE 0x0020
835 #define R_STAMP_DRAW 0x0040 /* draw in the image */
836 #define R_STAMP_MARKER 0x0080
837 #define R_STAMP_FILENAME 0x0100
838 #define R_STAMP_SEQSTRIP 0x0200
839 #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)
843 #define R_ALPHAPREMUL 1
847 #define R_PLANES24 24
848 #define R_PLANES32 32
852 #define R_COLOR_MANAGEMENT 1
858 #define R_FTYPE 3 /* ftype is nomore */
866 #define R_AVICODEC 18
867 #define R_QUICKTIME 19
873 #define R_FRAMESERVER 25
876 #define R_MULTILAYER 28
883 /* subimtype, flag options for imtype */
884 #define R_OPENEXR_HALF 1
885 #define R_OPENEXR_ZBUF 2
886 #define R_PREVIEW_JPG 4
887 #define R_CINEON_LOG 8
888 #define R_TIFF_16BIT 16
890 #define R_JPEG2K_12BIT 32 /* Jpeg2000 */
891 #define R_JPEG2K_16BIT 64
892 #define R_JPEG2K_YCC 128 /* when disabled use RGB */
893 #define R_JPEG2K_CINE_PRESET 256
894 #define R_JPEG2K_CINE_48FPS 512
897 /* bake_mode: same as RE_BAKE_xxx defines */
899 #define R_BAKE_CLEAR 1
901 #define R_BAKE_TO_ACTIVE 4
902 #define R_BAKE_NORMALIZE 8
904 /* bake_normal_space */
905 #define R_BAKE_SPACE_CAMERA 0
906 #define R_BAKE_SPACE_WORLD 1
907 #define R_BAKE_SPACE_OBJECT 2
908 #define R_BAKE_SPACE_TANGENT 3
910 /* **************** SCENE ********************* */
912 /* for general use */
913 #define MAXFRAME 300000
914 #define MAXFRAMEF 300000.0f
917 #define MINFRAMEF 1.0f
919 /* (minimum frame number for current-frame) */
920 #define MINAFRAME -300000
921 #define MINAFRAMEF -300000.0f
923 /* depricate this! */
924 #define TESTBASE(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
925 #define TESTBASELIB(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
926 #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))
927 #define BASE_SELECTABLE(v3d, base) ((base->lay & v3d->lay) && (base->object->restrictflag & (OB_RESTRICT_SELECT|OB_RESTRICT_VIEW))==0)
928 #define FIRSTBASE scene->base.first
929 #define LASTBASE scene->base.last
930 #define BASACT (scene->basact)
931 #define OBACT (BASACT? BASACT->object: 0)
933 #define ID_NEW(a) if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid
934 #define ID_NEW_US(a) if( (a)->id.newid) {(a)= (void *)(a)->id.newid; (a)->id.us++;}
935 #define ID_NEW_US2(a) if( ((ID *)a)->newid) {(a)= ((ID *)a)->newid; ((ID *)a)->us++;}
936 #define CFRA (scene->r.cfra)
937 #define F_CFRA ((float)(scene->r.cfra))
938 #define SFRA (scene->r.sfra)
939 #define EFRA (scene->r.efra)
940 #define PSFRA ((scene->r.psfra != 0)? (scene->r.psfra): (scene->r.sfra))
941 #define PEFRA ((scene->r.psfra != 0)? (scene->r.pefra): (scene->r.efra))
942 #define FRA2TIME(a) ((((double) scene->r.frs_sec_base) * (a)) / scene->r.frs_sec)
943 #define TIME2FRA(a) ((((double) scene->r.frs_sec) * (a)) / scene->r.frs_sec_base)
944 #define FPS (((double) scene->r.frs_sec) / scene->r.frs_sec_base)
946 #define RAD_PHASE_PATCHES 1
947 #define RAD_PHASE_FACES 2
949 /* base->flag is in DNA_object_types.h */
951 /* toolsettings->snap_flag */
953 #define SCE_SNAP_ROTATE 2
954 #define SCE_SNAP_PEEL_OBJECT 4
955 /* toolsettings->snap_target */
956 #define SCE_SNAP_TARGET_CLOSEST 0
957 #define SCE_SNAP_TARGET_CENTER 1
958 #define SCE_SNAP_TARGET_MEDIAN 2
959 #define SCE_SNAP_TARGET_ACTIVE 3
960 /* toolsettings->snap_mode */
961 #define SCE_SNAP_MODE_VERTEX 0
962 #define SCE_SNAP_MODE_EDGE 1
963 #define SCE_SNAP_MODE_FACE 2
964 #define SCE_SNAP_MODE_VOLUME 3
966 /* toolsettings->selectmode */
967 #define SCE_SELECT_VERTEX 1 /* for mesh */
968 #define SCE_SELECT_EDGE 2
969 #define SCE_SELECT_FACE 4
971 /* toolsettings->particle.selectmode for particles */
972 #define SCE_SELECT_PATH 1
973 #define SCE_SELECT_POINT 2
974 #define SCE_SELECT_END 4
976 /* sce->recalc (now in use by previewrender) */
977 #define SCE_PRV_CHANGED 1
979 /* toolsettings->prop_mode (proportional falloff) */
980 #define PROP_SMOOTH 0
981 #define PROP_SPHERE 1
986 #define PROP_RANDOM 6
989 #define SCE_DS_SELECTED (1<<0)
990 #define SCE_DS_COLLAPSED (1<<1)
991 #define SCE_NLA_EDIT_ON (1<<2)
994 /* return flag next_object function */
1002 #define AUDIO_MUTE 1
1003 #define AUDIO_SYNC 2
1004 #define AUDIO_SCRUB 4
1006 #define FFMPEG_MULTIPLEX_AUDIO 1
1007 #define FFMPEG_AUTOSPLIT_OUTPUT 2
1010 typedef enum SculptFlags {
1014 SCULPT_INPUT_SMOOTH = 8,
1015 SCULPT_DRAW_FAST = 16,
1016 SCULPT_DRAW_BRUSH = 32,
1018 SCULPT_LOCK_Y = 128,
1022 /* ImagePaintSettings.flag */
1023 #define IMAGEPAINT_DRAWING 1
1024 #define IMAGEPAINT_DRAW_TOOL 2
1025 #define IMAGEPAINT_DRAW_TOOL_DRAWING 4
1026 /* projection painting only */
1027 #define IMAGEPAINT_PROJECT_DISABLE 8 /* Non projection 3D painting */
1028 #define IMAGEPAINT_PROJECT_XRAY 16
1029 #define IMAGEPAINT_PROJECT_BACKFACE 32
1030 #define IMAGEPAINT_PROJECT_FLAT 64
1031 #define IMAGEPAINT_PROJECT_LAYER_CLONE 128
1032 #define IMAGEPAINT_PROJECT_LAYER_MASK 256
1033 #define IMAGEPAINT_PROJECT_LAYER_MASK_INV 512
1035 /* toolsettings->uvcalc_flag */
1036 #define UVCALC_FILLHOLES 1
1037 #define UVCALC_NO_ASPECT_CORRECT 2 /* would call this UVCALC_ASPECT_CORRECT, except it should be default with old file */
1038 #define UVCALC_TRANSFORM_CORRECT 4 /* adjust UV's while transforming to avoid distortion */
1040 /* toolsettings->uv_flag */
1041 #define UV_SYNC_SELECTION 1
1042 #define UV_SHOW_SAME_IMAGE 2
1044 /* toolsettings->uv_selectmode */
1045 #define UV_SELECT_VERTEX 1
1046 #define UV_SELECT_EDGE 2
1047 #define UV_SELECT_FACE 4
1048 #define UV_SELECT_ISLAND 8
1050 /* toolsettings->edge_mode */
1051 #define EDGE_MODE_SELECT 0
1052 #define EDGE_MODE_TAG_SEAM 1
1053 #define EDGE_MODE_TAG_SHARP 2
1054 #define EDGE_MODE_TAG_CREASE 3
1055 #define EDGE_MODE_TAG_BEVEL 4
1057 /* toolsettings->particle flag */
1058 #define PE_KEEP_LENGTHS 1
1059 #define PE_LOCK_FIRST 2
1060 #define PE_DEFLECT_EMITTER 4
1061 #define PE_INTERPOLATE_ADDED 8
1062 #define PE_DRAW_PART 16
1063 #define PE_X_MIRROR 64
1064 #define PE_FADE_TIME 128
1065 #define PE_AUTO_VELOCITY 256
1067 /* toolsetting->particle brushtype */
1068 #define PE_BRUSH_NONE -1
1069 #define PE_BRUSH_COMB 0
1070 #define PE_BRUSH_CUT 1
1071 #define PE_BRUSH_LENGTH 2
1072 #define PE_BRUSH_PUFF 3
1073 #define PE_BRUSH_ADD 4
1074 #define PE_BRUSH_SMOOTH 5
1076 /* this must equal ParticleEditSettings.brush array size */
1077 #define PE_TOT_BRUSH 6
1079 /* tooksettings->particle edittype */
1080 #define PE_TYPE_PARTICLES 0
1081 #define PE_TYPE_SOFTBODY 1
1082 #define PE_TYPE_CLOTH 2
1084 /* toolsettings->retopo_mode */
1086 #define RETOPO_PAINT 2
1088 /* toolsettings->retopo_paint_tool */
1089 #define RETOPO_PEN 1
1090 #define RETOPO_LINE 2
1091 #define RETOPO_ELLIPSE 4
1093 /* toolsettings->skgen_options */
1094 #define SKGEN_FILTER_INTERNAL (1 << 0)
1095 #define SKGEN_FILTER_EXTERNAL (1 << 1)
1096 #define SKGEN_SYMMETRY (1 << 2)
1097 #define SKGEN_CUT_LENGTH (1 << 3)
1098 #define SKGEN_CUT_ANGLE (1 << 4)
1099 #define SKGEN_CUT_CORRELATION (1 << 5)
1100 #define SKGEN_HARMONIC (1 << 6)
1101 #define SKGEN_STICK_TO_EMBEDDING (1 << 7)
1102 #define SKGEN_ADAPTIVE_DISTANCE (1 << 8)
1103 #define SKGEN_FILTER_SMART (1 << 9)
1104 #define SKGEN_DISP_LENGTH (1 << 10)
1105 #define SKGEN_DISP_WEIGHT (1 << 11)
1106 #define SKGEN_DISP_ORIG (1 << 12)
1107 #define SKGEN_DISP_EMBED (1 << 13)
1108 #define SKGEN_DISP_INDEX (1 << 14)
1110 #define SKGEN_SUB_LENGTH 0
1111 #define SKGEN_SUB_ANGLE 1
1112 #define SKGEN_SUB_CORRELATION 2
1113 #define SKGEN_SUB_TOTAL 3
1115 /* toolsettings->skgen_postpro */
1116 #define SKGEN_SMOOTH 0
1117 #define SKGEN_AVERAGE 1
1118 #define SKGEN_SHARPEN 2
1120 /* toolsettings->bone_sketching */
1121 #define BONE_SKETCHING 1
1122 #define BONE_SKETCHING_QUICK 2
1123 #define BONE_SKETCHING_ADJUST 4
1125 /* toolsettings->bone_sketching_convert */
1126 #define SK_CONVERT_CUT_FIXED 0
1127 #define SK_CONVERT_CUT_LENGTH 1
1128 #define SK_CONVERT_CUT_ADAPTATIVE 2
1129 #define SK_CONVERT_RETARGET 3
1131 /* toolsettings->skgen_retarget_options */
1132 #define SK_RETARGET_AUTONAME 1
1134 /* toolsettings->skgen_retarget_roll */
1135 #define SK_RETARGET_ROLL_VIEW 1
1136 #define SK_RETARGET_ROLL_JOINT 2
1138 /* physics_settings->flag */
1139 #define PHYS_GLOBAL_GRAVITY 1
1143 /* UnitSettings->system */
1144 #define USER_UNIT_NONE 0
1145 #define USER_UNIT_METRIC 1
1146 #define USER_UNIT_IMPERIAL 2
1147 /* UnitSettings->flag */
1148 #define USER_UNIT_OPT_SPLIT 1