4 * ***** BEGIN GPL/BL DUAL 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. The Blender
10 * Foundation also sells licenses for use in proprietary software under
11 * the Blender License. See http://www.blender.org/BL/ for information
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software Foundation,
21 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
24 * All rights reserved.
26 * The Original Code is: all of this file.
28 * Contributor(s): none yet.
30 * ***** END GPL/BL DUAL LICENSE BLOCK *****
32 #ifndef DNA_SCENE_TYPES_H
33 #define DNA_SCENE_TYPES_H
39 #include "DNA_vec_types.h"
40 #include "DNA_listBase.h"
41 #include "DNA_scriptlink_types.h"
43 #include "DNA_scriptlink_types.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 AudioData {
92 float main; /* Main mix in dB */
97 typedef struct RenderData {
98 struct AviCodecData *avicodecdata;
99 struct QuicktimeCodecData *qtcodecdata;
101 short cfra, sfra, efra; /* fames as in 'images' */
102 short images, framapto, flag;
103 float ctime; /* use for calcutions */
104 float framelen, blurfac;
106 /** For UR edge rendering: give the edges this colour */
107 float edgeR, edgeG, edgeB;
109 short fullscreen, xplay, yplay, freqplay; /* standalone player */
110 short depth, attrib, rt1, rt2; /* standalone player */
112 short stereomode; /* standalone player stereo settings */
114 short dimensionspreset; /* for the dimensions presets menu */
116 short filtertype; /* filter is box, tent, gauss, mitch, etc */
119 short size, maximsize; /* size in %, max in Kb */
122 * The desired number of pixels in the x direction
126 * The desired number of pixels in the y direction
130 * Adjustment factors for the aspect ratio in the x direction
134 * Adjustment factors for the aspect ratio in the x direction
138 * The number of part to use in the x direction
142 * The number of part to use in the y direction
146 short winpos, planes, imtype, subimtype;
149 /* 0: Enable backbuffering for images */
154 * Flags for render settings. Use bit-masking to access the settings.
155 * 0: enable sequence output rendering
157 * 4: add extensions to filenames
162 * Flags for render settings. Use bit-masking to access the settings.
163 * The bits have these meanings:
166 * 2: do gamma correction
167 * 3: ortho (not used?)
171 * 7: Disables time difference in field calculations
176 * 12: save SGI movies with Cosmo hardware
177 * 13: odd field first rendering
179 * 15: use unified renderer for this pic
180 * 16: enable raytracing
181 * 17: gauss sampling for subpixels
182 * 18: keep float buffer after render
186 /* render engine, octree resolution */
187 short renderer, ocres, rpad[2];
190 * What to do with the sky/background. Picks sky/premul/key
191 * blending for the background
195 * Toggles whether to apply a gamma correction for subpixel to
200 * The number of samples to use per pixel.
203 short frs_sec, edgeint;
205 /** For unified renderer: reduce intensity on boundaries with
206 * identical materials with this number.*/
207 short same_mat_redux;
209 /* safety and border rect */
213 * The gamma for the normal rendering. Used when doing
214 * oversampling, to correctly blend subpixels to pixels. */
216 /** post-production settings. */
217 float postmul, postgamma, postadd, postigamma, posthue, postsat;
219 /* Dither noise intensity */
220 float dither_intensity;
223 float zmin, focus, zgamma, zsigma, zblur;
225 /* yafray: global panel params. TODO: move elsewhere */
226 short GIquality, GIcache, GImethod, GIphotons, GIdirect;
227 short YF_AA, YFexportxml, YF_nobump, YF_clamprgb, yfpad1;
228 int GIdepth, GIcausdepth, GIpixelspersample;
229 int GIphotoncount, GImixphotons;
230 float GIphotonradius;
231 int YF_numprocs, YF_raydepth, YF_AApasses, YF_AAsamples;
232 float GIshadowquality, GIrefinement, GIpower, GIindirpower;
233 float YF_gamma, YF_exposure, YF_raybias, YF_AApixelsize, YF_AAthreshold;
235 char backbuf[160], pic[160], ftype[160];
240 typedef struct GameFraming {
242 char type, pad1, pad2, pad3;
245 #define SCE_GAMEFRAMING_BARS 0
246 #define SCE_GAMEFRAMING_EXTEND 1
247 #define SCE_GAMEFRAMING_SCALE 2
249 typedef struct TimeMarker {
250 struct TimeMarker *next, *prev;
256 typedef struct ToolSettings {
257 // Subdivide Settings
270 // Primitive Settings
275 // Cylinder - Tube - Circle
281 typedef struct Scene {
283 struct Object *camera;
293 float twcent[3]; /* center for transform widget */
294 float twmin[3], twmax[3]; /* boundbox of selection for transform widget */
298 float editbutsize; /* size of normals */
300 short proportional, prop_mode;
303 struct bNodeTree *nodetree;
309 struct GameFraming framing;
311 struct ToolSettings *toolsettings;
313 /* migrate or replace? depends on some internal things... */
314 /* no, is on the right place (ton) */
316 struct AudioData audio;
318 ScriptLink scriptlink;
322 /* none of the dependancy graph vars is mean to be saved */
323 struct DagForest *theDag;
324 short dagisvalid, dagflags;
325 short dirty, recalc; /* recalc = counterpart of ob->recalc */
329 /* **************** RENDERDATA ********************* */
333 #define R_BACKBUFANIM 2
335 #define R_FRONTBUFANIM 8
339 #define R_SHADOW 0x0002
340 #define R_GAMMA 0x0004
341 #define R_ORTHO 0x0008
342 #define R_ENVMAP 0x0010
343 #define R_EDGE 0x0020
344 #define R_FIELDS 0x0040
345 #define R_FIELDSTILL 0x0080
346 #define R_RADIO 0x0100
347 #define R_BORDER 0x0200
348 #define R_PANORAMA 0x0400
349 #define R_MOVIECROP 0x0800
350 #define R_COSMO 0x1000
351 #define R_ODDFIELD 0x2000
352 #define R_MBLUR 0x4000
353 #define R_UNIFIED 0x8000
354 #define R_RAYTRACE 0x10000
355 /* R_GAUSS is obsolete, but used to retrieve setting from old files */
356 #define R_GAUSS 0x20000
357 #define R_FBUF 0x40000
358 #define R_THREADS 0x80000
359 #define R_ZBLUR 0x100000
362 #define R_FILTER_BOX 0
363 #define R_FILTER_TENT 1
364 #define R_FILTER_QUAD 2
365 #define R_FILTER_CUBIC 3
366 #define R_FILTER_CATROM 4
367 #define R_FILTER_GAUSS 5
368 #define R_FILTER_MITCH 6
370 /* yafray: renderer flag (not only exclusive to yafray) */
375 #define R_DOSEQ 0x0001
376 #define R_BG_RENDER 0x0002
377 /* passepartout is camera option now, keep this for backward compatibility */
378 #define R_PASSEPARTOUT 0x0004
380 #define R_EXTENSION 0x0010
381 #define R_NODE_PREVIEW 0x0020
382 #define R_DOCOMP 0x0040
386 #define R_ALPHAPREMUL 1
390 #define R_PLANES24 24
391 #define R_PLANES32 32
406 #define R_AVICODEC 18
407 #define R_QUICKTIME 19
413 /* subimtype, flag options for imtype */
414 #define R_OPENEXR_HALF 1
415 #define R_OPENEXR_ZBUF 2
418 /* **************** SCENE ********************* */
419 #define RAD_PHASE_PATCHES 1
420 #define RAD_PHASE_FACES 2
422 /* base->flag is in DNA_object_types.h */
425 #define SCE_ADDSCENAME 1
427 /* sce->selectmode */
428 #define SCE_SELECT_VERTEX 1
429 #define SCE_SELECT_EDGE 2
430 #define SCE_SELECT_FACE 4
436 /* sce->recalc (now in use by previewrender) */
437 #define SCE_PRV_CHANGED 1
439 /* sce->prop_mode (proportional falloff) */
440 #define PROP_SMOOTH 0
441 #define PROP_SPHERE 1
447 /* return flag next_object function */
456 #define AUDIO_SCRUB 4