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_sdna_types.h')
-rw-r--r--source/blender/makesdna/DNA_sdna_types.h40
1 files changed, 29 insertions, 11 deletions
diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h
index cfb65860b8e..4505eed3208 100644
--- a/source/blender/makesdna/DNA_sdna_types.h
+++ b/source/blender/makesdna/DNA_sdna_types.h
@@ -26,6 +26,30 @@ struct MemArena;
#
#
+typedef struct SDNA_StructMember {
+ /** This struct must not change, it's only a convenience view for raw data stored in SDNA. */
+
+ /** An index into SDNA->types. */
+ short type;
+ /** An index into SDNA->names. */
+ short name;
+} SDNA_StructMember;
+
+#
+#
+typedef struct SDNA_Struct {
+ /** This struct must not change, it's only a convenience view for raw data stored in SDNA. */
+
+ /** An index into SDNA->types. */
+ short type;
+ /** The amount of members in this struct. */
+ short members_len;
+ /** "Flexible array member" that contains information about all members of this struct. */
+ SDNA_StructMember members[];
+} SDNA_Struct;
+
+#
+#
typedef struct SDNA {
/** Full copy of 'encoded' data (when data_alloc is set, otherwise borrowed). */
const char *data;
@@ -51,14 +75,8 @@ typedef struct SDNA {
/** Type lengths. */
short *types_size;
- /**
- * sp = structs[a] is the address of a struct definition
- * sp[0] is struct type number, sp[1] amount of members
- *
- * (sp[2], sp[3]), (sp[4], sp[5]), .. are the member
- * type and name numbers respectively.
- */
- short **structs;
+ /** Information about structs and their members. */
+ SDNA_Struct **structs;
/** Number of struct types. */
int structs_len;
@@ -74,7 +92,7 @@ typedef struct SDNA {
const char **names;
/** Aligned with #SDNA.types, same pointers when unchanged. */
const char **types;
- /** A version of #SDNA.structs_map that uses #SDNA.alias.types for it's keys. */
+ /** A version of #SDNA.structs_map that uses #SDNA.alias.types for its keys. */
struct GHash *structs_map;
} alias;
} SDNA;
@@ -90,13 +108,13 @@ typedef struct BHead {
#
typedef struct BHead4 {
int code, len;
- int old;
+ uint old;
int SDNAnr, nr;
} BHead4;
#
#
typedef struct BHead8 {
int code, len;
- int64_t old;
+ uint64_t old;
int SDNAnr, nr;
} BHead8;