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/blenkernel/intern/pbvh_intern.h
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/blenkernel/intern/pbvh_intern.h')
-rw-r--r--source/blender/blenkernel/intern/pbvh_intern.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/pbvh_intern.h b/source/blender/blenkernel/intern/pbvh_intern.h
index a10d09e106c..37f8dfd9b6b 100644
--- a/source/blender/blenkernel/intern/pbvh_intern.h
+++ b/source/blender/blenkernel/intern/pbvh_intern.h
@@ -16,6 +16,8 @@ typedef struct {
float bmin[3], bmax[3], bcentroid[3];
} BBC;
+struct MeshElemMap;
+
/* NOTE: this structure is getting large, might want to split it into
* union'd structs */
struct PBVHNode {
@@ -60,6 +62,13 @@ struct PBVHNode {
const int *vert_indices;
unsigned int uniq_verts, face_verts;
+ /* Array of indices into the Mesh's MLoop array.
+ * PBVH_FACES only. The first part of the array
+ * are loops unique to this node, see comment for
+ * vert_indices for more details.*/
+ int *loop_indices;
+ unsigned int loop_indices_num;
+
/* An array mapping face corners into the vert_indices
* array. The array is sized to match 'totprim', and each of
* the face's corners gets an index into the vert_indices
@@ -165,6 +174,13 @@ struct PBVH {
struct BMLog *bm_log;
struct SubdivCCG *subdiv_ccg;
+
+ const struct MeshElemMap *pmap;
+
+ CustomDataLayer *color_layer;
+ AttributeDomain color_domain;
+
+ bool is_drawing;
};
/* pbvh.c */