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')
-rw-r--r--source/blender/makesdna/DNA_brush_types.h1
-rw-r--r--source/blender/makesdna/DNA_customdata_types.h14
-rw-r--r--source/blender/makesdna/DNA_hair_types.h2
-rw-r--r--source/blender/makesdna/DNA_image_defaults.h2
-rw-r--r--source/blender/makesdna/DNA_image_types.h6
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h3
-rw-r--r--source/blender/makesdna/DNA_pointcloud_types.h2
-rw-r--r--source/blender/makesdna/DNA_space_types.h1
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h3
-rw-r--r--source/blender/makesdna/intern/dna_genfile.c60
10 files changed, 58 insertions, 36 deletions
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h
index 033a69d230e..6c3ffc09919 100644
--- a/source/blender/makesdna/DNA_brush_types.h
+++ b/source/blender/makesdna/DNA_brush_types.h
@@ -774,6 +774,7 @@ typedef enum eBrushFlags2 {
BRUSH_CLOTH_PIN_SIMULATION_BOUNDARY = (1 << 4),
BRUSH_POSE_USE_LOCK_ROTATION = (1 << 5),
BRUSH_CLOTH_USE_COLLISION = (1 << 6),
+ BRUSH_AREA_RADIUS_PRESSURE = (1 << 7),
} eBrushFlags2;
typedef enum {
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index 2990fa85c27..ca4d309e3b1 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -147,9 +147,9 @@ typedef enum CustomDataType {
CD_CUSTOMLOOPNORMAL = 41,
CD_SCULPT_FACE_SETS = 42,
- CD_LOCATION = 43,
+ /* CD_LOCATION = 43, */ /* UNUSED */
+ /* CD_RADIUS = 44, */ /* UNUSED */
CD_HAIRCURVE = 45,
- CD_RADIUS = 44,
CD_HAIRMAPPING = 46,
CD_PROP_COLOR = 47,
@@ -209,17 +209,17 @@ typedef enum CustomDataType {
#define CD_MASK_PROP_FLOAT3 (1ULL << CD_PROP_FLOAT3)
#define CD_MASK_PROP_FLOAT2 (1ULL << CD_PROP_FLOAT2)
-/** Data types that may be defined for all mesh elements types. */
-#define CD_MASK_GENERIC_DATA \
- (CD_MASK_PROP_FLOAT | CD_MASK_PROP_INT32 | CD_MASK_PROP_STRING | CD_MASK_PROP_FLOAT3 | \
- CD_MASK_PROP_FLOAT2)
-
/** Multires loop data. */
#define CD_MASK_MULTIRES_GRIDS (CD_MASK_MDISPS | CD_GRID_PAINT_MASK)
/* All data layers. */
#define CD_MASK_ALL (~0LL)
+/* All generic attributes. */
+#define CD_MASK_PROP_ALL \
+ (CD_MASK_PROP_FLOAT | CD_MASK_PROP_FLOAT2 | CD_MASK_PROP_FLOAT3 | CD_MASK_PROP_INT32 | \
+ CD_MASK_PROP_COLOR | CD_MASK_PROP_STRING | CD_MASK_MLOOPCOL)
+
typedef struct CustomData_MeshMasks {
uint64_t vmask;
uint64_t emask;
diff --git a/source/blender/makesdna/DNA_hair_types.h b/source/blender/makesdna/DNA_hair_types.h
index d120e61cfef..27799560395 100644
--- a/source/blender/makesdna/DNA_hair_types.h
+++ b/source/blender/makesdna/DNA_hair_types.h
@@ -56,6 +56,8 @@ typedef struct Hair {
/* Custom Data */
struct CustomData pdata;
struct CustomData cdata;
+ int attributes_active_index;
+ int _pad3;
/* Material */
struct Material **mat;
diff --git a/source/blender/makesdna/DNA_image_defaults.h b/source/blender/makesdna/DNA_image_defaults.h
index ce1296d681f..93ff8792dfa 100644
--- a/source/blender/makesdna/DNA_image_defaults.h
+++ b/source/blender/makesdna/DNA_image_defaults.h
@@ -36,6 +36,8 @@
.gen_type = IMA_GENTYPE_GRID, \
\
.gpuframenr = INT_MAX, \
+ .gpu_pass = SHRT_MAX, \
+ .gpu_layer = SHRT_MAX, \
}
/** \} */
diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h
index 749bc55fcb9..4a05d7ba319 100644
--- a/source/blender/makesdna/DNA_image_types.h
+++ b/source/blender/makesdna/DNA_image_types.h
@@ -147,9 +147,11 @@ typedef struct Image {
int lastframe;
/* GPU texture flag. */
- short gpuflag;
- char _pad2[2];
int gpuframenr;
+ short gpuflag;
+ short gpu_pass;
+ short gpu_layer;
+ char _pad2[6];
/** Deprecated. */
struct PackedFile *packedfile DNA_DEPRECATED;
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index a6aef5b08ad..abfa3cc1b2e 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -191,6 +191,9 @@ typedef struct Mesh {
int totpoly, totloop;
/* END BMESH ONLY */
+ int attributes_active_index;
+ int _pad3;
+
/* the last selected vertex/edge/face are used for the active face however
* this means the active face must always be selected, this is to keep track
* of the last selected face and is similar to the old active face flag where
diff --git a/source/blender/makesdna/DNA_pointcloud_types.h b/source/blender/makesdna/DNA_pointcloud_types.h
index d3b687c2c68..86cff098096 100644
--- a/source/blender/makesdna/DNA_pointcloud_types.h
+++ b/source/blender/makesdna/DNA_pointcloud_types.h
@@ -38,6 +38,8 @@ typedef struct PointCloud {
/* Custom Data */
struct CustomData pdata;
+ int attributes_active_index;
+ int _pad4;
/* Material */
struct Material **mat;
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 6fe6a5461e1..06ab01a9730 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -284,6 +284,7 @@ typedef enum eSpaceOutliner_Flag {
/* SO_HIDE_KEYINGSETINFO = (1 << 3), */ /* UNUSED */
SO_SKIP_SORT_ALPHA = (1 << 4),
SO_SYNC_SELECT = (1 << 5),
+ SO_MODE_COLUMN = (1 << 6),
} eSpaceOutliner_Flag;
/* SpaceOutliner.filter */
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 589077ea67b..b63f4529559 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -620,9 +620,10 @@ typedef struct UserDef_Experimental {
char use_new_hair_type;
char use_cycles_debug;
char use_sculpt_vertex_colors;
+ char use_image_editor_legacy_drawing;
char use_tools_missing_icons;
/** `makesdna` does not allow empty structs. */
- char _pad[2];
+ char _pad[1];
} UserDef_Experimental;
#define USER_EXPERIMENTAL_TEST(userdef, member) \
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c
index 8ad0271f355..b9688df8a3e 100644
--- a/source/blender/makesdna/intern/dna_genfile.c
+++ b/source/blender/makesdna/intern/dna_genfile.c
@@ -805,83 +805,91 @@ static eSDNA_Type sdna_type_nr(const char *dna_type)
static void cast_elem(
const char *ctype, const char *otype, int name_array_len, char *curdata, const char *olddata)
{
- double val = 0.0;
- int curlen = 1, oldlen = 1;
-
eSDNA_Type ctypenr, otypenr;
-
if ((otypenr = sdna_type_nr(otype)) == -1 || (ctypenr = sdna_type_nr(ctype)) == -1) {
return;
}
/* define lengths */
- oldlen = DNA_elem_type_size(otypenr);
- curlen = DNA_elem_type_size(ctypenr);
+ const int oldlen = DNA_elem_type_size(otypenr);
+ const int curlen = DNA_elem_type_size(ctypenr);
+
+ double old_value_f = 0.0;
+ uint64_t old_value_i = 0;
while (name_array_len > 0) {
switch (otypenr) {
case SDNA_TYPE_CHAR:
- val = *olddata;
+ old_value_i = *olddata;
+ old_value_f = (double)old_value_i;
break;
case SDNA_TYPE_UCHAR:
- val = *((unsigned char *)olddata);
+ old_value_i = *((unsigned char *)olddata);
+ old_value_f = (double)old_value_i;
break;
case SDNA_TYPE_SHORT:
- val = *((short *)olddata);
+ old_value_i = *((short *)olddata);
+ old_value_f = (double)old_value_i;
break;
case SDNA_TYPE_USHORT:
- val = *((unsigned short *)olddata);
+ old_value_i = *((unsigned short *)olddata);
+ old_value_f = (double)old_value_i;
break;
case SDNA_TYPE_INT:
- val = *((int *)olddata);
+ old_value_i = *((int *)olddata);
+ old_value_f = (double)old_value_i;
break;
case SDNA_TYPE_FLOAT:
- val = *((float *)olddata);
+ old_value_f = *((float *)olddata);
+ old_value_i = (uint64_t)(int64_t)old_value_f;
break;
case SDNA_TYPE_DOUBLE:
- val = *((double *)olddata);
+ old_value_f = *((double *)olddata);
+ old_value_i = (uint64_t)(int64_t)old_value_f;
break;
case SDNA_TYPE_INT64:
- val = *((int64_t *)olddata);
+ old_value_i = (uint64_t) * ((int64_t *)olddata);
+ old_value_f = (double)old_value_i;
break;
case SDNA_TYPE_UINT64:
- val = *((uint64_t *)olddata);
+ old_value_i = *((uint64_t *)olddata);
+ old_value_f = (double)old_value_i;
break;
}
switch (ctypenr) {
case SDNA_TYPE_CHAR:
- *curdata = val;
+ *curdata = (char)old_value_i;
break;
case SDNA_TYPE_UCHAR:
- *((unsigned char *)curdata) = val;
+ *((unsigned char *)curdata) = (unsigned char)old_value_i;
break;
case SDNA_TYPE_SHORT:
- *((short *)curdata) = val;
+ *((short *)curdata) = (short)old_value_i;
break;
case SDNA_TYPE_USHORT:
- *((unsigned short *)curdata) = val;
+ *((unsigned short *)curdata) = (unsigned short)old_value_i;
break;
case SDNA_TYPE_INT:
- *((int *)curdata) = val;
+ *((int *)curdata) = (int)old_value_i;
break;
case SDNA_TYPE_FLOAT:
if (otypenr < 2) {
- val /= 255;
+ old_value_f /= 255.0;
}
- *((float *)curdata) = val;
+ *((float *)curdata) = old_value_f;
break;
case SDNA_TYPE_DOUBLE:
if (otypenr < 2) {
- val /= 255;
+ old_value_f /= 255.0;
}
- *((double *)curdata) = val;
+ *((double *)curdata) = old_value_f;
break;
case SDNA_TYPE_INT64:
- *((int64_t *)curdata) = val;
+ *((int64_t *)curdata) = (int64_t)old_value_i;
break;
case SDNA_TYPE_UINT64:
- *((uint64_t *)curdata) = val;
+ *((uint64_t *)curdata) = old_value_i;
break;
}