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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-09-15 04:15:24 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-09-15 04:15:24 +0400
commit41729976753523ee08a0afaf6a26b6caf3dee1d6 (patch)
treeba264fba22084f44eb50b952f375715f501acff9 /source/blender/makesdna
parenta5f8298ea5d13d7707bc0cbf0722013276bab9d6 (diff)
parenta425790065fedb2ae49f1b79770945d8528790d9 (diff)
Merged changes in the trunk up to revision 50607.
Conflicts resolved: source/blender/blenloader/intern/readfile.c
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_ipo_types.h4
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h3
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h1
-rw-r--r--source/blender/makesdna/DNA_node_types.h18
-rw-r--r--source/blender/makesdna/DNA_scene_types.h5
-rw-r--r--source/blender/makesdna/DNA_screen_types.h9
-rw-r--r--source/blender/makesdna/DNA_sdna_types.h7
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h12
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h1
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h4
-rw-r--r--source/blender/makesdna/intern/makesdna.c100
11 files changed, 76 insertions, 88 deletions
diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h
index e3ab6b4a7db..6bf8dbbe73a 100644
--- a/source/blender/makesdna/DNA_ipo_types.h
+++ b/source/blender/makesdna/DNA_ipo_types.h
@@ -65,8 +65,8 @@ typedef struct IpoDriver {
typedef struct IpoCurve {
struct IpoCurve *next, *prev;
- struct BPoint *bp; /* array of BPoints (sizeof(BPoint)*totvert) - i.e. baked/imported data */
- struct BezTriple *bezt; /* array of BezTriples (sizeof(BezTriple)*totvert) - i.e. user-editable keyframes */
+ struct BPoint *bp; /* array of BPoints (sizeof(BPoint) * totvert) - i.e. baked/imported data */
+ struct BezTriple *bezt; /* array of BezTriples (sizeof(BezTriple) * totvert) - i.e. user-editable keyframes */
rctf maxrct, totrct; /* bounding boxes */
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index 316b90b69de..5408e865ab2 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -92,7 +92,8 @@ typedef struct Mesh {
struct MCol *mcol;
struct MSticky *msticky;
struct Mesh *texcomesh;
-
+
+ /* When the object is available, the preferred access method is: BMEdit_FromObject(ob) */
struct BMEditMesh *edit_btmesh; /* not saved in file! */
struct CustomData vdata, edata, fdata;
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index c3b11fed613..3c89e069ea0 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -328,7 +328,6 @@ typedef struct MVertSkin {
#define TF_SEL2 8
#define TF_SEL3 16
#define TF_SEL4 32
-#define TF_HIDE 64 /* unused, same as TF_SELECT */
/* mtface->mode */
#define TF_DYNAMIC 1
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index ffb16b96b55..3f1f4933585 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -614,17 +614,27 @@ typedef struct NodeTexSky {
typedef struct NodeTexImage {
NodeTexBase base;
ImageUser iuser;
- int color_space, pad;
+ int color_space;
+ int projection;
+ float projection_blend;
+ int pad;
} NodeTexImage;
typedef struct NodeTexChecker {
NodeTexBase base;
} NodeTexChecker;
+typedef struct NodeTexBrick {
+ NodeTexBase base;
+ int offset_freq, squash_freq;
+ float offset, squash;
+} NodeTexBrick;
+
typedef struct NodeTexEnvironment {
NodeTexBase base;
ImageUser iuser;
- int color_space, projection;
+ int color_space;
+ int projection;
} NodeTexEnvironment;
typedef struct NodeTexGradient {
@@ -764,6 +774,10 @@ typedef struct NodeTrackPosData {
#define SHD_PROJ_EQUIRECTANGULAR 0
#define SHD_PROJ_MIRROR_BALL 1
+/* image texture */
+#define SHD_PROJ_FLAT 0
+#define SHD_PROJ_BOX 1
+
/* blur node */
#define CMP_NODE_BLUR_ASPECT_NONE 0
#define CMP_NODE_BLUR_ASPECT_Y 1
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 4c7273b914d..9b347a71140 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -1160,7 +1160,7 @@ typedef struct Scene {
#define R_EDGE 0x0020
#define R_FIELDS 0x0040
#define R_FIELDSTILL 0x0080
-#define R_RADIO 0x0100
+/*#define R_RADIO 0x0100 */ /* deprecated */
#define R_BORDER 0x0200
#define R_PANORAMA 0x0400 /* deprecated as scene option, still used in renderer */
#define R_CROP 0x0800
@@ -1363,9 +1363,6 @@ typedef struct Scene {
#define TIME2FRA(a) ((((double) scene->r.frs_sec) * (double)(a)) / (double)scene->r.frs_sec_base)
#define FPS (((double) scene->r.frs_sec) / (double)scene->r.frs_sec_base)
-#define RAD_PHASE_PATCHES 1
-#define RAD_PHASE_FACES 2
-
/* base->flag is in DNA_object_types.h */
/* toolsettings->snap_flag */
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index 34fb7ce60be..b1cd54950e6 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -77,8 +77,6 @@ typedef struct bScreen {
struct wmTimer *animtimer; /* if set, screen has timer handler added in window */
void *context; /* context callback */
-
- short handler[8]; /* similar to space handler */
} bScreen;
typedef struct ScrVert {
@@ -214,13 +212,6 @@ typedef struct ARegion {
#define PNL_DEFAULT_CLOSED 1
#define PNL_NO_HEADER 2
-/* screen handlers */
-#define SCREEN_MAXHANDLER 8
-
-#define SCREEN_HANDLER_ANIM 1
-#define SCREEN_HANDLER_PYTHON 2
-#define SCREEN_HANDLER_VERSE 3
-
/* regiontype, first two are the default set */
/* Do NOT change order, append on end. Types are hardcoded needed */
enum {
diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h
index ec02db192fd..8b2e7645823 100644
--- a/source/blender/makesdna/DNA_sdna_types.h
+++ b/source/blender/makesdna/DNA_sdna_types.h
@@ -81,12 +81,7 @@ typedef struct BHead4 {
#
typedef struct BHead8 {
int code, len;
-#if defined(WIN32) && !defined(FREE_WINDOWS)
- /* This is a compiler type! */
- __int64 old;
-#else
- long long old;
-#endif
+ int64_t old;
int SDNAnr, nr;
} BHead8;
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index c83bddbfc64..d094c1d6255 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -99,7 +99,7 @@ typedef struct Strip {
StripProxy *proxy;
StripCrop *crop;
StripTransform *transform;
- StripColorBalance *color_balance;
+ StripColorBalance *color_balance DNA_DEPRECATED;
} Strip;
/**
@@ -150,9 +150,6 @@ typedef struct Sequence {
/* pointers for effects: */
struct Sequence *seq1, *seq2, *seq3;
- /* maks input for effects */
- struct Sequence *mask_sequence;
-
ListBase seqbase; /* list of strips for metastrips */
struct bSound *sound; /* the linked "bSound" object */
@@ -315,7 +312,7 @@ typedef struct BrightContrastModifierData {
#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_COLOR_BALANCE (1 << 18) */ /* DEPRECATED */
#define SEQ_USE_PROXY_CUSTOM_DIR (1 << 19)
#define SEQ_USE_PROXY_CUSTOM_FILE (1 << 21)
@@ -384,11 +381,6 @@ enum {
SEQ_TYPE_EFFECT_MAX = 31
};
-#define STRIPELEM_FAILED 0
-#define STRIPELEM_OK 1
-
-#define STRIPELEM_PREVIEW_DONE 1
-
#define SEQ_MOVIECLIP_RENDER_UNDISTORTED (1 << 0)
#define SEQ_MOVIECLIP_RENDER_STABILIZED (1 << 1)
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 833cb267185..96f0c0e7a9a 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -47,7 +47,6 @@ struct ColorBand;
/* ************************ style definitions ******************** */
#define MAX_STYLE_NAME 64
-#define MAX_FONT_NAME 256
/* default uifont_id offered by Blender */
#define UIFONT_DEFAULT 0
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index d730c7d9019..9da10381af0 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -133,11 +133,11 @@ typedef struct RegionView3D {
short rflag;
- /* last view */
+ /* last view (use when switching out of camera view) */
float lviewquat[4];
short lpersp, lview; /* lpersp can never be set to 'RV3D_CAMOB' */
+
float gridview;
-
float twangle[3];
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index bd1266bba81..d55810deeac 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -146,8 +146,8 @@ static int nr_types = 0;
static int nr_structs = 0;
static char **names, *namedata; /* at address names[a] is string a */
static char **types, *typedata; /* at address types[a] is string a */
-static short *typelens; /* at typelens[a] is de length of type a */
-static short *alphalens; /* contains sizes as they are calculated on the DEC Alpha (64 bits), in fact any 64bit system */
+static short *typelens_native; /* at typelens[a] is the length of type 'a' on this systems bitness (32 or 64) */
+static short *typelens_64; /* contains sizes as they are calculated on 64 bit systems */
static short **structs, *structdata; /* at sp = structs[a] is the first address of a struct definition
* sp[0] is type number
* sp[1] is amount of elements
@@ -244,8 +244,8 @@ static int add_type(const char *str, int len)
for (nr = 0; nr < nr_types; nr++) {
if (strcmp(str, types[nr]) == 0) {
if (len) {
- typelens[nr] = len;
- alphalens[nr] = len;
+ typelens_native[nr] = len;
+ typelens_64[nr] = len;
}
return nr;
}
@@ -258,8 +258,8 @@ static int add_type(const char *str, int len)
}
strcpy(cp, str);
types[nr_types] = cp;
- typelens[nr_types] = len;
- alphalens[nr_types] = len;
+ typelens_native[nr_types] = len;
+ typelens_64[nr_types] = len;
if (nr_types >= maxnr) {
printf("too many types\n");
@@ -714,7 +714,7 @@ static int arraysize(char *astr, int len)
static int calculate_structlens(int firststruct)
{
- int a, b, len, alphalen, unknown = nr_structs, lastunknown, structtype, type, mul, namelen;
+ int a, b, len_native, len_64, unknown = nr_structs, lastunknown, structtype, type, mul, namelen;
short *sp, *structpoin;
char *cp;
int has_pointer, dna_error = 0;
@@ -729,11 +729,11 @@ static int calculate_structlens(int firststruct)
structtype = structpoin[0];
/* when length is not known... */
- if (typelens[structtype] == 0) {
+ if (typelens_native[structtype] == 0) {
sp = structpoin + 2;
- len = 0;
- alphalen = 0;
+ len_native = 0;
+ len_64 = 0;
has_pointer = 0;
/* check all elements in struct */
@@ -756,25 +756,25 @@ static int calculate_structlens(int firststruct)
/* 4-8 aligned/ */
if (sizeof(void *) == 4) {
- if (len % 4) {
- printf("Align pointer error in struct (len4): %s %s\n", types[structtype], cp);
+ if (len_native % 4) {
+ printf("Align pointer error in struct (len_native 4): %s %s\n", types[structtype], cp);
dna_error = 1;
}
}
else {
- if (len % 8) {
- printf("Align pointer error in struct (len8): %s %s\n", types[structtype], cp);
+ if (len_native % 8) {
+ printf("Align pointer error in struct (len_native 8): %s %s\n", types[structtype], cp);
dna_error = 1;
}
}
- if (alphalen % 8) {
- printf("Align pointer error in struct (alphalen8): %s %s\n", types[structtype], cp);
+ if (len_64 % 8) {
+ printf("Align pointer error in struct (len_64 8): %s %s\n", types[structtype], cp);
dna_error = 1;
}
- len += sizeof(void *) * mul;
- alphalen += 8 * mul;
+ len_native += sizeof(void *) * mul;
+ len_64 += 8 * mul;
}
else if (cp[0] == '[') {
@@ -782,7 +782,7 @@ static int calculate_structlens(int firststruct)
printf("Parse error in struct, invalid member name: %s %s\n", types[structtype], cp);
dna_error = 1;
}
- else if (typelens[type]) {
+ else if (typelens_native[type]) {
/* has the name an extra length? (array) */
mul = 1;
if (cp[namelen - 1] == ']') mul = arraysize(cp, namelen);
@@ -794,54 +794,54 @@ static int calculate_structlens(int firststruct)
/* struct alignment */
if (type >= firststruct) {
- if (sizeof(void *) == 8 && (len % 8) ) {
+ if (sizeof(void *) == 8 && (len_native % 8) ) {
printf("Align struct error: %s %s\n", types[structtype], cp);
dna_error = 1;
}
}
/* 2-4-8 aligned/ */
- if (type < firststruct && typelens[type] > 4 && (len % 8)) {
- printf("Align 8 error in struct: %s %s (add %d padding bytes)\n", types[structtype], cp, len % 8);
+ if (type < firststruct && typelens_native[type] > 4 && (len_native % 8)) {
+ printf("Align 8 error in struct: %s %s (add %d padding bytes)\n", types[structtype], cp, len_native % 8);
dna_error = 1;
}
- if (typelens[type] > 3 && (len % 4) ) {
- printf("Align 4 error in struct: %s %s (add %d padding bytes)\n", types[structtype], cp, len % 4);
+ if (typelens_native[type] > 3 && (len_native % 4) ) {
+ printf("Align 4 error in struct: %s %s (add %d padding bytes)\n", types[structtype], cp, len_native % 4);
dna_error = 1;
}
- else if (typelens[type] == 2 && (len % 2) ) {
- printf("Align 2 error in struct: %s %s (add %d padding bytes)\n", types[structtype], cp, len % 2);
+ else if (typelens_native[type] == 2 && (len_native % 2) ) {
+ printf("Align 2 error in struct: %s %s (add %d padding bytes)\n", types[structtype], cp, len_native % 2);
dna_error = 1;
}
- len += mul * typelens[type];
- alphalen += mul * alphalens[type];
+ len_native += mul * typelens_native[type];
+ len_64 += mul * typelens_64[type];
}
else {
- len = 0;
- alphalen = 0;
+ len_native = 0;
+ len_64 = 0;
break;
}
}
- if (len == 0) {
+ if (len_native == 0) {
unknown++;
}
else {
- typelens[structtype] = len;
- alphalens[structtype] = alphalen;
+ typelens_native[structtype] = len_native;
+ typelens_64[structtype] = len_64;
/* two ways to detect if a struct contains a pointer:
- * has_pointer is set or alphalen != len */
- if (has_pointer || alphalen != len) {
- if (alphalen % 8) {
- printf("Sizeerror 8 in struct: %s (add %d bytes)\n", types[structtype], alphalen % 8);
+ * has_pointer is set or len_64 != len_native */
+ if (has_pointer || len_64 != len_native) {
+ if (len_64 % 8) {
+ printf("Sizeerror 8 in struct: %s (add %d bytes)\n", types[structtype], len_64 % 8);
dna_error = 1;
}
}
- if (len % 4) {
- printf("Sizeerror 4 in struct: %s (add %d bytes)\n", types[structtype], len % 4);
+ if (len_native % 4) {
+ printf("Sizeerror 4 in struct: %s (add %d bytes)\n", types[structtype], len_native % 4);
dna_error = 1;
}
@@ -863,7 +863,7 @@ static int calculate_structlens(int firststruct)
structtype = structpoin[0];
/* length unknown */
- if (typelens[structtype] != 0) {
+ if (typelens_native[structtype] != 0) {
printf(" %s\n", types[structtype]);
}
}
@@ -877,7 +877,7 @@ static int calculate_structlens(int firststruct)
structtype = structpoin[0];
/* length unknown yet */
- if (typelens[structtype] == 0) {
+ if (typelens_native[structtype] == 0) {
printf(" %s\n", types[structtype]);
}
}
@@ -923,7 +923,7 @@ void printStructLengths(void)
for (a = 0; a < nr_structs; a++) {
structpoin = structs[a];
structtype = structpoin[0];
- printf("\t%s\t:%d\n", types[structtype], typelens[structtype]);
+ printf("\t%s\t:%d\n", types[structtype], typelens_native[structtype]);
}
}
@@ -954,8 +954,8 @@ static int make_structDNA(char *baseDirectory, FILE *file)
/* a maximum of 5000 variables, must be sufficient? */
names = MEM_callocN(sizeof(char *) * maxnr, "names");
types = MEM_callocN(sizeof(char *) * maxnr, "types");
- typelens = MEM_callocN(sizeof(short) * maxnr, "typelens");
- alphalens = MEM_callocN(sizeof(short) * maxnr, "alphalens");
+ typelens_native = MEM_callocN(sizeof(short) * maxnr, "typelens_native");
+ typelens_64 = MEM_callocN(sizeof(short) * maxnr, "typelens_64");
structs = MEM_callocN(sizeof(short) * maxnr, "structs");
/* insertion of all known types */
@@ -1008,7 +1008,7 @@ static int make_structDNA(char *baseDirectory, FILE *file)
}
printf("\n");
- sp = typelens;
+ sp = typelens_native;
for (a = 0; a < nr_types; a++, sp++) {
printf(" %s %d\n", types[a], *sp);
}
@@ -1016,7 +1016,7 @@ static int make_structDNA(char *baseDirectory, FILE *file)
for (a = 0; a < nr_structs; a++) {
sp = structs[a];
- printf(" struct %s elems: %d size: %d\n", types[sp[0]], sp[1], typelens[sp[0]]);
+ printf(" struct %s elems: %d size: %d\n", types[sp[0]], sp[1], typelens_native[sp[0]]);
num_types = sp[1];
sp += 2;
/* ? num_types was elem? */
@@ -1068,7 +1068,7 @@ static int make_structDNA(char *baseDirectory, FILE *file)
len = 2 * nr_types;
if (nr_types & 1) len += 2;
- dna_write(file, typelens, len);
+ dna_write(file, typelens_native, len);
/* WRITE STRUCTS */
strcpy(str, "STRC");
@@ -1099,7 +1099,7 @@ static int make_structDNA(char *baseDirectory, FILE *file)
}
fprintf(fp, "main() {\n");
- sp = typelens;
+ sp = typelens_native;
sp += firststruct;
for (a = firststruct; a < nr_types; a++, sp++) {
if (*sp) {
@@ -1121,8 +1121,8 @@ static int make_structDNA(char *baseDirectory, FILE *file)
MEM_freeN(structdata);
MEM_freeN(names);
MEM_freeN(types);
- MEM_freeN(typelens);
- MEM_freeN(alphalens);
+ MEM_freeN(typelens_native);
+ MEM_freeN(typelens_64);
MEM_freeN(structs);
if (debugSDNA > -1) printf("done.\n");