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:
authorJoseph Eagar <joeedh@gmail.com>2022-04-05 21:42:55 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-04-05 21:42:55 +0300
commiteae36be372a6b16ee3e76eff0485a47da4f3c230 (patch)
treed1ca2dc30951e31f1b91eed6a4edfdfb0824bf1f /source/blender/makesdna
parenta3e122b9aec59fc303c2375a78183cfb8642c14f (diff)
Refactor: Unify vertex and sculpt colors into new
color attribute system. This commit removes sculpt colors from experimental status and unifies it with vertex colors. It introduces the concept of "color attributes", which are any attributes that represents colors. Color attributes can be represented with byte or floating-point numbers and can be stored in either vertices or face corners. Color attributes share a common namespace (so you can no longer have a floating-point sculpt color attribute and a byte vertex color attribute with the same name). Note: this commit does not include vertex paint mode, which is a separate patch, see: https://developer.blender.org/D14179 Differential Revision: https://developer.blender.org/D12587 Ref D12587
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_customdata_types.h5
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h4
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h2
3 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index 05d300dcb63..858de733558 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -227,6 +227,9 @@ typedef enum CustomDataType {
CD_MASK_PROP_COLOR | CD_MASK_PROP_STRING | CD_MASK_MLOOPCOL | CD_MASK_PROP_BOOL | \
CD_MASK_PROP_INT8)
+/* All color attributes */
+#define CD_MASK_COLOR_ALL (CD_MASK_PROP_COLOR | CD_MASK_MLOOPCOL)
+
typedef struct CustomData_MeshMasks {
uint64_t vmask;
uint64_t emask;
@@ -247,6 +250,8 @@ enum {
CD_FLAG_EXTERNAL = (1 << 3),
/* Indicates external data is read into memory */
CD_FLAG_IN_MEMORY = (1 << 4),
+ CD_FLAG_COLOR_ACTIVE = (1 << 5),
+ CD_FLAG_COLOR_RENDER = (1 << 6)
};
/* Limits */
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 11825de4b33..73c4eeaaab3 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -2103,9 +2103,9 @@ typedef struct DataTransferModifierData {
char _pad1[4];
/** DT_MULTILAYER_INDEX_MAX; See DT_FROMLAYERS_ enum in ED_object.h. */
- int layers_select_src[4];
+ int layers_select_src[5];
/** DT_MULTILAYER_INDEX_MAX; See DT_TOLAYERS_ enum in ED_object.h. */
- int layers_select_dst[4];
+ int layers_select_dst[5];
/** See CDT_MIX_ enum in BKE_customdata.h. */
int mix_mode;
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 8a698050629..0f6c32e4ddf 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -645,7 +645,6 @@ typedef struct UserDef_Experimental {
char use_new_curves_type;
char use_new_point_cloud_type;
char use_full_frame_compositor;
- char use_sculpt_vertex_colors;
char use_sculpt_tools_tilt;
char use_extended_asset_browser;
char use_override_templates;
@@ -653,7 +652,6 @@ typedef struct UserDef_Experimental {
char use_select_nearest_on_first_click;
char enable_eevee_next;
char use_sculpt_texture_paint;
- char _pad[7];
/** `makesdna` does not allow empty structs. */
} UserDef_Experimental;