Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesdna/DNA_scene_types.h')
-rw-r--r--source/blender/makesdna/DNA_scene_types.h237
1 files changed, 145 insertions, 92 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index b8a734b6e94..6f88a98fee8 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -33,11 +33,11 @@
extern "C" {
#endif
+#include "DNA_brush_types.h"
#include "DNA_vec_types.h"
#include "DNA_listBase.h"
#include "DNA_scriptlink_types.h"
#include "DNA_ID.h"
-#include "DNA_scriptlink_types.h"
struct Radio;
struct Object;
@@ -45,7 +45,9 @@ struct World;
struct Scene;
struct Image;
struct Group;
+struct Text;
struct bNodeTree;
+struct AnimData;
typedef struct Base {
struct Base *next, *prev;
@@ -167,7 +169,8 @@ typedef struct RenderData {
struct AviCodecData *avicodecdata;
struct QuicktimeCodecData *qtcodecdata;
struct FFMpegCodecData ffcodecdata;
-
+ struct AudioData audio; /* new in 2.5 */
+
int cfra, sfra, efra; /* frames as in 'images' */
int psfra, pefra; /* start+end frames of preview range */
@@ -314,6 +317,14 @@ typedef struct RenderData {
/* jpeg2000 */
short jp2_preset, jp2_depth;
int rpad3;
+
+ /* Dome variables */
+ short domeres, domemode;
+ short domeangle, pad9;
+ float domesize;
+ float domeresbuf;
+ struct Text *dometext;
+
} RenderData;
/* control render convert and shading engine */
@@ -352,6 +363,8 @@ typedef struct ImagePaintSettings {
/* for projection painting only */
short seam_bleed,normal_angle;
+
+ void *paintcursor; /* wm handle */
} ImagePaintSettings;
typedef struct ParticleBrushData {
@@ -366,6 +379,7 @@ typedef struct ParticleEditSettings {
short brushtype;
ParticleBrushData brush[7]; /* 7 = PE_TOT_BRUSH */
+ void *paintcursor; /* runtime */
float emitterdist;
int draw_timed;
@@ -377,7 +391,52 @@ typedef struct TransformOrientation {
float mat[3][3];
} TransformOrientation;
+struct SculptSession;
+typedef struct Sculpt
+{
+ /* Note! a deep copy of this struct must be done header_info.c's copy_scene function */
+ /* Data stored only from entering sculptmode until exiting sculptmode */
+ struct SculptSession *session;
+ struct Brush *brush;
+
+ /* For rotating around a pivot point */
+ float pivot[3];
+ int flags;
+ /* For the Brush Shape */
+ char texsep;
+ /* Control tablet input */
+ char tablet_size, tablet_strength;
+ char pad[5];
+} Sculpt;
+
+typedef struct VPaint {
+ struct Brush *brush;
+
+ float gamma, mul; /* should become part of struct Brush? */
+ short mode, flag;
+ int tot; /* allocation size of prev buffers */
+ unsigned int *vpaint_prev; /* previous mesh colors */
+ struct MDeformVert *wpaint_prev; /* previous vertex weights */
+
+ void *paintcursor; /* wm handle */
+} VPaint;
+
+/* VPaint flag */
+#define VP_COLINDEX 1
+#define VP_AREA 2
+#define VP_SOFT 4
+#define VP_NORMALS 8
+#define VP_SPRAY 16
+#define VP_MIRROR_X 32
+#define VP_HARD 64
+#define VP_ONLYVGROUP 128
+
+
typedef struct ToolSettings {
+ VPaint *vpaint; /* vertex paint */
+ VPaint *wpaint; /* weight paint */
+ Sculpt *sculpt;
+
/* Subdivide Settings */
short cornertype;
short editbutflag;
@@ -403,9 +462,13 @@ typedef struct ToolSettings {
short unwrapper;
float uvcalc_radius;
float uvcalc_cubesize;
+ float uvcalc_margin;
+ float pad;
short uvcalc_mapdir;
short uvcalc_mapalign;
short uvcalc_flag;
+ short uv_flag, uv_selectmode;
+ short uv_pad[2];
/* Auto-IK */
short autoik_chainlen;
@@ -416,6 +479,9 @@ typedef struct ToolSettings {
/* Particle Editing */
struct ParticleEditSettings particle;
+ /* Transform Proportional Area of Effect */
+ float proportional_size;
+
/* Select Group Threshold */
float select_thresh;
@@ -447,6 +513,7 @@ typedef struct ToolSettings {
char skgen_postpro_passes;
char skgen_subdivisions[3];
char skgen_multi_level;
+ int skgen_pad;
/* Skeleton Sketching */
struct Object *skgen_template;
@@ -463,65 +530,17 @@ typedef struct ToolSettings {
char pad3[2];
} ToolSettings;
-/* Used by all brushes to store their properties, which can be directly set
- by the interface code. Note that not all properties are actually used by
- all the brushes. */
-typedef struct BrushData
-{
- short size;
- char strength, dir; /* Not used for smooth brush */
- char view;
- char flag;
- char pad[2];
-} BrushData;
-
-struct SculptSession;
-typedef struct SculptData
-{
- /* Note! all pointers in this struct must be duplicated header_info.c's copy_scene function */
-
- /* Data stored only from entering sculptmode until exiting sculptmode */
- struct SculptSession *session;
-
- /* Pointers to all of sculptmodes's textures */
- struct MTex *mtex[18];
-
- /* Editable brush shape */
- struct CurveMapping *cumap;
-
- /* Settings for each brush */
- BrushData drawbrush, smoothbrush, pinchbrush, inflatebrush, grabbrush, layerbrush, flattenbrush;
-
- /* For rotating around a pivot point */
- float pivot[3];
-
- short brush_type;
-
- /* For the Brush Shape */
- short texact, texnr;
- short spacing;
- char texrept;
- char texfade;
- char texsep;
+typedef struct bStats {
+ /* scene totals for visible layers */
+ int totobj, totlamp, totobjsel, totcurve, totmesh, totarmature;
+ int totvert, totface;
+} bStats;
- char averaging;
- char flags;
-
- /* Control tablet input */
- char tablet_size, tablet_strength;
-
- /* Symmetry is separate from the other BrushData because the same
- settings are always used for all brush types */
- char symm;
-
- /* Added to store if the 'Rake' setting has been set */
- char rake;
- char axislock;
- char pad[2];
-} SculptData;
typedef struct Scene {
ID id;
+ struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
+
struct Object *camera;
struct World *world;
@@ -530,6 +549,7 @@ typedef struct Scene {
ListBase base;
struct Base *basact;
+ struct Object *obedit; /* name replaces old G.obedit */
float cursor[3];
float twcent[3]; /* center for transform widget */
@@ -540,9 +560,10 @@ typedef struct Scene {
float editbutsize; /* size of normals */
short selectmode; /* for mesh only! */
short proportional, prop_mode;
- short automerge, pad5, pad6;
+ short automerge, pad5;
- short autokey_mode; /* mode for autokeying (defines in DNA_userdef_types.h */
+ short flag; /* various settings */
+ short autokey_mode; /* mode for autokeying (defines in DNA_userdef_types.h) */
short use_nodes;
@@ -553,12 +574,13 @@ typedef struct Scene {
struct GameFraming framing;
- struct ToolSettings *toolsettings;
+ struct ToolSettings *toolsettings; /* default allocated now */
+ struct SceneStats *stats; /* default allocated now */
/* migrate or replace? depends on some internal things... */
/* no, is on the right place (ton) */
struct RenderData r;
- struct AudioData audio;
+ struct AudioData audio; /* DEPRICATED 2.5 */
ScriptLink scriptlink;
@@ -573,12 +595,12 @@ typedef struct Scene {
short dagisvalid, dagflags;
short pad4, recalc; /* recalc = counterpart of ob->recalc */
- /* Sculptmode data */
- struct SculptData sculptdata;
-
/* frame step. */
int frame_step;
- int pad;
+
+ /* User-Defined KeyingSets */
+ int active_keyingset; /* index of the active KeyingSet. first KeyingSet has index 1, 'none' active is 0, 'add new' is -1 */
+ ListBase keyingsets; /* KeyingSets for the given frame */
} Scene;
@@ -734,6 +756,37 @@ typedef struct Scene {
#define R_BAKE_SPACE_TANGENT 3
/* **************** SCENE ********************* */
+
+/* for general use */
+#define MAXFRAME 300000
+#define MAXFRAMEF 300000.0f
+
+#define MINFRAME 1
+#define MINFRAMEF 1.0
+
+/* depricate this! */
+#define TESTBASE(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
+#define TESTBASELIB(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
+#define TESTBASELIB_BGMODE(base) ( ((base)->flag & SELECT) && ((base)->lay & (v3d ? v3d->lay : scene->lay)) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
+#define BASE_SELECTABLE(v3d, base) ((base->lay & v3d->lay) && (base->object->restrictflag & (OB_RESTRICT_SELECT|OB_RESTRICT_VIEW))==0)
+#define FIRSTBASE scene->base.first
+#define LASTBASE scene->base.last
+#define BASACT (scene->basact)
+#define OBACT (BASACT? BASACT->object: 0)
+
+#define ID_NEW(a) if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid
+#define ID_NEW_US(a) if( (a)->id.newid) {(a)= (void *)(a)->id.newid; (a)->id.us++;}
+#define ID_NEW_US2(a) if( ((ID *)a)->newid) {(a)= ((ID *)a)->newid; ((ID *)a)->us++;}
+#define CFRA (scene->r.cfra)
+#define F_CFRA ((float)(scene->r.cfra))
+#define SFRA (scene->r.sfra)
+#define EFRA (scene->r.efra)
+#define PSFRA ((scene->r.psfra != 0)? (scene->r.psfra): (scene->r.sfra))
+#define PEFRA ((scene->r.psfra != 0)? (scene->r.pefra): (scene->r.efra))
+#define FRA2TIME(a) ((((double) scene->r.frs_sec_base) * (a)) / scene->r.frs_sec)
+#define TIME2FRA(a) ((((double) scene->r.frs_sec) * (a)) / scene->r.frs_sec_base)
+#define FPS (((double) scene->r.frs_sec) / scene->r.frs_sec_base)
+
#define RAD_PHASE_PATCHES 1
#define RAD_PHASE_FACES 2
@@ -776,6 +829,11 @@ typedef struct Scene {
#define PROP_CONST 5
#define PROP_RANDOM 6
+/* sce->flag */
+#define SCE_DS_SELECTED (1<<0)
+#define SCE_DS_COLLAPSED (1<<1)
+
+
/* return flag next_object function */
#define F_START 0
#define F_SCENE 1
@@ -790,33 +848,18 @@ typedef struct Scene {
#define FFMPEG_MULTIPLEX_AUDIO 1
#define FFMPEG_AUTOSPLIT_OUTPUT 2
-/* Sculpt brush flags */
-#define SCULPT_BRUSH_AIRBRUSH 1
-#define SCULPT_BRUSH_ANCHORED 2
-/* SculptData.flags */
-#define SCULPT_INPUT_SMOOTH 1
-#define SCULPT_DRAW_FAST 2
-#define SCULPT_DRAW_BRUSH 4
-/* SculptData.brushtype */
-#define DRAW_BRUSH 1
-#define SMOOTH_BRUSH 2
-#define PINCH_BRUSH 3
-#define INFLATE_BRUSH 4
-#define GRAB_BRUSH 5
-#define LAYER_BRUSH 6
-#define FLATTEN_BRUSH 7
-/* SculptData.texrept */
-#define SCULPTREPT_DRAG 1
-#define SCULPTREPT_TILE 2
-#define SCULPTREPT_3D 3
-
-#define SYMM_X 1
-#define SYMM_Y 2
-#define SYMM_Z 4
-
-#define AXISLOCK_X 1
-#define AXISLOCK_Y 2
-#define AXISLOCK_Z 4
+/* Sculpt.flags */
+typedef enum SculptFlags {
+ SCULPT_SYMM_X = 1,
+ SCULPT_SYMM_Y = 2,
+ SCULPT_SYMM_Z = 4,
+ SCULPT_INPUT_SMOOTH = 8,
+ SCULPT_DRAW_FAST = 16,
+ SCULPT_DRAW_BRUSH = 32,
+ SCULPT_LOCK_X = 64,
+ SCULPT_LOCK_Y = 128,
+ SCULPT_LOCK_Z = 256
+} SculptFlags;
/* toolsettings->imagepaint_flag */
#define IMAGEPAINT_DRAWING 1
@@ -837,6 +880,16 @@ typedef struct Scene {
#define UVCALC_NO_ASPECT_CORRECT 2 /* would call this UVCALC_ASPECT_CORRECT, except it should be default with old file */
#define UVCALC_TRANSFORM_CORRECT 4 /* adjust UV's while transforming to avoid distortion */
+/* toolsettings->uv_flag */
+#define UV_SYNC_SELECTION 1
+#define UV_SHOW_SAME_IMAGE 2
+
+/* toolsettings->uv_selectmode */
+#define UV_SELECT_VERTEX 1
+#define UV_SELECT_EDGE 2 /* not implemented */
+#define UV_SELECT_FACE 4
+#define UV_SELECT_ISLAND 8
+
/* toolsettings->edge_mode */
#define EDGE_MODE_SELECT 0
#define EDGE_MODE_TAG_SEAM 1