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:
authorTon Roosendaal <ton@blender.org>2009-07-09 18:35:40 +0400
committerTon Roosendaal <ton@blender.org>2009-07-09 18:35:40 +0400
commit77c61f545fb3248ae4e06afafa816764222405c4 (patch)
treeac7c351f3cc33bbaddf47c73df98490c5c2314b4
parent4a3f56a29d64dfc38028f9216339d7aa390a1987 (diff)
2.5
Bad bad DNA errors! People should really check on warning prints for compiling dna dir... - SpaceFile: ListBase* prev; <- dna doesnt recognize this - wmEvent: const variables were not supported yet. The first I fixed, 2nd I added support for in makesdna. Note that files saved between tuesday july 7 and now can be corrupted!
-rw-r--r--source/blender/makesdna/DNA_space_types.h37
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h19
-rw-r--r--source/blender/makesdna/intern/dna_genfile.c5
-rw-r--r--source/blender/makesdna/intern/makesdna.c5
4 files changed, 37 insertions, 29 deletions
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 796da7e7f5d..182e5481999 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -86,7 +86,7 @@ typedef struct SpaceInfo {
} SpaceInfo;
/* 'Graph' Editor (formerly known as the IPO Editor) */
-// XXX for now, we keep all old data...
+/* XXX for now, we keep all old data... */
typedef struct SpaceIpo {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
@@ -191,21 +191,6 @@ typedef struct FileSelectParams {
/* XXX --- end unused -- */
} FileSelectParams;
-/* FileSelectParams.display */
-enum FileDisplayTypeE {
- FILE_SHORTDISPLAY = 1,
- FILE_LONGDISPLAY,
- FILE_IMGDISPLAY
-};
-
-/* FileSelectParams.sort */
-enum FileSortTypeE {
- FILE_SORT_NONE = 0,
- FILE_SORT_ALPHA = 1,
- FILE_SORT_EXTENSION,
- FILE_SORT_TIME,
- FILE_SORT_SIZE
-};
typedef struct SpaceFile {
SpaceLink *next, *prev;
@@ -217,8 +202,8 @@ typedef struct SpaceFile {
struct FileList *files; /* holds the list of files to show */
- ListBase* folders_prev; /* holds the list of previous directories to show */
- ListBase* folders_next; /* holds the list of next directories (pushed from previous) to show */
+ ListBase *folders_prev; /* holds the list of previous directories to show */
+ ListBase *folders_next; /* holds the list of next directories (pushed from previous) to show */
/* operator that is invoking fileselect
op->exec() will be called on the 'Load' button.
@@ -572,6 +557,22 @@ typedef struct SpaceImaSel {
#define BUTS_SENS_STATE 512
#define BUTS_ACT_STATE 1024
+/* FileSelectParams.display */
+enum FileDisplayTypeE {
+ FILE_SHORTDISPLAY = 1,
+ FILE_LONGDISPLAY,
+ FILE_IMGDISPLAY
+};
+
+/* FileSelectParams.sort */
+enum FileSortTypeE {
+ FILE_SORT_NONE = 0,
+ FILE_SORT_ALPHA = 1,
+ FILE_SORT_EXTENSION,
+ FILE_SORT_TIME,
+ FILE_SORT_SIZE
+};
+
/* these values need to be hardcoded in structs, dna does not recognize defines */
/* also defined in BKE */
#define FILE_MAXDIR 160
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index b63fb35c193..fcf3d0aec23 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -217,11 +217,6 @@ typedef struct wmOperator {
/* add this flag if the event should pass through */
#define OPERATOR_PASS_THROUGH 8
-typedef enum wmRadialControlMode {
- WM_RADIALCONTROL_SIZE,
- WM_RADIALCONTROL_STRENGTH,
- WM_RADIALCONTROL_ANGLE
-} wmRadialControlMode;
/* ************** wmEvent ************************ */
/* for read-only rna access, dont save this */
@@ -244,15 +239,25 @@ typedef struct wmEvent {
short shift, ctrl, alt, oskey; /* oskey is apple or windowskey, value denotes order of pressed */
short keymodifier; /* rawkey modifier */
+ short pad1;
+
/* keymap item, set by handler (weak?) */
const char *keymap_idname;
/* custom data */
- short custom; /* custom data type, stylus, 6dof, see wm_event_types.h */
- void *customdata; /* ascii, unicode, mouse coords, angles, vectors, dragdrop info */
+ short custom; /* custom data type, stylus, 6dof, see wm_event_types.h */
short customdatafree;
+ int pad2;
+ void *customdata; /* ascii, unicode, mouse coords, angles, vectors, dragdrop info */
} wmEvent;
+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/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c
index b4b029a19e5..628983ae879 100644
--- a/source/blender/makesdna/intern/dna_genfile.c
+++ b/source/blender/makesdna/intern/dna_genfile.c
@@ -616,8 +616,8 @@ static void cast_elem(char *ctype, char *otype, char *name, char *curdata, char
arrlen= DNA_elem_array_size(name, strlen(name));
/* define otypenr */
- if(strcmp(otype, "char")==0) otypenr= 0;
- else if((strcmp(otype, "uchar")==0)||(strcmp(otype, "unsigned char")==0)) otypenr= 1;
+ if(strcmp(otype, "char")==0 || (strcmp(otype, "const char")==0)) otypenr= 0;
+ else if((strcmp(otype, "uchar")==0) || (strcmp(otype, "unsigned char")==0)) otypenr= 1;
else if(strcmp(otype, "short")==0) otypenr= 2;
else if((strcmp(otype, "ushort")==0)||(strcmp(otype, "unsigned short")==0)) otypenr= 3;
else if(strcmp(otype, "int")==0) otypenr= 4;
@@ -629,6 +629,7 @@ static void cast_elem(char *ctype, char *otype, char *name, char *curdata, char
/* define ctypenr */
if(strcmp(ctype, "char")==0) ctypenr= 0;
+ else if(strcmp(ctype, "const char")==0) ctypenr= 0;
else if((strcmp(ctype, "uchar")==0)||(strcmp(ctype, "unsigned char")==0)) ctypenr= 1;
else if(strcmp(ctype, "short")==0) ctypenr= 2;
else if((strcmp(ctype, "ushort")==0)||(strcmp(ctype, "unsigned short")==0)) ctypenr= 3;
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index 91e9e617ea9..08af6372d31 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -559,10 +559,11 @@ int convert_include(char *filename)
while( *md1 != '}' ) {
if(md1>mainend) break;
- /* skip when it says 'struct' or 'unsigned' */
+ /* skip when it says 'struct' or 'unsigned' or 'const' */
if(*md1) {
if( strncmp(md1, "struct", 6)==0 ) md1+= 7;
- if( strncmp(md1, "unsigned", 6)==0 ) md1+= 9;
+ if( strncmp(md1, "unsigned", 8)==0 ) md1+= 9;
+ if( strncmp(md1, "const", 5)==0 ) md1+= 6;
/* we've got a type! */
type= add_type(md1, 0);