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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-06-22 14:12:44 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-06-22 14:12:44 +0300
commit97ee7f8609bed555ff4bd371b7e25d13b2d6a0d6 (patch)
tree0aadae430c5c7d84c820fd567d815c455227d13d /source/blender/makesdna
parent48c58bd9138ad88d8aaa24ad9d6d67e1303e7905 (diff)
parent493c6b622fe3fb80243dfeac29f9399ac6fc4a8c (diff)
Merge branch 'master' into blender2.8
Conflicts: source/blender/blenloader/intern/readfile.c source/blender/editors/physics/particle_edit.c
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_curve_types.h20
-rw-r--r--source/blender/makesdna/DNA_sdna_types.h2
-rw-r--r--source/blender/makesdna/DNA_space_types.h2
-rw-r--r--source/blender/makesdna/intern/CMakeLists.txt5
-rw-r--r--source/blender/makesdna/intern/dna_genfile.c50
5 files changed, 25 insertions, 54 deletions
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index 8f711c1b23b..61169e4b1b1 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -230,7 +230,7 @@ typedef struct Curve {
/* font part */
short lines;
- char spacemode, pad1;
+ char spacemode, align_y;
float spacing, linedist, shear, fsize, wordspace, ulpos, ulheight;
float xof, yof;
float linewidth;
@@ -322,11 +322,19 @@ enum {
/* Curve.spacemode */
enum {
- CU_LEFT = 0,
- CU_MIDDLE = 1,
- CU_RIGHT = 2,
- CU_JUSTIFY = 3,
- CU_FLUSH = 4,
+ CU_ALIGN_X_LEFT = 0,
+ CU_ALIGN_X_MIDDLE = 1,
+ CU_ALIGN_X_RIGHT = 2,
+ CU_ALIGN_X_JUSTIFY = 3,
+ CU_ALIGN_X_FLUSH = 4,
+};
+
+/* Curve.align_y */
+enum {
+ CU_ALIGN_Y_TOP_BASELINE = 0,
+ CU_ALIGN_Y_TOP = 1,
+ CU_ALIGN_Y_CENTER = 2,
+ CU_ALIGN_Y_BOTTOM = 3,
};
/* Nurb.flag */
diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h
index 28204ebeb88..cb7a371c7c5 100644
--- a/source/blender/makesdna/DNA_sdna_types.h
+++ b/source/blender/makesdna/DNA_sdna_types.h
@@ -67,7 +67,7 @@ typedef struct SDNA {
#
typedef struct BHead {
int code, len;
- void *old;
+ const void *old;
int SDNAnr, nr;
} BHead;
#
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 2c9b3bb7a66..8f85a62e527 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -875,8 +875,6 @@ typedef struct SpaceImage {
struct Image *image;
struct ImageUser iuser;
- struct CurveMapping *cumap DNA_DEPRECATED; /* was switched to scene's color management settings */
-
struct Scopes scopes; /* histogram waveform and vectorscope */
struct Histogram sample_line_hist; /* sample line histogram */
diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt
index 52487edfd2b..b4ada7ffbf1 100644
--- a/source/blender/makesdna/intern/CMakeLists.txt
+++ b/source/blender/makesdna/intern/CMakeLists.txt
@@ -94,10 +94,11 @@ set(INC_SYS
)
set(SRC
- ../../blenlib/intern/BLI_mempool.c
- ../../blenlib/intern/listbase.c
../../blenlib/intern/BLI_ghash.c
+ ../../blenlib/intern/BLI_mempool.c
+ ../../blenlib/intern/endian_switch.c
../../blenlib/intern/hash_mm2a.c
+ ../../blenlib/intern/listbase.c
)
blender_add_lib(bf_dna_blenlib "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c
index b8783da73ca..99ab29fbdcc 100644
--- a/source/blender/makesdna/intern/dna_genfile.c
+++ b/source/blender/makesdna/intern/dna_genfile.c
@@ -43,6 +43,7 @@
#include "MEM_guardedalloc.h" // for MEM_freeN MEM_mallocN MEM_callocN
#include "BLI_utildefines.h"
+#include "BLI_endian_switch.h"
#ifdef WITH_DNA_GHASH
# include "BLI_ghash.h"
@@ -1126,7 +1127,7 @@ void DNA_struct_switch_endian(SDNA *oldsdna, int oldSDNAnr, char *data)
*/
int a, mul, elemcount, elen, elena, firststructtypenr;
const short *spo, *spc;
- char *cpo, *cur, cval;
+ char *cur;
const char *type, *name;
if (oldSDNAnr == -1) return;
@@ -1150,7 +1151,7 @@ void DNA_struct_switch_endian(SDNA *oldsdna, int oldSDNAnr, char *data)
if (spc[0] >= firststructtypenr && !ispointer(name)) {
/* struct field type */
/* where does the old data start (is there one?) */
- cpo = find_elem(oldsdna, type, name, spo, data, NULL);
+ char *cpo = find_elem(oldsdna, type, name, spo, data, NULL);
if (cpo) {
oldSDNAnr = DNA_struct_find_nr(oldsdna, type);
@@ -1167,18 +1168,7 @@ void DNA_struct_switch_endian(SDNA *oldsdna, int oldSDNAnr, char *data)
/* non-struct field type */
if (ispointer(name)) {
if (oldsdna->pointerlen == 8) {
-
- mul = DNA_elem_array_size(name);
- cpo = cur;
- while (mul--) {
- cval = cpo[0]; cpo[0] = cpo[7]; cpo[7] = cval;
- cval = cpo[1]; cpo[1] = cpo[6]; cpo[6] = cval;
- cval = cpo[2]; cpo[2] = cpo[5]; cpo[5] = cval;
- cval = cpo[3]; cpo[3] = cpo[4]; cpo[4] = cval;
-
- cpo += 8;
- }
-
+ BLI_endian_switch_int64_array((int64_t *)cur, DNA_elem_array_size(name));
}
}
else {
@@ -1191,14 +1181,7 @@ void DNA_struct_switch_endian(SDNA *oldsdna, int oldSDNAnr, char *data)
}
if (skip == false) {
- mul = DNA_elem_array_size(name);
- cpo = cur;
- while (mul--) {
- cval = cpo[0];
- cpo[0] = cpo[1];
- cpo[1] = cval;
- cpo += 2;
- }
+ BLI_endian_switch_int16_array((int16_t *)cur, DNA_elem_array_size(name));
}
}
else if (ELEM(spc[0], SDNA_TYPE_INT, SDNA_TYPE_FLOAT)) {
@@ -1206,29 +1189,10 @@ void DNA_struct_switch_endian(SDNA *oldsdna, int oldSDNAnr, char *data)
* but turns out we only used for runtime vars and
* only once for a struct type thats no longer used. */
- mul = DNA_elem_array_size(name);
- cpo = cur;
- while (mul--) {
- cval = cpo[0];
- cpo[0] = cpo[3];
- cpo[3] = cval;
- cval = cpo[1];
- cpo[1] = cpo[2];
- cpo[2] = cval;
- cpo += 4;
- }
+ BLI_endian_switch_int32_array((int32_t *)cur, DNA_elem_array_size(name));
}
else if (ELEM(spc[0], SDNA_TYPE_INT64, SDNA_TYPE_UINT64, SDNA_TYPE_DOUBLE)) {
- mul = DNA_elem_array_size(name);
- cpo = cur;
- while (mul--) {
- cval = cpo[0]; cpo[0] = cpo[7]; cpo[7] = cval;
- cval = cpo[1]; cpo[1] = cpo[6]; cpo[6] = cval;
- cval = cpo[2]; cpo[2] = cpo[5]; cpo[5] = cval;
- cval = cpo[3]; cpo[3] = cpo[4]; cpo[4] = cval;
-
- cpo += 8;
- }
+ BLI_endian_switch_int64_array((int64_t *)cur, DNA_elem_array_size(name));
}
}
}