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 {
80 /*Old quicktime implementation compatibility fields, read only in 2.5 - deprecated*/
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 QuicktimeCodecSettings {
91 /* Codec settings detailed for 2.5 implementation*/
92 int codecType; /* Types defined in quicktime_export.h */
93 int codecSpatialQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
95 /* Settings not available in current QTKit API */
99 int codecTemporalQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
100 int minSpatialQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
101 int minTemporalQuality; /* in 0-100 scale, to be translated in 0-1024 for qt use */
103 int bitRate; /* bitrate in bps */
104 } QuicktimeCodecSettings;
106 typedef struct FFMpegCodecData {
122 IDProperty *properties;
126 typedef struct AudioData {
127 int mixrate; // 2.5: now in FFMpegCodecData: audio_mixrate
128 float main; // 2.5: now in FFMpegCodecData: audio_volume
129 float speed_of_sound;
130 float doppler_factor;
136 typedef struct SceneRenderLayer {
137 struct SceneRenderLayer *next, *prev;
141 struct Material *mat_override;
142 struct Group *light_override;
144 unsigned int lay; /* scene->lay itself has priority over this */
145 unsigned int lay_zmask; /* has to be after lay, this is for Z-masking */
150 int passflag; /* pass_xor has to be after passflag */
155 #define SCE_LAY_SOLID 1
156 #define SCE_LAY_ZTRA 2
157 #define SCE_LAY_HALO 4
158 #define SCE_LAY_EDGE 8
159 #define SCE_LAY_SKY 16
160 #define SCE_LAY_STRAND 32
161 /* flags between 32 and 0x8000 are set to 1 already, for future options */
163 #define SCE_LAY_ALL_Z 0x8000
164 #define SCE_LAY_XOR 0x10000
165 #define SCE_LAY_DISABLE 0x20000
166 #define SCE_LAY_ZMASK 0x40000
167 #define SCE_LAY_NEG_ZMASK 0x80000
170 #define SCE_PASS_COMBINED 1
172 #define SCE_PASS_RGBA 4
173 #define SCE_PASS_DIFFUSE 8
174 #define SCE_PASS_SPEC 16
175 #define SCE_PASS_SHADOW 32
176 #define SCE_PASS_AO 64
177 #define SCE_PASS_REFLECT 128
178 #define SCE_PASS_NORMAL 256
179 #define SCE_PASS_VECTOR 512
180 #define SCE_PASS_REFRACT 1024
181 #define SCE_PASS_INDEXOB 2048
182 #define SCE_PASS_UV 4096
183 #define SCE_PASS_RADIO 8192 /* Radio removed, can use for new GI? */
184 #define SCE_PASS_MIST 16384
186 #define SCE_PASS_RAYHITS 32768
188 /* note, srl->passflag is treestore element 'nr' in outliner, short still... */
191 typedef struct RenderData {
193 struct AviCodecData *avicodecdata;
194 struct QuicktimeCodecData *qtcodecdata;
195 struct QuicktimeCodecSettings qtcodecsettings;
196 struct FFMpegCodecData ffcodecdata;
198 int cfra, sfra, efra; /* frames as in 'images' */
199 int psfra, pefra; /* start+end frames of preview range */
201 int images, framapto;
204 float ctime; /* use for calcutions */
205 float framelen, blurfac;
207 /** For UR edge rendering: give the edges this color */
208 float edgeR, edgeG, edgeB;
210 short fullscreen, xplay, yplay, freqplay; /* standalone player */ // XXX deprecated since 2.5
211 short depth, attrib, rt2; /* standalone player */ // XXX deprecated since 2.5
212 short frame_step; /* frames to jump during render/playback */
214 short stereomode; /* standalone player stereo settings */ // XXX deprecated since 2.5
216 short dimensionspreset; /* for the dimensions presets menu */
218 short filtertype; /* filter is box, tent, gauss, mitch, etc */
220 short size, maximsize; /* size in %, max in Kb */
223 * The desired number of pixels in the x direction
227 * The desired number of pixels in the y direction
231 * The number of part to use in the x direction
235 * The number of part to use in the y direction
239 short winpos, planes, imtype, subimtype;
242 /* 0: Enable backbuffering for images */
247 * Render to image editor, fullscreen or to new window.
254 * Flags for render settings. Use bit-masking to access the settings.
259 * Flags for render settings. Use bit-masking to access the settings.
264 * Flags for raytrace settings. Use bit-masking to access the settings.
266 int raytrace_options;
269 * Raytrace acceleration structure
271 short raytrace_structure;
273 /* renderer (deprecated) */
276 /* octree resolution */
281 * What to do with the sky/background. Picks sky/premul/key
282 * blending for the background
287 * The number of samples to use per pixel.
291 short frs_sec, edgeint;
294 /* safety, border and display rect */
298 /* information on different layers to be rendered */
303 * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
307 * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
314 * Value used to define filter size for all filter options */
318 /* color management settings - color profiles, gamma correction, etc */
321 /** post-production settings. Depricated, but here for upwards compat (initialized to 1) */
322 float postgamma, posthue, postsat;
324 /* Dither noise intensity */
325 float dither_intensity;
327 /* Bake Render options */
328 short bake_osa, bake_filter, bake_mode, bake_flag;
329 short bake_normal_space, bake_quad_split;
330 float bake_maxdist, bake_biasdist, bake_pad;
332 /* yafray: global panel params. TODO: move elsewhere */
333 short GIquality, GIcache, GImethod, GIphotons, GIdirect;
334 short YF_AA, YFexportxml, YF_nobump, YF_clamprgb, yfpad1;
335 int GIdepth, GIcausdepth, GIpixelspersample;
336 int GIphotoncount, GImixphotons;
337 float GIphotonradius;
338 int YF_raydepth, YF_AApasses, YF_AAsamples, yfpad2;
339 float GIshadowquality, GIrefinement, GIpower, GIindirpower;
340 float YF_gamma, YF_exposure, YF_raybias, YF_AApixelsize, YF_AAthreshold;
342 /* paths to backbufffer, output, ftype */
343 char backbuf[160], pic[160];
347 short stamp_font_id, pad3; /* select one of blenders bitmap fonts */
349 /* stamp info user data. */
350 char stamp_udata[160];
352 /* foreground/background color. */
356 /* render simplify */
357 int simplify_subsurf;
358 int simplify_shadowsamples;
359 float simplify_particles;
360 float simplify_aosss;
363 short cineonwhite, cineonblack;
367 short jp2_preset, jp2_depth;
370 /* Dome variables */ // XXX deprecated since 2.5
371 short domeres, domemode; // XXX deprecated since 2.5
372 short domeangle, dometilt; // XXX deprecated since 2.5
373 float domeresbuf; // XXX deprecated since 2.5
374 float pad2; // XXX deprecated since 2.5
375 struct Text *dometext; // XXX deprecated since 2.5
381 /* control render convert and shading engine */
382 typedef struct RenderProfile {
383 struct RenderProfile *next, *prev;
388 short shadbufsample_max;
391 float ao_error, pad2;
395 typedef struct GameDome {
399 struct Text *warptext;
402 #define DOME_FISHEYE 1
403 #define DOME_TRUNCATED_FRONT 2
404 #define DOME_TRUNCATED_REAR 3
405 #define DOME_ENVMAP 4
406 #define DOME_PANORAM_SPH 5
407 #define DOME_NUM_MODES 6
409 typedef struct GameFraming {
411 char type, pad1, pad2, pad3;
414 #define SCE_GAMEFRAMING_BARS 0
415 #define SCE_GAMEFRAMING_EXTEND 1
416 #define SCE_GAMEFRAMING_SCALE 2
418 typedef struct GameData {
420 /* physics (it was in world)*/
421 float gravity; /*Gravitation constant for the game world*/
424 * Radius of the activity bubble, in Manhattan length. Objects
425 * outside the box are activity-culled. */
426 float activityBoxRadius; //it's not being used ANYWHERE !!!!!!!!!!!!!!
428 * bit 3: (gameengine): Activity culling is enabled.
429 * bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum culling
431 short mode, flag, matmode, pad[3];
432 short occlusionRes; /* resolution of occlusion Z buffer in pixel */
434 short ticrate, maxlogicstep, physubstep, maxphystep;
436 /* standalone player */
437 struct GameFraming framing;
438 short fullscreen, xplay, yplay, freqplay;
439 short depth, attrib, rt1, rt2;
441 /* stereo/dome mode */
442 struct GameDome dome;
443 short stereoflag, stereomode, xsch, ysch; //xsch and ysch can be deleted !!!
446 #define STEREO_NOSTEREO 1
447 #define STEREO_ENABLED 2
448 #define STEREO_DOME 3
450 //#define STEREO_NOSTEREO 1
451 #define STEREO_QUADBUFFERED 2
452 #define STEREO_ABOVEBELOW 3
453 #define STEREO_INTERLACED 4
454 #define STEREO_ANAGLYPH 5
455 #define STEREO_SIDEBYSIDE 6
456 #define STEREO_VINTERLACE 7
457 //#define STEREO_DOME 8
463 #define WOPHY_DYNAMO 3
465 #define WOPHY_BULLET 5
468 #define GAME_ENABLE_ALL_FRAMES (1 << 1)
469 #define GAME_SHOW_DEBUG_PROPS (1 << 2)
470 #define GAME_SHOW_FRAMERATE (1 << 3)
471 #define GAME_SHOW_PHYSICS (1 << 4)
472 #define GAME_DISPLAY_LISTS (1 << 5)
473 #define GAME_GLSL_NO_LIGHTS (1 << 6)
474 #define GAME_GLSL_NO_SHADERS (1 << 7)
475 #define GAME_GLSL_NO_SHADOWS (1 << 8)
476 #define GAME_GLSL_NO_RAMPS (1 << 9)
477 #define GAME_GLSL_NO_NODES (1 << 10)
478 #define GAME_GLSL_NO_EXTRA_TEX (1 << 11)
479 #define GAME_IGNORE_DEPRECATION_WARNINGS (1 << 12)
481 /* GameData.matmode */
482 #define GAME_MAT_TEXFACE 0
483 #define GAME_MAT_MULTITEX 1
484 #define GAME_MAT_GLSL 2
486 typedef struct TimeMarker {
487 struct TimeMarker *next, *prev;
493 typedef struct Paint {
494 /* Array of brushes selected for use in this paint mode */
496 int active_brush_index, brush_count;
498 /* WM Paint cursor */
500 unsigned char paint_cursor_col[4];
505 typedef struct ImagePaintSettings {
510 /* for projection painting only */
511 short seam_bleed, normal_angle;
513 void *paintcursor; /* wm handle */
514 } ImagePaintSettings;
516 typedef struct ParticleBrushData {
517 short size, strength; /* common settings */
518 short step, invert; /* for specific brushes only */
521 typedef struct ParticleEditSettings {
527 ParticleBrushData brush[7]; /* 7 = PE_TOT_BRUSH */
528 void *paintcursor; /* runtime */
530 float emitterdist, rt;
535 int draw_step, fade_frames;
538 struct Object *object;
539 } ParticleEditSettings;
541 typedef struct TransformOrientation {
542 struct TransformOrientation *next, *prev;
545 } TransformOrientation;
547 typedef struct Sculpt {
550 /* For rotating around a pivot point */
554 /* Control tablet input */
555 char tablet_size, tablet_strength;
559 typedef struct VPaint {
563 int tot; /* allocation size of prev buffers */
564 unsigned int *vpaint_prev; /* previous mesh colors */
565 struct MDeformVert *wpaint_prev; /* previous vertex weights */
567 void *paintcursor; /* wm handle */
571 #define VP_COLINDEX 1
576 // #define VP_MIRROR_X 32 // depricated in 2.5x use (me->editflag & ME_EDIT_MIRROR_X)
577 #define VP_ONLYVGROUP 128
580 typedef struct ToolSettings {
581 VPaint *vpaint; /* vertex paint */
582 VPaint *wpaint; /* weight paint */
588 /* Subdivide Settings */
591 /*Triangle to Quad conversion threshold*/
598 float extr_offs; /* extrude offset */
599 float doublimit; /* remove doubles limit */
600 float normalsize; /* size of normals */
603 /* Selection Mode for Mesh */
606 /* Primitive Settings */
611 /* Cylinder - Tube - Circle */
617 float uvcalc_cubesize;
620 short uvcalc_mapalign;
622 short uv_flag, uv_selectmode;
626 short autoik_chainlen;
628 /* Image Paint (8 byttse aligned please!) */
629 struct ImagePaintSettings imapaint;
631 /* Particle Editing */
632 struct ParticleEditSettings particle;
634 /* Transform Proportional Area of Effect */
635 float proportional_size;
637 /* Select Group Threshold */
643 /* Auto-Keying Mode */
644 short autokey_mode, autokey_flag; /* defines in DNA_userdef_types.h */
648 char retopo_paint_tool;
649 char line_div, ellipse_div, retopo_hotspot;
652 char multires_subdiv_type;
654 /* Skeleton generation */
655 short skgen_resolution;
656 float skgen_threshold_internal;
657 float skgen_threshold_external;
658 float skgen_length_ratio;
659 float skgen_length_limit;
660 float skgen_angle_limit;
661 float skgen_correlation_limit;
662 float skgen_symmetry_limit;
663 float skgen_retarget_angle_weight;
664 float skgen_retarget_length_weight;
665 float skgen_retarget_distance_weight;
668 char skgen_postpro_passes;
669 char skgen_subdivisions[3];
670 char skgen_multi_level;
672 /* Skeleton Sketching */
673 struct Object *skgen_template;
675 char bone_sketching_convert;
676 char skgen_subdivision_number;
677 char skgen_retarget_options;
678 char skgen_retarget_roll;
679 char skgen_side_string[8];
680 char skgen_num_string[8];
686 short snap_mode, snap_flag, snap_target;
687 short proportional, prop_mode;
689 int auto_normalize, intpad; /*auto normalizing mode in wpaint*/
692 typedef struct bStats {
693 /* scene totals for visible layers */
694 int totobj, totlamp, totobjsel, totcurve, totmesh, totarmature;
695 int totvert, totface;
698 typedef struct UnitSettings {
699 /* Display/Editing unit options for each scene */
700 float scale_length; /* maybe have other unit conversions? */
702 short flag; /* imperial, metric etc */
705 typedef struct PhysicsSettings {
710 typedef struct Scene {
712 struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
714 struct Object *camera;
721 struct Base *basact; /* active base */
722 struct Object *obedit; /* name replaces old G.obedit */
724 float cursor[3]; /* 3d cursor location */
725 float twcent[3]; /* center for transform widget */
726 float twmin[3], twmax[3]; /* boundbox of selection for transform widget */
730 short flag; /* various settings */
734 struct bNodeTree *nodetree;
736 struct Editing *ed; /* sequence editor data is allocated here */
738 struct ToolSettings *toolsettings; /* default allocated now */
739 struct SceneStats *stats; /* default allocated now */
741 /* migrate or replace? depends on some internal things... */
742 /* no, is on the right place (ton) */
744 struct AudioData audio;
747 ListBase transform_spaces;
749 ListBase sound_handles;
751 /* none of the dependancy graph vars is mean to be saved */
752 struct DagForest *theDag;
753 short dagisvalid, dagflags;
754 short recalc; /* recalc = counterpart of ob->recalc */
759 /* User-Defined KeyingSets */
760 int active_keyingset; /* index of the active KeyingSet. first KeyingSet has index 1, 'none' active is 0, 'add new' is -1 */
761 ListBase keyingsets; /* KeyingSets for the given frame */
764 struct GameFraming framing; // XXX deprecated since 2.5
768 struct UnitSettings unit;
773 /* Physics simulation settings */
774 struct PhysicsSettings physics_settings;
778 /* **************** RENDERDATA ********************* */
782 #define R_BACKBUFANIM 2
784 #define R_FRONTBUFANIM 8
788 #define R_SHADOW 0x0002
789 #define R_GAMMA 0x0004
790 #define R_ORTHO 0x0008
791 #define R_ENVMAP 0x0010
792 #define R_EDGE 0x0020
793 #define R_FIELDS 0x0040
794 #define R_FIELDSTILL 0x0080
795 #define R_RADIO 0x0100
796 #define R_BORDER 0x0200
797 #define R_PANORAMA 0x0400 /* deprecated as scene option, still used in renderer */
798 #define R_CROP 0x0800
799 #define R_COSMO 0x1000
800 #define R_ODDFIELD 0x2000
801 #define R_MBLUR 0x4000
802 /* unified was here */
803 #define R_RAYTRACE 0x10000
804 /* R_GAUSS is obsolete, but used to retrieve setting from old files */
805 #define R_GAUSS 0x20000
806 /* fbuf obsolete... */
807 #define R_FBUF 0x40000
808 /* threads obsolete... is there for old files, now use for autodetect threads */
809 #define R_THREADS 0x80000
810 /* Use the same flag for autothreads */
811 #define R_FIXED_THREADS 0x80000
813 #define R_SPEED 0x100000
814 #define R_SSS 0x200000
815 #define R_NO_OVERWRITE 0x400000 /* skip existing files */
816 #define R_TOUCH 0x800000 /* touch files before rendering */
817 #define R_SIMPLIFY 0x1000000
821 #define R_OUTPUT_SCREEN 0
822 #define R_OUTPUT_AREA 1
823 #define R_OUTPUT_WINDOW 2
824 #define R_OUTPUT_FORKED 3
827 #define R_FILTER_BOX 0
828 #define R_FILTER_TENT 1
829 #define R_FILTER_QUAD 2
830 #define R_FILTER_CUBIC 3
831 #define R_FILTER_CATROM 4
832 #define R_FILTER_GAUSS 5
833 #define R_FILTER_MITCH 6
834 #define R_FILTER_FAST_GAUSS 7 /* note, this is only used for nodes at the moment */
836 /* yafray: renderer flag (not only exclusive to yafray) */
840 /* raytrace structure */
841 #define R_RAYSTRUCTURE_AUTO 0
842 #define R_RAYSTRUCTURE_OCTREE 1
843 #define R_RAYSTRUCTURE_BLIBVH 2
844 #define R_RAYSTRUCTURE_VBVH 3
845 #define R_RAYSTRUCTURE_SIMD_SVBVH 4 /* needs SIMD */
846 #define R_RAYSTRUCTURE_SIMD_QBVH 5 /* needs SIMD */
848 /* raytrace_options */
849 #define R_RAYTRACE_USE_LOCAL_COORDS 0x0001
850 #define R_RAYTRACE_USE_INSTANCES 0x0002
852 /* scemode (int now) */
853 #define R_DOSEQ 0x0001
854 #define R_BG_RENDER 0x0002
855 /* passepartout is camera option now, keep this for backward compatibility */
856 #define R_PASSEPARTOUT 0x0004
857 #define R_PREVIEWBUTS 0x0008
858 #define R_EXTENSION 0x0010
859 #define R_MATNODE_PREVIEW 0x0020
860 #define R_DOCOMP 0x0040
861 #define R_COMP_CROP 0x0080
862 #define R_FREE_IMAGE 0x0100
863 #define R_SINGLE_LAYER 0x0200
864 #define R_EXR_TILE_FILE 0x0400
865 #define R_COMP_FREE 0x0800
866 #define R_NO_IMAGE_LOAD 0x1000
867 #define R_NO_TEX 0x2000
868 #define R_STAMP_INFO 0x4000 /* deprecated */
869 #define R_FULL_SAMPLE 0x8000
870 #define R_COMP_RERENDER 0x10000
871 #define R_RECURS_PROTECTION 0x20000
872 #define R_TEXNODE_PREVIEW 0x40000
875 #define R_STAMP_TIME 0x0001
876 #define R_STAMP_FRAME 0x0002
877 #define R_STAMP_DATE 0x0004
878 #define R_STAMP_CAMERA 0x0008
879 #define R_STAMP_SCENE 0x0010
880 #define R_STAMP_NOTE 0x0020
881 #define R_STAMP_DRAW 0x0040 /* draw in the image */
882 #define R_STAMP_MARKER 0x0080
883 #define R_STAMP_FILENAME 0x0100
884 #define R_STAMP_SEQSTRIP 0x0200
885 #define R_STAMP_RENDERTIME 0x0400
886 #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)
890 #define R_ALPHAPREMUL 1
894 #define R_PLANES24 24
895 #define R_PLANES32 32
899 #define R_COLOR_MANAGEMENT 1
905 #define R_FTYPE 3 /* ftype is nomore */
913 #define R_AVICODEC 18
914 #define R_QUICKTIME 19
920 #define R_FRAMESERVER 25
923 #define R_MULTILAYER 28
930 /* subimtype, flag options for imtype */
931 #define R_OPENEXR_HALF 1
932 #define R_OPENEXR_ZBUF 2
933 #define R_PREVIEW_JPG 4
934 #define R_CINEON_LOG 8
935 #define R_TIFF_16BIT 16
937 #define R_JPEG2K_12BIT 32 /* Jpeg2000 */
938 #define R_JPEG2K_16BIT 64
939 #define R_JPEG2K_YCC 128 /* when disabled use RGB */
940 #define R_JPEG2K_CINE_PRESET 256
941 #define R_JPEG2K_CINE_48FPS 512
944 /* bake_mode: same as RE_BAKE_xxx defines */
946 #define R_BAKE_CLEAR 1
948 #define R_BAKE_TO_ACTIVE 4
949 #define R_BAKE_NORMALIZE 8
951 /* bake_normal_space */
952 #define R_BAKE_SPACE_CAMERA 0
953 #define R_BAKE_SPACE_WORLD 1
954 #define R_BAKE_SPACE_OBJECT 2
955 #define R_BAKE_SPACE_TANGENT 3
957 /* **************** SCENE ********************* */
959 /* for general use */
960 #define MAXFRAME 300000
961 #define MAXFRAMEF 300000.0f
964 #define MINFRAMEF 1.0f
966 /* (minimum frame number for current-frame) */
967 #define MINAFRAME -300000
968 #define MINAFRAMEF -300000.0f
970 /* depricate this! */
971 #define TESTBASE(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
972 #define TESTBASELIB(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
973 #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))
974 #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))
975 #define BASE_SELECTABLE(v3d, base) ((base->lay & v3d->lay) && (base->object->restrictflag & (OB_RESTRICT_SELECT|OB_RESTRICT_VIEW))==0)
976 #define FIRSTBASE scene->base.first
977 #define LASTBASE scene->base.last
978 #define BASACT (scene->basact)
979 #define OBACT (BASACT? BASACT->object: 0)
981 #define ID_NEW(a) if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid
982 #define ID_NEW_US(a) if( (a)->id.newid) {(a)= (void *)(a)->id.newid; (a)->id.us++;}
983 #define ID_NEW_US2(a) if( ((ID *)a)->newid) {(a)= ((ID *)a)->newid; ((ID *)a)->us++;}
984 #define CFRA (scene->r.cfra)
985 #define F_CFRA ((float)(scene->r.cfra))
986 #define SFRA (scene->r.sfra)
987 #define EFRA (scene->r.efra)
988 #define PSFRA ((scene->r.psfra != 0)? (scene->r.psfra): (scene->r.sfra))
989 #define PEFRA ((scene->r.psfra != 0)? (scene->r.pefra): (scene->r.efra))
990 #define FRA2TIME(a) ((((double) scene->r.frs_sec_base) * (a)) / scene->r.frs_sec)
991 #define TIME2FRA(a) ((((double) scene->r.frs_sec) * (a)) / scene->r.frs_sec_base)
992 #define FPS (((double) scene->r.frs_sec) / scene->r.frs_sec_base)
994 #define RAD_PHASE_PATCHES 1
995 #define RAD_PHASE_FACES 2
997 /* base->flag is in DNA_object_types.h */
999 /* toolsettings->snap_flag */
1001 #define SCE_SNAP_ROTATE 2
1002 #define SCE_SNAP_PEEL_OBJECT 4
1003 #define SCE_SNAP_PROJECT 8
1004 /* toolsettings->snap_target */
1005 #define SCE_SNAP_TARGET_CLOSEST 0
1006 #define SCE_SNAP_TARGET_CENTER 1
1007 #define SCE_SNAP_TARGET_MEDIAN 2
1008 #define SCE_SNAP_TARGET_ACTIVE 3
1009 /* toolsettings->snap_mode */
1010 #define SCE_SNAP_MODE_INCREMENT 0
1011 #define SCE_SNAP_MODE_VERTEX 1
1012 #define SCE_SNAP_MODE_EDGE 2
1013 #define SCE_SNAP_MODE_FACE 3
1014 #define SCE_SNAP_MODE_VOLUME 4
1016 /* toolsettings->selectmode */
1017 #define SCE_SELECT_VERTEX 1 /* for mesh */
1018 #define SCE_SELECT_EDGE 2
1019 #define SCE_SELECT_FACE 4
1021 /* toolsettings->particle.selectmode for particles */
1022 #define SCE_SELECT_PATH 1
1023 #define SCE_SELECT_POINT 2
1024 #define SCE_SELECT_END 4
1026 /* sce->recalc (now in use by previewrender) */
1027 #define SCE_PRV_CHANGED 1
1029 /* toolsettings->prop_mode (proportional falloff) */
1030 #define PROP_SMOOTH 0
1031 #define PROP_SPHERE 1
1033 #define PROP_SHARP 3
1035 #define PROP_CONST 5
1036 #define PROP_RANDOM 6
1038 /* toolsettings->proportional */
1039 #define PROP_EDIT_OFF 0
1040 #define PROP_EDIT_ON 1
1041 #define PROP_EDIT_CONNECTED 2
1044 #define SCE_DS_SELECTED (1<<0)
1045 #define SCE_DS_COLLAPSED (1<<1)
1046 #define SCE_NLA_EDIT_ON (1<<2)
1049 /* return flag next_object function */
1057 #define AUDIO_MUTE 1
1058 #define AUDIO_SYNC 2
1059 #define AUDIO_SCRUB 4
1061 #define FFMPEG_MULTIPLEX_AUDIO 1
1062 #define FFMPEG_AUTOSPLIT_OUTPUT 2
1066 PAINT_SHOW_BRUSH = 1,
1067 PAINT_FAST_NAVIGATE = 2
1071 /* These can eventually be moved to paint flags? */
1072 typedef enum SculptFlags {
1077 SCULPT_LOCK_Y = 128,
1081 /* ImagePaintSettings.flag */
1082 #define IMAGEPAINT_DRAWING 1
1083 #define IMAGEPAINT_DRAW_TOOL 2
1084 #define IMAGEPAINT_DRAW_TOOL_DRAWING 4
1085 /* projection painting only */
1086 #define IMAGEPAINT_PROJECT_DISABLE 8 /* Non projection 3D painting */
1087 #define IMAGEPAINT_PROJECT_XRAY 16
1088 #define IMAGEPAINT_PROJECT_BACKFACE 32
1089 #define IMAGEPAINT_PROJECT_FLAT 64
1090 #define IMAGEPAINT_PROJECT_LAYER_CLONE 128
1091 #define IMAGEPAINT_PROJECT_LAYER_MASK 256
1092 #define IMAGEPAINT_PROJECT_LAYER_MASK_INV 512
1094 /* toolsettings->uvcalc_flag */
1095 #define UVCALC_FILLHOLES 1
1096 #define UVCALC_NO_ASPECT_CORRECT 2 /* would call this UVCALC_ASPECT_CORRECT, except it should be default with old file */
1097 #define UVCALC_TRANSFORM_CORRECT 4 /* adjust UV's while transforming to avoid distortion */
1099 /* toolsettings->uv_flag */
1100 #define UV_SYNC_SELECTION 1
1101 #define UV_SHOW_SAME_IMAGE 2
1103 /* toolsettings->uv_selectmode */
1104 #define UV_SELECT_VERTEX 1
1105 #define UV_SELECT_EDGE 2
1106 #define UV_SELECT_FACE 4
1107 #define UV_SELECT_ISLAND 8
1109 /* toolsettings->edge_mode */
1110 #define EDGE_MODE_SELECT 0
1111 #define EDGE_MODE_TAG_SEAM 1
1112 #define EDGE_MODE_TAG_SHARP 2
1113 #define EDGE_MODE_TAG_CREASE 3
1114 #define EDGE_MODE_TAG_BEVEL 4
1116 /* toolsettings->particle flag */
1117 #define PE_KEEP_LENGTHS 1
1118 #define PE_LOCK_FIRST 2
1119 #define PE_DEFLECT_EMITTER 4
1120 #define PE_INTERPOLATE_ADDED 8
1121 #define PE_DRAW_PART 16
1122 #define PE_X_MIRROR 64
1123 #define PE_FADE_TIME 128
1124 #define PE_AUTO_VELOCITY 256
1126 /* toolsetting->particle brushtype */
1127 #define PE_BRUSH_NONE -1
1128 #define PE_BRUSH_COMB 0
1129 #define PE_BRUSH_CUT 1
1130 #define PE_BRUSH_LENGTH 2
1131 #define PE_BRUSH_PUFF 3
1132 #define PE_BRUSH_ADD 4
1133 #define PE_BRUSH_SMOOTH 5
1135 /* this must equal ParticleEditSettings.brush array size */
1136 #define PE_TOT_BRUSH 6
1138 /* tooksettings->particle edittype */
1139 #define PE_TYPE_PARTICLES 0
1140 #define PE_TYPE_SOFTBODY 1
1141 #define PE_TYPE_CLOTH 2
1143 /* toolsettings->retopo_mode */
1145 #define RETOPO_PAINT 2
1147 /* toolsettings->retopo_paint_tool */
1148 #define RETOPO_PEN 1
1149 #define RETOPO_LINE 2
1150 #define RETOPO_ELLIPSE 4
1152 /* toolsettings->skgen_options */
1153 #define SKGEN_FILTER_INTERNAL (1 << 0)
1154 #define SKGEN_FILTER_EXTERNAL (1 << 1)
1155 #define SKGEN_SYMMETRY (1 << 2)
1156 #define SKGEN_CUT_LENGTH (1 << 3)
1157 #define SKGEN_CUT_ANGLE (1 << 4)
1158 #define SKGEN_CUT_CORRELATION (1 << 5)
1159 #define SKGEN_HARMONIC (1 << 6)
1160 #define SKGEN_STICK_TO_EMBEDDING (1 << 7)
1161 #define SKGEN_ADAPTIVE_DISTANCE (1 << 8)
1162 #define SKGEN_FILTER_SMART (1 << 9)
1163 #define SKGEN_DISP_LENGTH (1 << 10)
1164 #define SKGEN_DISP_WEIGHT (1 << 11)
1165 #define SKGEN_DISP_ORIG (1 << 12)
1166 #define SKGEN_DISP_EMBED (1 << 13)
1167 #define SKGEN_DISP_INDEX (1 << 14)
1169 #define SKGEN_SUB_LENGTH 0
1170 #define SKGEN_SUB_ANGLE 1
1171 #define SKGEN_SUB_CORRELATION 2
1172 #define SKGEN_SUB_TOTAL 3
1174 /* toolsettings->skgen_postpro */
1175 #define SKGEN_SMOOTH 0
1176 #define SKGEN_AVERAGE 1
1177 #define SKGEN_SHARPEN 2
1179 /* toolsettings->bone_sketching */
1180 #define BONE_SKETCHING 1
1181 #define BONE_SKETCHING_QUICK 2
1182 #define BONE_SKETCHING_ADJUST 4
1184 /* toolsettings->bone_sketching_convert */
1185 #define SK_CONVERT_CUT_FIXED 0
1186 #define SK_CONVERT_CUT_LENGTH 1
1187 #define SK_CONVERT_CUT_ADAPTATIVE 2
1188 #define SK_CONVERT_RETARGET 3
1190 /* toolsettings->skgen_retarget_options */
1191 #define SK_RETARGET_AUTONAME 1
1193 /* toolsettings->skgen_retarget_roll */
1194 #define SK_RETARGET_ROLL_NONE 0
1195 #define SK_RETARGET_ROLL_VIEW 1
1196 #define SK_RETARGET_ROLL_JOINT 2
1198 /* physics_settings->flag */
1199 #define PHYS_GLOBAL_GRAVITY 1
1203 /* UnitSettings->system */
1204 #define USER_UNIT_NONE 0
1205 #define USER_UNIT_METRIC 1
1206 #define USER_UNIT_IMPERIAL 2
1207 /* UnitSettings->flag */
1208 #define USER_UNIT_OPT_SPLIT 1