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"
52 struct Base *next, *prev;
53 unsigned int lay, selcol;
56 struct Object *object;
59 typedef struct AviCodecData {
60 void *lpFormat; /* save format */
61 void *lpParms; /* compressor options */
62 unsigned int cbFormat; /* size of lpFormat buffer */
63 unsigned int cbParms; /* size of lpParms buffer */
65 unsigned int fccType; /* stream type, for consistency */
66 unsigned int fccHandler; /* compressor */
67 unsigned int dwKeyFrameEvery; /* keyframe rate */
68 unsigned int dwQuality; /* compress quality 0-10,000 */
69 unsigned int dwBytesPerSecond; /* bytes per second */
70 unsigned int dwFlags; /* flags... see below */
71 unsigned int dwInterleaveEvery; /* for non-video streams only */
74 char avicodecname[128];
77 typedef struct QuicktimeCodecData {
79 void *cdParms; /* codec/compressor options */
80 void *pad; /* padding */
82 unsigned int cdSize; /* size of cdParms buffer */
83 unsigned int pad2; /* padding */
85 char qtcodecname[128];
88 typedef struct FFMpegCodecData {
102 IDProperty *properties;
106 typedef struct AudioData {
108 float main; /* Main mix in dB */
113 typedef struct SceneRenderLayer {
114 struct SceneRenderLayer *next, *prev;
118 struct Material *mat_override;
119 struct Group *light_override;
121 unsigned int lay; /* scene->lay itself has priority over this */
122 unsigned int lay_zmask; /* has to be after lay, this is for Z-masking */
127 int passflag; /* pass_xor has to be after passflag */
132 #define SCE_LAY_SOLID 1
133 #define SCE_LAY_ZTRA 2
134 #define SCE_LAY_HALO 4
135 #define SCE_LAY_EDGE 8
136 #define SCE_LAY_SKY 16
137 #define SCE_LAY_STRAND 32
138 /* flags between 32 and 0x8000 are set to 1 already, for future options */
140 #define SCE_LAY_ALL_Z 0x8000
141 #define SCE_LAY_XOR 0x10000
142 #define SCE_LAY_DISABLE 0x20000
143 #define SCE_LAY_ZMASK 0x40000
144 #define SCE_LAY_NEG_ZMASK 0x80000
147 #define SCE_PASS_COMBINED 1
149 #define SCE_PASS_RGBA 4
150 #define SCE_PASS_DIFFUSE 8
151 #define SCE_PASS_SPEC 16
152 #define SCE_PASS_SHADOW 32
153 #define SCE_PASS_AO 64
154 #define SCE_PASS_REFLECT 128
155 #define SCE_PASS_NORMAL 256
156 #define SCE_PASS_VECTOR 512
157 #define SCE_PASS_REFRACT 1024
158 #define SCE_PASS_INDEXOB 2048
159 #define SCE_PASS_UV 4096
160 #define SCE_PASS_RADIO 8192 /* Radio removed, can use for new GI? */
161 #define SCE_PASS_MIST 16384
163 #define SCE_PASS_RAYHITS 32768
165 /* note, srl->passflag is treestore element 'nr' in outliner, short still... */
168 typedef struct RenderData {
170 struct AviCodecData *avicodecdata;
171 struct QuicktimeCodecData *qtcodecdata;
172 struct FFMpegCodecData ffcodecdata;
173 struct AudioData audio; /* new in 2.5 */
175 int cfra, sfra, efra; /* frames as in 'images' */
176 int psfra, pefra; /* start+end frames of preview range */
178 int images, framapto;
181 float ctime; /* use for calcutions */
182 float framelen, blurfac;
184 /** For UR edge rendering: give the edges this color */
185 float edgeR, edgeG, edgeB;
187 short fullscreen, xplay, yplay, freqplay; /* standalone player */ // XXX deprecated since 2.5
188 short depth, attrib, rt1, rt2; /* standalone player */ // XXX deprecated since 2.5
190 short stereomode; /* standalone player stereo settings */ // XXX deprecated since 2.5
192 short dimensionspreset; /* for the dimensions presets menu */
194 short filtertype; /* filter is box, tent, gauss, mitch, etc */
196 short size, maximsize; /* size in %, max in Kb */
199 * The desired number of pixels in the x direction
203 * The desired number of pixels in the y direction
207 * The number of part to use in the x direction
211 * The number of part to use in the y direction
215 short winpos, planes, imtype, subimtype;
218 /* 0: Enable backbuffering for images */
223 * Render to image editor, fullscreen or to new window.
230 * Flags for render settings. Use bit-masking to access the settings.
235 * Flags for render settings. Use bit-masking to access the settings.
239 /* render engine (deprecated), octree resolution */
240 short renderer, ocres;
242 short raytrace_tree_type;
246 * What to do with the sky/background. Picks sky/premul/key
247 * blending for the background
252 * The number of samples to use per pixel.
256 short frs_sec, edgeint;
258 /* safety, border and display rect */
262 /* information on different layers to be rendered */
267 * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
271 * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
278 * Value used to define filter size for all filter options */
282 /* color management settings - color profiles, gamma correction, etc */
285 /** post-production settings. Depricated, but here for upwards compat (initialized to 1) */
286 float postgamma, posthue, postsat;
288 /* Dither noise intensity */
289 float dither_intensity;
291 /* Bake Render options */
292 short bake_osa, bake_filter, bake_mode, bake_flag;
293 short bake_normal_space, bake_quad_split;
294 float bake_maxdist, bake_biasdist, bake_pad;
296 /* yafray: global panel params. TODO: move elsewhere */
297 short GIquality, GIcache, GImethod, GIphotons, GIdirect;
298 short YF_AA, YFexportxml, YF_nobump, YF_clamprgb, yfpad1;
299 int GIdepth, GIcausdepth, GIpixelspersample;
300 int GIphotoncount, GImixphotons;
301 float GIphotonradius;
302 int YF_raydepth, YF_AApasses, YF_AAsamples, yfpad2;
303 float GIshadowquality, GIrefinement, GIpower, GIindirpower;
304 float YF_gamma, YF_exposure, YF_raybias, YF_AApixelsize, YF_AAthreshold;
306 /* paths to backbufffer, output, ftype */
307 char backbuf[160], pic[160];
311 short stamp_font_id, pad3; /* select one of blenders bitmap fonts */
313 /* stamp info user data. */
314 char stamp_udata[160];
316 /* foreground/background color. */
320 /* render simplify */
321 int simplify_subsurf;
322 int simplify_shadowsamples;
323 float simplify_particles;
324 float simplify_aosss;
327 short cineonwhite, cineonblack;
331 short jp2_preset, jp2_depth;
334 /* Dome variables */ // XXX deprecated since 2.5
335 short domeres, domemode; // XXX deprecated since 2.5
336 short domeangle, dometilt; // XXX deprecated since 2.5
337 float domeresbuf; // XXX deprecated since 2.5
338 float pad2; // XXX deprecated since 2.5
339 struct Text *dometext; // XXX deprecated since 2.5
345 /* control render convert and shading engine */
346 typedef struct RenderProfile {
347 struct RenderProfile *next, *prev;
352 short shadbufsample_max;
355 float ao_error, pad2;
359 typedef struct GameDome {
363 struct Text *warptext;
366 #define DOME_FISHEYE 1
367 #define DOME_TRUNCATED_FRONT 2
368 #define DOME_TRUNCATED_REAR 3
369 #define DOME_ENVMAP 4
370 #define DOME_PANORAM_SPH 5
371 #define DOME_NUM_MODES 6
373 typedef struct GameFraming {
375 char type, pad1, pad2, pad3;
378 #define SCE_GAMEFRAMING_BARS 0
379 #define SCE_GAMEFRAMING_EXTEND 1
380 #define SCE_GAMEFRAMING_SCALE 2
382 typedef struct GameData {
384 /* physics (it was in world)*/
385 float gravity; /*Gravitation constant for the game world*/
388 * Radius of the activity bubble, in Manhattan length. Objects
389 * outside the box are activity-culled. */
390 float activityBoxRadius; //it's not being used ANYWHERE !!!!!!!!!!!!!!
392 * bit 3: (gameengine): Activity culling is enabled.
393 * bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum culling
396 short occlusionRes; /* resolution of occlusion Z buffer in pixel */
398 short ticrate, maxlogicstep, physubstep, maxphystep;
400 /* standalone player */
401 struct GameFraming framing;
402 short fullscreen, xplay, yplay, freqplay;
403 short depth, attrib, rt1, rt2;
405 /* stereo/dome mode */
406 struct GameDome dome;
407 short stereoflag, stereomode, xsch, ysch; //xsch and ysch can be deleted !!!
409 #define STEREO_NOSTEREO 1
410 #define STEREO_ENABLED 2
411 #define STEREO_DOME 3
413 //#define STEREO_NOSTEREO 1
414 #define STEREO_QUADBUFFERED 2
415 #define STEREO_ABOVEBELOW 3
416 #define STEREO_INTERLACED 4
417 #define STEREO_ANAGLYPH 5
418 #define STEREO_SIDEBYSIDE 6
419 #define STEREO_VINTERLACE 7
420 //#define STEREO_DOME 8
426 #define WOPHY_DYNAMO 3
428 #define WOPHY_BULLET 5
430 typedef struct TimeMarker {
431 struct TimeMarker *next, *prev;
437 typedef struct Paint {
438 /* Array of brushes selected for use in this paint mode */
440 int active_brush_index, brush_count;
446 typedef struct ImagePaintSettings {
451 /* for projection painting only */
452 short seam_bleed, normal_angle;
454 void *paintcursor; /* wm handle */
455 } ImagePaintSettings;
457 typedef struct ParticleBrushData {
458 short size, strength; /* common settings */
459 short step, invert; /* for specific brushes only */
462 typedef struct ParticleEditSettings {
468 ParticleBrushData brush[7]; /* 7 = PE_TOT_BRUSH */
469 void *paintcursor; /* runtime */
475 } ParticleEditSettings;
477 typedef struct TransformOrientation {
478 struct TransformOrientation *next, *prev;
481 } TransformOrientation;
483 typedef struct Sculpt {
489 /* For rotating around a pivot point */
493 /* Control tablet input */
494 char tablet_size, tablet_strength;
498 typedef struct VPaint {
501 float gamma, mul; /* should become part of struct Brush? */
503 int tot; /* allocation size of prev buffers */
504 unsigned int *vpaint_prev; /* previous mesh colors */
505 struct MDeformVert *wpaint_prev; /* previous vertex weights */
507 void *paintcursor; /* wm handle */
511 #define VP_COLINDEX 1
516 #define VP_MIRROR_X 32
518 #define VP_ONLYVGROUP 128
521 typedef struct ToolSettings {
522 VPaint *vpaint; /* vertex paint */
523 VPaint *wpaint; /* weight paint */
529 /* Subdivide Settings */
532 /*Triangle to Quad conversion threshold*/
539 float extr_offs; /* extrude offset */
540 float doublimit; /* remove doubles limit */
541 float normalsize; /* size of normals */
544 /* Selection Mode for Mesh */
547 /* Primitive Settings */
552 /* Cylinder - Tube - Circle */
558 float uvcalc_cubesize;
561 short uvcalc_mapalign;
563 short uv_flag, uv_selectmode;
567 short autoik_chainlen;
569 /* Image Paint (8 byttse aligned please!) */
570 struct ImagePaintSettings imapaint;
572 /* Particle Editing */
573 struct ParticleEditSettings particle;
575 /* Transform Proportional Area of Effect */
576 float proportional_size;
578 /* Select Group Threshold */
584 /* Auto-Keying Mode */
585 short autokey_mode, autokey_flag; /* defines in DNA_userdef_types.h */
589 char retopo_paint_tool;
590 char line_div, ellipse_div, retopo_hotspot;
593 char multires_subdiv_type;
595 /* Skeleton generation */
596 short skgen_resolution;
597 float skgen_threshold_internal;
598 float skgen_threshold_external;
599 float skgen_length_ratio;
600 float skgen_length_limit;
601 float skgen_angle_limit;
602 float skgen_correlation_limit;
603 float skgen_symmetry_limit;
604 float skgen_retarget_angle_weight;
605 float skgen_retarget_length_weight;
606 float skgen_retarget_distance_weight;
609 char skgen_postpro_passes;
610 char skgen_subdivisions[3];
611 char skgen_multi_level;
613 /* Skeleton Sketching */
614 struct Object *skgen_template;
616 char bone_sketching_convert;
617 char skgen_subdivision_number;
618 char skgen_retarget_options;
619 char skgen_retarget_roll;
620 char skgen_side_string[8];
621 char skgen_num_string[8];
627 short snap_mode, snap_flag, snap_target;
628 short proportional, prop_mode;
631 typedef struct bStats {
632 /* scene totals for visible layers */
633 int totobj, totlamp, totobjsel, totcurve, totmesh, totarmature;
634 int totvert, totface;
637 typedef struct UnitSettings {
638 /* Display/Editing unit options for each scene */
639 float scale_length; /* maybe have other unit conversions? */
641 short flag; /* imperial, metric etc */
644 typedef struct Scene {
646 struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
648 struct Object *camera;
655 struct Base *basact; /* active base */
656 struct Object *obedit; /* name replaces old G.obedit */
658 float cursor[3]; /* 3d cursor location */
659 float twcent[3]; /* center for transform widget */
660 float twmin[3], twmax[3]; /* boundbox of selection for transform widget */
664 short flag; /* various settings */
668 struct bNodeTree *nodetree;
670 struct Editing *ed; /* sequence editor data is allocated here */
672 struct ToolSettings *toolsettings; /* default allocated now */
673 struct SceneStats *stats; /* default allocated now */
675 /* migrate or replace? depends on some internal things... */
676 /* no, is on the right place (ton) */
678 struct AudioData audio; /* DEPRECATED 2.5 */
681 ListBase transform_spaces;
683 ListBase sound_handles;
685 /* none of the dependancy graph vars is mean to be saved */
686 struct DagForest *theDag;
687 short dagisvalid, dagflags;
688 short recalc; /* recalc = counterpart of ob->recalc */
695 /* User-Defined KeyingSets */
696 int active_keyingset; /* index of the active KeyingSet. first KeyingSet has index 1, 'none' active is 0, 'add new' is -1 */
697 ListBase keyingsets; /* KeyingSets for the given frame */
700 struct GameFraming framing; // XXX deprecated since 2.5
704 struct UnitSettings unit;
709 /* **************** RENDERDATA ********************* */
713 #define R_BACKBUFANIM 2
715 #define R_FRONTBUFANIM 8
719 #define R_SHADOW 0x0002
720 #define R_GAMMA 0x0004
721 #define R_ORTHO 0x0008
722 #define R_ENVMAP 0x0010
723 #define R_EDGE 0x0020
724 #define R_FIELDS 0x0040
725 #define R_FIELDSTILL 0x0080
726 #define R_RADIO 0x0100
727 #define R_BORDER 0x0200
728 #define R_PANORAMA 0x0400 /* deprecated as scene option, still used in renderer */
729 #define R_CROP 0x0800
730 #define R_COSMO 0x1000
731 #define R_ODDFIELD 0x2000
732 #define R_MBLUR 0x4000
733 /* unified was here */
734 #define R_RAYTRACE 0x10000
735 /* R_GAUSS is obsolete, but used to retrieve setting from old files */
736 #define R_GAUSS 0x20000
737 /* fbuf obsolete... */
738 #define R_FBUF 0x40000
739 /* threads obsolete... is there for old files, now use for autodetect threads */
740 #define R_THREADS 0x80000
741 /* Use the same flag for autothreads */
742 #define R_FIXED_THREADS 0x80000
744 #define R_SPEED 0x100000
745 #define R_SSS 0x200000
746 #define R_NO_OVERWRITE 0x400000 /* skip existing files */
747 #define R_TOUCH 0x800000 /* touch files before rendering */
748 #define R_SIMPLIFY 0x1000000
752 #define R_OUTPUT_SCREEN 0
753 #define R_OUTPUT_AREA 1
754 #define R_OUTPUT_WINDOW 2
755 #define R_OUTPUT_FORKED 3
758 #define R_FILTER_BOX 0
759 #define R_FILTER_TENT 1
760 #define R_FILTER_QUAD 2
761 #define R_FILTER_CUBIC 3
762 #define R_FILTER_CATROM 4
763 #define R_FILTER_GAUSS 5
764 #define R_FILTER_MITCH 6
765 #define R_FILTER_FAST_GAUSS 7 /* note, this is only used for nodes at the moment */
767 /* yafray: renderer flag (not only exclusive to yafray) */
771 /* raytrace structure */
772 #define R_RAYSTRUCTURE_HIER_BVH_BVH 0
773 #define R_RAYSTRUCTURE_HIER_BVH_OCTREE 1
774 #define R_RAYSTRUCTURE_SINGLE_OCTREE 2
775 #define R_RAYSTRUCTURE_SINGLE_BVH 3
777 /* raytrace tree type */
778 #define R_RAYTRACE_TREE_BVH 0
779 #define R_RAYTRACE_TREE_BLIBVH 1
780 #define R_RAYTRACE_TREE_BIH 2
782 /* scemode (int now) */
783 #define R_DOSEQ 0x0001
784 #define R_BG_RENDER 0x0002
785 /* passepartout is camera option now, keep this for backward compatibility */
786 #define R_PASSEPARTOUT 0x0004
787 #define R_PREVIEWBUTS 0x0008
788 #define R_EXTENSION 0x0010
789 #define R_NODE_PREVIEW 0x0020
790 #define R_DOCOMP 0x0040
791 #define R_COMP_CROP 0x0080
792 #define R_FREE_IMAGE 0x0100
793 #define R_SINGLE_LAYER 0x0200
794 #define R_EXR_TILE_FILE 0x0400
795 #define R_COMP_FREE 0x0800
796 #define R_NO_IMAGE_LOAD 0x1000
797 #define R_NO_TEX 0x2000
798 #define R_STAMP_INFO 0x4000 /* deprecated */
799 #define R_FULL_SAMPLE 0x8000
800 #define R_COMP_RERENDER 0x10000
801 #define R_RECURS_PROTECTION 0x20000
804 #define R_STAMP_TIME 0x0001
805 #define R_STAMP_FRAME 0x0002
806 #define R_STAMP_DATE 0x0004
807 #define R_STAMP_CAMERA 0x0008
808 #define R_STAMP_SCENE 0x0010
809 #define R_STAMP_NOTE 0x0020
810 #define R_STAMP_DRAW 0x0040 /* draw in the image */
811 #define R_STAMP_MARKER 0x0080
812 #define R_STAMP_FILENAME 0x0100
813 #define R_STAMP_SEQSTRIP 0x0200
814 #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)
818 #define R_ALPHAPREMUL 1
822 #define R_PLANES24 24
823 #define R_PLANES32 32
827 #define R_COLOR_MANAGEMENT 1
833 #define R_FTYPE 3 /* ftype is nomore */
841 #define R_AVICODEC 18
842 #define R_QUICKTIME 19
848 #define R_FRAMESERVER 25
851 #define R_MULTILAYER 28
858 /* subimtype, flag options for imtype */
859 #define R_OPENEXR_HALF 1
860 #define R_OPENEXR_ZBUF 2
861 #define R_PREVIEW_JPG 4
862 #define R_CINEON_LOG 8
863 #define R_TIFF_16BIT 16
865 #define R_JPEG2K_12BIT 32 /* Jpeg2000 */
866 #define R_JPEG2K_16BIT 64
867 #define R_JPEG2K_YCC 128 /* when disabled use RGB */
868 #define R_JPEG2K_CINE_PRESET 256
869 #define R_JPEG2K_CINE_48FPS 512
872 /* bake_mode: same as RE_BAKE_xxx defines */
874 #define R_BAKE_CLEAR 1
876 #define R_BAKE_TO_ACTIVE 4
877 #define R_BAKE_NORMALIZE 8
879 /* bake_normal_space */
880 #define R_BAKE_SPACE_CAMERA 0
881 #define R_BAKE_SPACE_WORLD 1
882 #define R_BAKE_SPACE_OBJECT 2
883 #define R_BAKE_SPACE_TANGENT 3
885 /* **************** SCENE ********************* */
887 /* for general use */
888 #define MAXFRAME 300000
889 #define MAXFRAMEF 300000.0f
892 #define MINFRAMEF 1.0f
894 /* (minimum frame number for current-frame) */
895 #define MINAFRAME -300000
896 #define MINAFRAMEF -300000.0f
898 /* depricate this! */
899 #define TESTBASE(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
900 #define TESTBASELIB(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
901 #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))
902 #define BASE_SELECTABLE(v3d, base) ((base->lay & v3d->lay) && (base->object->restrictflag & (OB_RESTRICT_SELECT|OB_RESTRICT_VIEW))==0)
903 #define FIRSTBASE scene->base.first
904 #define LASTBASE scene->base.last
905 #define BASACT (scene->basact)
906 #define OBACT (BASACT? BASACT->object: 0)
908 #define ID_NEW(a) if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid
909 #define ID_NEW_US(a) if( (a)->id.newid) {(a)= (void *)(a)->id.newid; (a)->id.us++;}
910 #define ID_NEW_US2(a) if( ((ID *)a)->newid) {(a)= ((ID *)a)->newid; ((ID *)a)->us++;}
911 #define CFRA (scene->r.cfra)
912 #define F_CFRA ((float)(scene->r.cfra))
913 #define SFRA (scene->r.sfra)
914 #define EFRA (scene->r.efra)
915 #define PSFRA ((scene->r.psfra != 0)? (scene->r.psfra): (scene->r.sfra))
916 #define PEFRA ((scene->r.psfra != 0)? (scene->r.pefra): (scene->r.efra))
917 #define FRA2TIME(a) ((((double) scene->r.frs_sec_base) * (a)) / scene->r.frs_sec)
918 #define TIME2FRA(a) ((((double) scene->r.frs_sec) * (a)) / scene->r.frs_sec_base)
919 #define FPS (((double) scene->r.frs_sec) / scene->r.frs_sec_base)
921 #define RAD_PHASE_PATCHES 1
922 #define RAD_PHASE_FACES 2
924 /* base->flag is in DNA_object_types.h */
926 /* toolsettings->snap_flag */
928 #define SCE_SNAP_ROTATE 2
929 #define SCE_SNAP_PEEL_OBJECT 4
930 /* toolsettings->snap_target */
931 #define SCE_SNAP_TARGET_CLOSEST 0
932 #define SCE_SNAP_TARGET_CENTER 1
933 #define SCE_SNAP_TARGET_MEDIAN 2
934 #define SCE_SNAP_TARGET_ACTIVE 3
935 /* toolsettings->snap_mode */
936 #define SCE_SNAP_MODE_VERTEX 0
937 #define SCE_SNAP_MODE_EDGE 1
938 #define SCE_SNAP_MODE_FACE 2
939 #define SCE_SNAP_MODE_VOLUME 3
941 /* toolsettings->selectmode */
942 #define SCE_SELECT_VERTEX 1 /* for mesh */
943 #define SCE_SELECT_EDGE 2
944 #define SCE_SELECT_FACE 4
946 /* toolsettings->particle.selectmode for particles */
947 #define SCE_SELECT_PATH 1
948 #define SCE_SELECT_POINT 2
949 #define SCE_SELECT_END 4
951 /* sce->recalc (now in use by previewrender) */
952 #define SCE_PRV_CHANGED 1
954 /* toolsettings->prop_mode (proportional falloff) */
955 #define PROP_SMOOTH 0
956 #define PROP_SPHERE 1
961 #define PROP_RANDOM 6
964 #define SCE_DS_SELECTED (1<<0)
965 #define SCE_DS_COLLAPSED (1<<1)
966 #define SCE_NLA_EDIT_ON (1<<2)
969 /* return flag next_object function */
979 #define AUDIO_SCRUB 4
981 #define FFMPEG_MULTIPLEX_AUDIO 1
982 #define FFMPEG_AUTOSPLIT_OUTPUT 2
985 typedef enum SculptFlags {
989 SCULPT_INPUT_SMOOTH = 8,
990 SCULPT_DRAW_FAST = 16,
991 SCULPT_DRAW_BRUSH = 32,
997 /* ImagePaintSettings.flag */
998 #define IMAGEPAINT_DRAWING 1
999 #define IMAGEPAINT_DRAW_TOOL 2
1000 #define IMAGEPAINT_DRAW_TOOL_DRAWING 4
1001 /* projection painting only */
1002 #define IMAGEPAINT_PROJECT_DISABLE 8 /* Non projection 3D painting */
1003 #define IMAGEPAINT_PROJECT_XRAY 16
1004 #define IMAGEPAINT_PROJECT_BACKFACE 32
1005 #define IMAGEPAINT_PROJECT_FLAT 64
1006 #define IMAGEPAINT_PROJECT_LAYER_CLONE 128
1007 #define IMAGEPAINT_PROJECT_LAYER_MASK 256
1008 #define IMAGEPAINT_PROJECT_LAYER_MASK_INV 512
1010 /* toolsettings->uvcalc_flag */
1011 #define UVCALC_FILLHOLES 1
1012 #define UVCALC_NO_ASPECT_CORRECT 2 /* would call this UVCALC_ASPECT_CORRECT, except it should be default with old file */
1013 #define UVCALC_TRANSFORM_CORRECT 4 /* adjust UV's while transforming to avoid distortion */
1015 /* toolsettings->uv_flag */
1016 #define UV_SYNC_SELECTION 1
1017 #define UV_SHOW_SAME_IMAGE 2
1019 /* toolsettings->uv_selectmode */
1020 #define UV_SELECT_VERTEX 1
1021 #define UV_SELECT_EDGE 2
1022 #define UV_SELECT_FACE 4
1023 #define UV_SELECT_ISLAND 8
1025 /* toolsettings->edge_mode */
1026 #define EDGE_MODE_SELECT 0
1027 #define EDGE_MODE_TAG_SEAM 1
1028 #define EDGE_MODE_TAG_SHARP 2
1029 #define EDGE_MODE_TAG_CREASE 3
1030 #define EDGE_MODE_TAG_BEVEL 4
1032 /* toolsettings->particle flag */
1033 #define PE_KEEP_LENGTHS 1
1034 #define PE_LOCK_FIRST 2
1035 #define PE_DEFLECT_EMITTER 4
1036 #define PE_INTERPOLATE_ADDED 8
1037 #define PE_SHOW_CHILD 16
1038 #define PE_SHOW_TIME 32
1039 #define PE_X_MIRROR 64
1041 /* toolsetting->particle brushtype */
1042 #define PE_BRUSH_NONE -1
1043 #define PE_BRUSH_COMB 0
1044 #define PE_BRUSH_CUT 1
1045 #define PE_BRUSH_LENGTH 2
1046 #define PE_BRUSH_PUFF 3
1047 #define PE_BRUSH_ADD 4
1048 #define PE_BRUSH_WEIGHT 5
1049 #define PE_BRUSH_SMOOTH 6
1051 /* this must equal ParticleEditSettings.brush array size */
1052 #define PE_TOT_BRUSH 7
1054 /* toolsettings->retopo_mode */
1056 #define RETOPO_PAINT 2
1058 /* toolsettings->retopo_paint_tool */
1059 #define RETOPO_PEN 1
1060 #define RETOPO_LINE 2
1061 #define RETOPO_ELLIPSE 4
1063 /* toolsettings->skgen_options */
1064 #define SKGEN_FILTER_INTERNAL (1 << 0)
1065 #define SKGEN_FILTER_EXTERNAL (1 << 1)
1066 #define SKGEN_SYMMETRY (1 << 2)
1067 #define SKGEN_CUT_LENGTH (1 << 3)
1068 #define SKGEN_CUT_ANGLE (1 << 4)
1069 #define SKGEN_CUT_CORRELATION (1 << 5)
1070 #define SKGEN_HARMONIC (1 << 6)
1071 #define SKGEN_STICK_TO_EMBEDDING (1 << 7)
1072 #define SKGEN_ADAPTIVE_DISTANCE (1 << 8)
1073 #define SKGEN_FILTER_SMART (1 << 9)
1074 #define SKGEN_DISP_LENGTH (1 << 10)
1075 #define SKGEN_DISP_WEIGHT (1 << 11)
1076 #define SKGEN_DISP_ORIG (1 << 12)
1077 #define SKGEN_DISP_EMBED (1 << 13)
1078 #define SKGEN_DISP_INDEX (1 << 14)
1080 #define SKGEN_SUB_LENGTH 0
1081 #define SKGEN_SUB_ANGLE 1
1082 #define SKGEN_SUB_CORRELATION 2
1083 #define SKGEN_SUB_TOTAL 3
1085 /* toolsettings->skgen_postpro */
1086 #define SKGEN_SMOOTH 0
1087 #define SKGEN_AVERAGE 1
1088 #define SKGEN_SHARPEN 2
1090 /* toolsettings->bone_sketching */
1091 #define BONE_SKETCHING 1
1092 #define BONE_SKETCHING_QUICK 2
1093 #define BONE_SKETCHING_ADJUST 4
1095 /* toolsettings->bone_sketching_convert */
1096 #define SK_CONVERT_CUT_FIXED 0
1097 #define SK_CONVERT_CUT_LENGTH 1
1098 #define SK_CONVERT_CUT_ADAPTATIVE 2
1099 #define SK_CONVERT_RETARGET 3
1101 /* toolsettings->skgen_retarget_options */
1102 #define SK_RETARGET_AUTONAME 1
1104 /* toolsettings->skgen_retarget_roll */
1105 #define SK_RETARGET_ROLL_VIEW 1
1106 #define SK_RETARGET_ROLL_JOINT 2
1110 /* UnitSettings->system */
1111 #define USER_UNIT_NONE 0
1112 #define USER_UNIT_METRIC 1
1113 #define USER_UNIT_IMPERIAL 2
1114 /* UnitSettings->flag */
1115 #define USER_UNIT_OPT_SPLIT 1