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:
authorJason Hays <jason_hays22@mymail.eku.edu>2011-06-27 21:21:08 +0400
committerJason Hays <jason_hays22@mymail.eku.edu>2011-06-27 21:21:08 +0400
commit84ea89e25feaeff8eeaf5ebe35c0a76203670569 (patch)
treeb85158536330b76a9b7445028e04a06d7579ea09 /source/blender/makesdna
parent1876b592daffb86a60890b9f8db55d676d7cae1c (diff)
parent8e90ba3b201f58496b3bec39d98963ab77182736 (diff)
Merged from trunk with revision range 36835-37865,
(No conflicts had to be manually resolved) Gave weight paint a basic ability to draw edges and vertices with an option (with colors for selected/unselected), but I didn't make any vertex selection functions available in weight paint mode yet (tested with edit mode for now).
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_actuator_types.h2
-rw-r--r--source/blender/makesdna/DNA_lattice_types.h2
-rw-r--r--source/blender/makesdna/DNA_object_fluidsim.h5
-rw-r--r--source/blender/makesdna/DNA_object_types.h9
-rw-r--r--source/blender/makesdna/DNA_particle_types.h2
-rw-r--r--source/blender/makesdna/DNA_scene_types.h26
-rw-r--r--source/blender/makesdna/DNA_screen_types.h1
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h45
-rw-r--r--source/blender/makesdna/DNA_space_types.h25
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h6
-rw-r--r--source/blender/makesdna/intern/CMakeLists.txt7
-rw-r--r--source/blender/makesdna/intern/makesdna.c21
12 files changed, 82 insertions, 69 deletions
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_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_object_fluidsim.h b/source/blender/makesdna/DNA_object_fluidsim.h
index 6f4c16cb7f3..578bf8dd415 100644
--- a/source/blender/makesdna/DNA_object_fluidsim.h
+++ b/source/blender/makesdna/DNA_object_fluidsim.h
@@ -69,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) */
@@ -161,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_types.h b/source/blender/makesdna/DNA_object_types.h
index 6938e3bc311..b1b3e779824 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -252,12 +252,11 @@ 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 */
@@ -293,10 +292,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 */
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index 09053848b28..aace8156e9d 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -168,7 +168,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 0e4b1e60f9a..4f2dfa49b1e 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -253,19 +253,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 +315,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 +338,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;
@@ -734,12 +723,13 @@ typedef struct ToolSettings {
short snap_flag, snap_target;
short proportional, prop_mode;
char proportional_objects; /* proportional edit, object mode */
- char pad[7];
+ char pad[3];
int auto_normalize; /*auto normalizing mode in wpaint*/
//Jason
int multipaint; /* paint multiple bones in wpaint */
+ int wp_vert_sel; /* selectable vertices in wpaint */
short sculpt_paint_settings; /* user preferences for sculpt and paint */
short pad1;
@@ -1012,13 +1002,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
@@ -1084,6 +1075,7 @@ typedef struct Scene {
#define SCE_SNAP_ROTATE 2
#define SCE_SNAP_PEEL_OBJECT 4
#define SCE_SNAP_PROJECT 8
+#define SCE_SNAP_PROJECT_NO_SELF 16
/* toolsettings->snap_target */
#define SCE_SNAP_TARGET_CLOSEST 0
#define SCE_SNAP_TARGET_CENTER 1
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 f89cc9d518a..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)
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index e120cd14775..2b039060e47 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -696,18 +696,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)
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 1057eeae40f..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 */
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 07ee084f976..80299d44a78 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -670,6 +670,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);
}
}
@@ -713,7 +715,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) {
@@ -743,7 +750,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) ) {
@@ -855,12 +867,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... */