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')
-rw-r--r--source/blender/makesdna/DNA_ID.h10
-rw-r--r--source/blender/makesdna/DNA_actuator_types.h2
-rw-r--r--source/blender/makesdna/DNA_camera_types.h14
-rw-r--r--source/blender/makesdna/DNA_image_types.h6
-rw-r--r--source/blender/makesdna/DNA_lattice_types.h2
-rw-r--r--source/blender/makesdna/DNA_material_types.h2
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h1
-rw-r--r--source/blender/makesdna/DNA_node_types.h4
-rw-r--r--source/blender/makesdna/DNA_object_fluidsim.h20
-rw-r--r--source/blender/makesdna/DNA_object_force.h2
-rw-r--r--source/blender/makesdna/DNA_object_types.h13
-rw-r--r--source/blender/makesdna/DNA_particle_types.h5
-rw-r--r--source/blender/makesdna/DNA_scene_types.h33
-rw-r--r--source/blender/makesdna/DNA_screen_types.h1
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h48
-rw-r--r--source/blender/makesdna/DNA_space_types.h28
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h8
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h34
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h6
-rw-r--r--source/blender/makesdna/intern/CMakeLists.txt7
-rw-r--r--source/blender/makesdna/intern/makesdna.c21
21 files changed, 156 insertions, 111 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 267283ee47a..4cf9f47041b 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -123,12 +123,14 @@ typedef struct Library {
struct Library *parent; /* set for indirectly linked libs, used in the outliner and while reading */
} Library;
-#define PREVIEW_MIPMAPS 2
-#define PREVIEW_MIPMAP_ZERO 0
-#define PREVIEW_MIPMAP_LARGE 1
+enum eIconSizes {
+ ICON_SIZE_ICON,
+ ICON_SIZE_PREVIEW,
+};
+#define NUM_ICON_SIZES (ICON_SIZE_PREVIEW + 1)
typedef struct PreviewImage {
- /* All values of 2 are really PREVIEW_MIPMAPS */
+ /* All values of 2 are really NUM_ICON_SIZES */
unsigned int w[2];
unsigned int h[2];
short changed[2];
diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h
index 683d8142cc9..887a0300ee2 100644
--- a/source/blender/makesdna/DNA_actuator_types.h
+++ b/source/blender/makesdna/DNA_actuator_types.h
@@ -133,7 +133,7 @@ typedef struct bIpoActuator {
typedef struct bCameraActuator {
struct Object *ob;
float height, min, max;
- float pad;
+ float damping;
short pad1, axis;
float pad2;
} bCameraActuator ;
diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h
index 4ebd7318ea8..952b4e799b5 100644
--- a/source/blender/makesdna/DNA_camera_types.h
+++ b/source/blender/makesdna/DNA_camera_types.h
@@ -47,7 +47,9 @@ typedef struct Camera {
ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
- short type, flag;
+ char type; /* CAM_PERSP or CAM_ORTHO */
+ char dtx; /* draw type extra */
+ short flag;
float passepartalpha;
float clipsta, clipend;
float lens, ortho_scale, drawsize;
@@ -69,6 +71,16 @@ typedef struct Camera {
#define CAM_PERSP 0
#define CAM_ORTHO 1
+/* dtx */
+#define CAM_DTX_CENTER 1
+#define CAM_DTX_CENTER_DIAG 2
+#define CAM_DTX_THIRDS 4
+#define CAM_DTX_GOLDEN 8
+#define CAM_DTX_GOLDEN_TRI_A 16
+#define CAM_DTX_GOLDEN_TRI_B 32
+#define CAM_DTX_HARMONY_TRI_A 64
+#define CAM_DTX_HARMONY_TRI_B 128
+
/* flag */
#define CAM_SHOWLIMITS 1
#define CAM_SHOWMIST 2
diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h
index 99ed2319415..dd033339ca4 100644
--- a/source/blender/makesdna/DNA_image_types.h
+++ b/source/blender/makesdna/DNA_image_types.h
@@ -102,7 +102,8 @@ typedef struct Image {
short animspeed;
/* for generated images */
- short gen_x, gen_y, gen_type;
+ short gen_x, gen_y;
+ char gen_type, gen_flag;
/* display aspect - for UV editing images resized for faster openGL display */
float aspx, aspy;
@@ -136,5 +137,8 @@ typedef struct Image {
#define IMA_MAX_RENDER_TEXT 512
#define IMA_MAX_RENDER_SLOT 8
+/* gen_flag */
+#define IMA_GEN_FLOAT 1
+
#endif
diff --git a/source/blender/makesdna/DNA_lattice_types.h b/source/blender/makesdna/DNA_lattice_types.h
index 662ef9e8a45..a9e745b8148 100644
--- a/source/blender/makesdna/DNA_lattice_types.h
+++ b/source/blender/makesdna/DNA_lattice_types.h
@@ -83,5 +83,7 @@ typedef struct Lattice {
#define LT_DS_EXPAND 4
+#define LT_INDEX(lt, u, v, w) ((w) * ((lt)->pntsu * (lt)->pntsv) + ((v) * (lt)->pntsu) + (u))
+
#endif
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index 1489593f7f6..060b1bf42d1 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -161,7 +161,7 @@ typedef struct Material {
int mapto_textured; /* render-time cache to optimise texture lookups */
short shadowonly_flag; /* "shadowsonly" type */
- short pad;
+ short index; /* custom index for render passes */
ListBase gpumaterial; /* runtime */
} Material;
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index d2d8e014015..3787675f339 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -624,6 +624,7 @@ typedef struct MultiresModifierData {
typedef enum {
eMultiresModifierFlag_ControlEdges = (1<<0),
+ eMultiresModifierFlag_PlainUv = (1<<1),
} MultiresModifierFlag;
typedef struct FluidsimModifierData {
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 03387c3a63a..efaf30b02f6 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -179,6 +179,10 @@ typedef struct bNodeLink {
} bNodeLink;
+
+/* link->flag */
+#define NODE_LINKFLAG_HILITE 1
+
/* the basis for a Node tree, all links and nodes reside internal here */
/* only re-usable node trees are in the library though, materials and textures allocate own tree struct */
typedef struct bNodeTree {
diff --git a/source/blender/makesdna/DNA_object_fluidsim.h b/source/blender/makesdna/DNA_object_fluidsim.h
index e8360b99d69..578bf8dd415 100644
--- a/source/blender/makesdna/DNA_object_fluidsim.h
+++ b/source/blender/makesdna/DNA_object_fluidsim.h
@@ -42,7 +42,10 @@ extern "C" {
struct Mesh;
struct Ipo;
-struct MVert;
+
+typedef struct FluidVertexVelocity {
+ float vel[3];
+} FluidVertexVelocity;
typedef struct FluidsimSettings {
struct FluidsimModifierData *fmd; /* for fast RNA access */
@@ -66,7 +69,7 @@ typedef struct FluidsimSettings {
short viscosityMode;
short viscosityExponent;
/* gravity strength */
- float gravx,gravy,gravz;
+ float grav[3];
/* anim start end time (in seconds) */
float animStart, animEnd;
/* bake start end time (in blender frames) */
@@ -82,8 +85,6 @@ typedef struct FluidsimSettings {
/* store pointer to original mesh (for replacing the current one) */
struct Mesh *orgMesh;
- /* pointer to the currently loaded fluidsim mesh */
- struct Mesh *meshSurface;
/* a mesh to display the bounding box used for simulation */
struct Mesh *meshBB;
@@ -122,8 +123,10 @@ typedef struct FluidsimSettings {
/* testing vars */
float farFieldSize;
- /* save fluidsurface normals in mvert.no, and surface vertex velocities (if available) in mvert.co */
- struct MVert *meshSurfNormals;
+ /* vertex velocities of simulated fluid mesh */
+ struct FluidVertexVelocity *meshVelocities;
+ /* number of vertices in simulated fluid mesh */
+ int totvert;
/* Fluid control settings */
float cpsTimeStart;
@@ -136,6 +139,8 @@ typedef struct FluidsimSettings {
float velocityforceRadius;
int lastgoodframe;
+
+ int pad;
} FluidsimSettings;
@@ -156,6 +161,9 @@ typedef struct FluidsimSettings {
#define OB_FSBND_FREESLIP (1<<(OB_TYPEFLAG_START+4))
#define OB_FSINFLOW_LOCALCOORD (1<<(OB_TYPEFLAG_START+5))
+/* surface generation flag (part of enabling chapter 6 of "Free Surface Flows with Moving and Deforming Objects for LBM") */
+#define OB_FSSG_NOOBS (1<<(OB_TYPEFLAG_START+6))
+
// guiDisplayMode particle flags
#define OB_FSDOM_GEOM 1
#define OB_FSDOM_PREVIEW 2
diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h
index 37568a22f54..fc8ce1b5820 100644
--- a/source/blender/makesdna/DNA_object_force.h
+++ b/source/blender/makesdna/DNA_object_force.h
@@ -420,7 +420,7 @@ typedef struct SoftBody {
#define OB_SB_SELF 512
#define OB_SB_FACECOLL 1024
#define OB_SB_EDGECOLL 2048
-#define OB_SB_COLLFINAL 4096
+#define OB_SB_COLLFINAL 4096 /* deprecated */
#define OB_SB_BIG_UI 8192
#define OB_SB_AERO_ANGLE 16384
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 7c6affa1ff2..639bb7e2cec 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -251,15 +251,17 @@ typedef struct Object {
struct FluidsimSettings *fluidsimSettings; /* if fluidsim enabled, store additional settings */
struct DerivedMesh *derivedDeform, *derivedFinal;
- int lastDataMask; /* the custom data layer mask that was last used to calculate derivedDeform and derivedFinal */
+ unsigned int lastDataMask; /* the custom data layer mask that was last used to calculate derivedDeform and derivedFinal */
+ unsigned int customdata_mask; /* (extra) custom data layer mask to use for creating derivedmesh, set by depsgraph */
unsigned int state; /* bit masks of game controllers that are active */
unsigned int init_state; /* bit masks of initial state as recorded by the users */
- int pad2;
-
ListBase gpulamp; /* runtime, for lamps only */
ListBase pc_ids;
ListBase *duplilist; /* for temporary dupli list storage, only for use by RNA API */
+
+ float ima_ofs[2]; /* offset for image empties */
+ char pad3[8];
} Object;
/* Warning, this is not used anymore because hooks are now modifiers */
@@ -289,10 +291,6 @@ typedef struct DupliObject {
float orco[3], uv[2];
} DupliObject;
-/* this work object is defined in object.c */
-extern Object workob;
-
-
/* **************** OBJECT ********************* */
/* used many places... should be specialized */
@@ -400,6 +398,7 @@ extern Object workob;
#define OB_CUBE 5
#define OB_EMPTY_SPHERE 6
#define OB_EMPTY_CONE 7
+#define OB_EMPTY_IMAGE 8
/* boundtype */
#define OB_BOUND_BOX 0
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index 09053848b28..69ee530c0b6 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -89,7 +89,8 @@ typedef struct ParticleDupliWeight {
struct ParticleDupliWeight *next, *prev;
struct Object *ob;
short count;
- short flag, rt[2];
+ short flag;
+ short index, rt; /* only updated on file save and used on file load */
} ParticleDupliWeight;
typedef struct ParticleData {
@@ -168,7 +169,7 @@ typedef struct ParticleSettings {
/* billboards */
short bb_align, bb_uv_split, bb_anim, bb_split_offset;
- float bb_tilt, bb_rand_tilt, bb_offset[2];
+ float bb_tilt, bb_rand_tilt, bb_offset[2], bb_size[2], bb_vel_head, bb_vel_tail;
/* draw color */
float color_vec_max;
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 657bfb1c884..2211f93a8ae 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -201,6 +201,7 @@ typedef struct SceneRenderLayer {
#define SCE_PASS_RAYHITS (1<<15)
#define SCE_PASS_EMIT (1<<16)
#define SCE_PASS_ENVIRONMENT (1<<17)
+#define SCE_PASS_INDEXMA (1<<18)
/* note, srl->passflag is treestore element 'nr' in outliner, short still... */
@@ -253,19 +254,12 @@ typedef struct RenderData {
*/
short yparts;
- short winpos, planes, imtype, subimtype;
-
- /** Mode bits: */
- /* 0: Enable backbuffering for images */
- short bufflag;
- short quality;
+ short planes, imtype, subimtype, quality;
/**
* Render to image editor, fullscreen or to new window.
*/
short displaymode;
-
- short rpad1, rpad2;
/**
* Flags for render settings. Use bit-masking to access the settings.
@@ -322,11 +316,7 @@ typedef struct RenderData {
/**
* Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
*/
- float xasp;
- /**
- * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
- */
- float yasp;
+ float xasp, yasp;
float frs_sec_base;
@@ -349,8 +339,8 @@ typedef struct RenderData {
short bake_normal_space, bake_quad_split;
float bake_maxdist, bake_biasdist, bake_pad;
- /* paths to backbufffer, output */
- char backbuf[160], pic[160];
+ /* path to render output */
+ char pic[240];
/* stamps flags. */
int stamp;
@@ -440,7 +430,8 @@ typedef struct GameData {
/*
* Radius of the activity bubble, in Manhattan length. Objects
* outside the box are activity-culled. */
- float activityBoxRadius; //it's not being used ANYWHERE !!!!!!!!!!!!!!
+ float activityBoxRadius;
+
/*
* bit 3: (gameengine): Activity culling is enabled.
* bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum culling
@@ -457,7 +448,8 @@ typedef struct GameData {
/* stereo/dome mode */
struct GameDome dome;
- short stereoflag, stereomode, xsch, ysch; //xsch and ysch used for backwards compat.
+ short stereoflag, stereomode;
+ short pad2, pad3;
float eyeseparation, pad1;
} GameData;
@@ -1009,13 +1001,14 @@ typedef struct Scene {
#define R_JPEG2K_CINE_PRESET 256
#define R_JPEG2K_CINE_48FPS 512
-
/* bake_mode: same as RE_BAKE_xxx defines */
/* bake_flag: */
#define R_BAKE_CLEAR 1
#define R_BAKE_OSA 2
#define R_BAKE_TO_ACTIVE 4
#define R_BAKE_NORMALIZE 8
+#define R_BAKE_MULTIRES 16
+#define R_BAKE_LORES_MESH 32
/* bake_normal_space */
#define R_BAKE_SPACE_CAMERA 0
@@ -1081,6 +1074,7 @@ typedef struct Scene {
#define SCE_SNAP_ROTATE 2
#define SCE_SNAP_PEEL_OBJECT 4
#define SCE_SNAP_PROJECT 8
+#define SCE_SNAP_NO_SELF 16
/* toolsettings->snap_target */
#define SCE_SNAP_TARGET_CLOSEST 0
#define SCE_SNAP_TARGET_CENTER 1
@@ -1113,7 +1107,8 @@ typedef struct Scene {
#define PROP_SHARP 3
#define PROP_LIN 4
#define PROP_CONST 5
-#define PROP_RANDOM 6
+#define PROP_RANDOM 6
+#define PROP_MODE_MAX 7
/* toolsettings->proportional */
#define PROP_EDIT_OFF 0
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index cd19f4cb3de..b52ed35ddce 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -187,7 +187,6 @@ typedef struct ARegion {
#define AREA_FLAG_DRAWSPLIT_H 16
#define AREA_FLAG_DRAWSPLIT_V 32
-/* If you change EDGEWIDTH, also do the global arrat edcol[] */
#define EDGEWIDTH 1
#define AREAGRID 4
#define AREAMINX 32
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index 22f0c23ea9b..3e7654bcf47 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -253,27 +253,30 @@ typedef struct SpeedControlVars {
#define SEQ_NAME_MAXSTR 24
/* seq->flag */
-#define SEQ_LEFTSEL 2
-#define SEQ_RIGHTSEL 4
-#define SEQ_OVERLAP 8
-#define SEQ_FILTERY 16
-#define SEQ_MUTE 32
-#define SEQ_MAKE_PREMUL 64
-#define SEQ_REVERSE_FRAMES 128
-#define SEQ_IPO_FRAME_LOCKED 256
-#define SEQ_EFFECT_NOT_LOADED 512
-#define SEQ_FLAG_DELETE 1024
-#define SEQ_FLIPX 2048
-#define SEQ_FLIPY 4096
-#define SEQ_MAKE_FLOAT 8192
-#define SEQ_LOCK 16384
-#define SEQ_USE_PROXY 32768
-#define SEQ_USE_TRANSFORM 65536
-#define SEQ_USE_CROP 131072
-#define SEQ_USE_COLOR_BALANCE 262144
-#define SEQ_USE_PROXY_CUSTOM_DIR 524288
-#define SEQ_USE_PROXY_CUSTOM_FILE 2097152
-#define SEQ_USE_EFFECT_DEFAULT_FADE 4194304
+#define SEQ_LEFTSEL (1<<1)
+#define SEQ_RIGHTSEL (1<<2)
+#define SEQ_OVERLAP (1<<3)
+#define SEQ_FILTERY (1<<4)
+#define SEQ_MUTE (1<<5)
+#define SEQ_MAKE_PREMUL (1<<6)
+#define SEQ_REVERSE_FRAMES (1<<7)
+#define SEQ_IPO_FRAME_LOCKED (1<<8)
+#define SEQ_EFFECT_NOT_LOADED (1<<9)
+#define SEQ_FLAG_DELETE (1<<10)
+#define SEQ_FLIPX (1<<11)
+#define SEQ_FLIPY (1<<12)
+#define SEQ_MAKE_FLOAT (1<<13)
+#define SEQ_LOCK (1<<14)
+#define SEQ_USE_PROXY (1<<15)
+#define SEQ_USE_TRANSFORM (1<<16)
+#define SEQ_USE_CROP (1<<17)
+#define SEQ_USE_COLOR_BALANCE (1<<18)
+#define SEQ_USE_PROXY_CUSTOM_DIR (1<<19)
+
+#define SEQ_USE_PROXY_CUSTOM_FILE (1<<21)
+#define SEQ_USE_EFFECT_DEFAULT_FADE (1<<22)
+
+#define SEQ_INVALID_EFFECT (1<<31)
/* convenience define for all selection flags */
#define SEQ_ALLSEL (SELECT+SEQ_LEFTSEL+SEQ_RIGHTSEL)
@@ -310,7 +313,8 @@ typedef struct SpeedControlVars {
#define SEQ_COLOR 28
#define SEQ_SPEED 29
#define SEQ_MULTICAM 30
-#define SEQ_EFFECT_MAX 30
+#define SEQ_ADJUSTMENT 31
+#define SEQ_EFFECT_MAX 31
#define STRIPELEM_FAILED 0
#define STRIPELEM_OK 1
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 8272b0d5493..f90bbc7cbba 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -698,18 +698,19 @@ enum FileSortTypeE {
#define FILE_OPENFILE 0
#define FILE_SAVE 1
-/* sfile->flag and simasel->flag */
-#define FILE_SHOWSHORT 1
-#define FILE_RELPATH 2 /* was FILE_STRINGCODE */
-#define FILE_LINK 4
-#define FILE_HIDE_DOT 8
-#define FILE_AUTOSELECT 16
-#define FILE_ACTIVELAY 32
-#define FILE_ATCURSOR 64
-#define FILE_SYNCPOSE 128
-#define FILE_FILTER 256
-#define FILE_BOOKMARKS 512
-#define FILE_GROUP_INSTANCE 1024
+/* sfile->params->flag and simasel->flag */
+#define FILE_SHOWSHORT (1<<0)
+#define FILE_RELPATH (1<<1) /* was FILE_STRINGCODE */
+#define FILE_LINK (1<<2)
+#define FILE_HIDE_DOT (1<<3)
+#define FILE_AUTOSELECT (1<<4)
+#define FILE_ACTIVELAY (1<<5)
+#define FILE_ATCURSOR (1<<6)
+#define FILE_DIRSEL_ONLY (1<<7)
+#define FILE_FILTER (1<<8)
+#define FILE_BOOKMARKS (1<<9)
+#define FILE_GROUP_INSTANCE (1<<10)
+
/* files in filesel list: file types */
#define BLENDERFILE (1<<2)
@@ -755,7 +756,7 @@ enum FileSortTypeE {
#define SI_EDITTILE (1<<1)
#define SI_CLIP_UV (1<<2)
#define SI_DRAWTOOL (1<<3)
-#define SI_DEPRECATED1 (1<<4) /* stick UVs to others in the same location */
+#define SI_NO_DRAWFACES (1<<4)
#define SI_DRAWSHADOW (1<<5)
#define SI_SELACTFACE (1<<6) /* deprecated */
#define SI_DEPRECATED2 (1<<7)
@@ -826,6 +827,7 @@ enum {
#define ST_FIND_WRAP 0x0020
#define ST_FIND_ALL 0x0040
#define ST_SHOW_MARGIN 0x0080
+#define ST_MATCH_CASE 0x0100
/* stext->findstr/replacestr */
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 1be67a4501b..ae57cf3f80b 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -305,7 +305,7 @@ typedef struct UserDef {
int savetime;
char tempdir[160]; // FILE_MAXDIR length
char fontdir[160];
- char renderdir[160];
+ char renderdir[240]; // FILE_MAX length
char textudir[160];
char plugtexdir[160];
char plugseqdir[160];
@@ -374,7 +374,8 @@ typedef struct UserDef {
short scrcastfps; /* frame rate for screencast to be played back */
short scrcastwait; /* milliseconds between screencast snapshots */
- short pad8, pad[3]; /* Value for Dual/Single Column UI */
+ short widget_unit; /* defaults to 20 for 72 DPI setting */
+ short anisotropic_filter;
char versemaster[160];
char verseuser[160];
@@ -384,7 +385,6 @@ typedef struct UserDef {
short autokey_flag; /* flags for autokeying */
short text_render, pad9; /*options for text rendering*/
- float pad10;
struct ColorBand coba_weight; /* from texture.h */
@@ -469,7 +469,7 @@ extern UserDef U; /* from blenkernel blender.c */
#define USER_HIDE_DOT (1 << 16)
#define USER_SHOW_ROTVIEWICON (1 << 17)
#define USER_SHOW_VIEWPORTNAME (1 << 18)
-// old flag for #define USER_KEYINSERTNEED (1 << 19)
+#define USER_CAM_LOCK_NO_PARENT (1 << 19)
#define USER_ZOOM_TO_MOUSEPOS (1 << 20)
#define USER_SHOW_FPS (1 << 21)
#define USER_MMB_PASTE (1 << 22)
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index c9a440522d1..7379493003d 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -96,10 +96,13 @@ typedef struct RegionView3D {
float zfac; /* initgrabz() result */
float camdx, camdy; /* camera view offsets, 1.0 = viewplane moves entire width/height */
float pixsize; /* runtime only */
- float ofs[3]; /* view center & orbit pivot, negative of worldspace location */
- short camzoom;
+ float ofs[3]; /* view center & orbit pivot, negative of worldspace location,
+ * also matches -viewinv[3][0:3] in ortho mode.*/
+ short camzoom; /* viewport zoom on the camera frame, see BKE_screen_view3d_zoom_to_fac */
short twdrawflag;
- int pad;
+ char is_persp; /* check if persp/ortho view, since 'persp' cant be used for this since
+ * it can have cameras assigned as well. (only set in setwinmatrixview3d) */
+ char pad[3];
short rflag, viewlock;
short persp;
@@ -163,26 +166,21 @@ typedef struct View3D {
* OB_SHADED or OB_TEXTURE */
short drawtype;
short ob_centre_cursor; /* optional bool for 3d cursor to define center */
- short scenelock, around, pad3;
+ short scenelock, around;
short flag, flag2;
- short pivot_last; /* pivot_last is for rotating around the last edited element */
-
float lens, grid;
- float gridview; /* XXX deprecated, now in RegionView3D */
float near, far;
float ofs[3]; /* XXX deprecated */
float cursor[3];
- short gridlines, pad4;
- short gridflag;
- short gridsubdiv; /* Number of subdivisions in the grid between each highlighted grid line */
short modeselect;
- short keyflags; /* flags for display of keyframes */
-
+ short gridlines;
+ short gridsubdiv; /* Number of subdivisions in the grid between each highlighted grid line */
+ char gridflag;
+
/* transform widget info */
- short twtype, twmode, twflag;
- short twdrawflag; /* XXX deprecated */
+ char twtype, twmode, twflag, pad2[2];
/* afterdraw, for xray & transparent */
struct ListBase afterdraw_transp;
@@ -195,7 +193,7 @@ typedef struct View3D {
char ndofmode; /* mode of transform for 6DOF devices -1 not found, 0 normal, 1 fly, 2 ob transform */
char ndoffilter; /* filter for 6DOF devices 0 normal, 1 dominant */
- void *properties_storage; /* Nkey panel stores stuff here, not in file */
+ void *properties_storage; /* Nkey panel stores stuff here (runtime only!) */
/* XXX depricated? */
struct bGPdata *gpd; /* Grease-Pencil Data (annotation layers) */
@@ -231,10 +229,11 @@ typedef struct View3D {
#define RV3D_BOXCLIP 4
/* RegionView3d->view */
-#define RV3D_VIEW_FRONT 1
+#define RV3D_VIEW_USER 0
+#define RV3D_VIEW_FRONT 1
#define RV3D_VIEW_BACK 2
#define RV3D_VIEW_LEFT 3
-#define RV3D_VIEW_RIGHT 4
+#define RV3D_VIEW_RIGHT 4
#define RV3D_VIEW_TOP 5
#define RV3D_VIEW_BOTTOM 6
#define RV3D_VIEW_PERSPORTHO 7
@@ -244,6 +243,7 @@ typedef struct View3D {
#define V3D_RENDER_OVERRIDE 4
#define V3D_SOLID_TEX 8
#define V3D_DISPGP 16
+#define V3D_LOCK_CAMERA 32
/* View3D->around */
#define V3D_CENTER 0
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index 3072c2c3430..31e59f18626 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -316,10 +316,4 @@ typedef struct wmOperator {
/* wmOperator flag */
#define OP_GRAB_POINTER 1
-typedef enum wmRadialControlMode {
- WM_RADIALCONTROL_SIZE,
- WM_RADIALCONTROL_STRENGTH,
- WM_RADIALCONTROL_ANGLE
-} wmRadialControlMode;
-
#endif /* DNA_WINDOWMANAGER_TYPES_H */
diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt
index bb95e2c0fbc..429db63b526 100644
--- a/source/blender/makesdna/intern/CMakeLists.txt
+++ b/source/blender/makesdna/intern/CMakeLists.txt
@@ -58,6 +58,11 @@ add_custom_command(
# Build bf_dna library
set(INC
+
+)
+
+set(INC_SYS
+
)
set(SRC
@@ -66,4 +71,4 @@ set(SRC
${SRC_DNA_INC}
)
-blender_add_lib(bf_dna "${SRC}" "${INC}")
+blender_add_lib(bf_dna "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index 4f26a406dda..77092dacc06 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -671,6 +671,8 @@ int arraysize(char *astr, int len)
}
else if( str[a]==']' && cp) {
str[a]= 0;
+ /* if 'cp' is a preprocessor definition, it will evaluate to 0,
+ * the caller needs to check for this case and throw an error */
mul*= atoi(cp);
}
}
@@ -714,7 +716,12 @@ static int calculate_structlens(int firststruct)
/* has the name an extra length? (array) */
mul= 1;
if( cp[namelen-1]==']') mul= arraysize(cp, namelen);
-
+
+ if (mul == 0) {
+ printf("Zero array size found or could not parse %s: '%.*s'\n", types[structtype], namelen + 1, cp);
+ dna_error = 1;
+ }
+
/* 4-8 aligned/ */
if(sizeof(void *) == 4) {
if (len % 4) {
@@ -744,7 +751,12 @@ static int calculate_structlens(int firststruct)
/* has the name an extra length? (array) */
mul= 1;
if( cp[namelen-1]==']') mul= arraysize(cp, namelen);
-
+
+ if (mul == 0) {
+ printf("Zero array size found or could not parse %s: '%.*s'\n", types[structtype], namelen + 1, cp);
+ dna_error = 1;
+ }
+
/* struct alignment */
if(type >= firststruct) {
if(sizeof(void *)==8 && (len % 8) ) {
@@ -856,12 +868,13 @@ void dna_write(FILE *file, void *pntr, int size)
void printStructLenghts(void)
{
- int a, unknown= nr_structs, lastunknown, structtype;
+ int a, unknown= nr_structs, structtype;
+ /*int lastunknown;*/ /*UNUSED*/
short *structpoin;
printf("\n\n*** All detected structs:\n");
while(unknown) {
- lastunknown= unknown;
+ /*lastunknown= unknown;*/ /*UNUSED*/
unknown= 0;
/* check all structs... */