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:
authorJulian Eisel <julian@blender.org>2020-07-01 18:13:57 +0300
committerJulian Eisel <julian@blender.org>2020-07-01 18:13:57 +0300
commit0829cebeb024095c268f190c34daa8ae9a5a224c (patch)
tree12ee5a4a1c2a32e12eff47c8eb9bb0ed217791c1 /source/blender/blenkernel/BKE_paint.h
parentcfde6ebf450594faa57c4bfeaecff10fe512c91b (diff)
parent42be3964eb201180f6b0fa1ff6ce43b8c3845bc2 (diff)
Merge branch 'master' into asset-uuid--archivedasset-uuid--archived
Diffstat (limited to 'source/blender/blenkernel/BKE_paint.h')
-rw-r--r--source/blender/blenkernel/BKE_paint.h44
1 files changed, 33 insertions, 11 deletions
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index 6e4f2efeeb8..78092884655 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -37,8 +37,8 @@ struct Brush;
struct CurveMapping;
struct Depsgraph;
struct EnumPropertyItem;
+struct EdgeSet;
struct GHash;
-struct GSet;
struct GridPaintMask;
struct ImagePool;
struct MLoop;
@@ -269,7 +269,7 @@ typedef struct SculptClothLengthConstraint {
typedef struct SculptClothSimulation {
SculptClothLengthConstraint *length_constraints;
int tot_length_constraints;
- struct GSet *created_length_constraints;
+ struct EdgeSet *created_length_constraints;
int capacity_length_constraints;
float *length_constraint_tweak;
@@ -283,11 +283,27 @@ typedef struct SculptClothSimulation {
} SculptClothSimulation;
-typedef struct SculptLayerPersistentBase {
+typedef struct SculptPersistentBase {
float co[3];
float no[3];
float disp;
-} SculptLayerPersistentBase;
+} SculptPersistentBase;
+
+typedef struct SculptVertexInfo {
+ /* Idexed by vertex, stores and ID of its topologycally connected component. */
+ int *connected_component;
+} SculptVertexInfo;
+
+typedef struct SculptFakeNeighbors {
+ bool use_fake_neighbors;
+
+ /* Max distance used to calculate neighborhood information. */
+ float current_max_distance;
+
+ /* Idexed by vertex, stores the vertex index of its fake neighbor if available. */
+ int *fake_neighbor_index;
+
+} SculptFakeNeighbors;
/* Session data (mode-specific) */
@@ -308,6 +324,7 @@ typedef struct SculptSession {
int totvert, totpoly;
struct KeyBlock *shapekey_active;
+ struct MPropCol *vcol;
float *vmask;
/* Mesh connectivity */
@@ -338,10 +355,10 @@ typedef struct SculptSession {
bool show_face_sets;
/* Painting on deformed mesh */
- bool deform_modifiers_active; /* object is deformed with some modifiers */
- float (*orig_cos)[3]; /* coords of undeformed mesh */
- float (*deform_cos)[3]; /* coords of deformed mesh but without stroke displacement */
- float (*deform_imats)[3][3]; /* crazyspace deformation matrices */
+ bool deform_modifiers_active; /* Object is deformed with some modifiers. */
+ float (*orig_cos)[3]; /* Coords of un-deformed mesh. */
+ float (*deform_cos)[3]; /* Coords of deformed mesh but without stroke displacement. */
+ float (*deform_imats)[3][3]; /* Crazy-space deformation matrices. */
/* Used to cache the render of the active texture */
unsigned int texcache_side, *texcache, texcache_actual;
@@ -365,6 +382,7 @@ typedef struct SculptSession {
/* TODO(jbakker): Replace rv3d adn v3d with ViewContext */
struct RegionView3D *rv3d;
struct View3D *v3d;
+ struct Scene *scene;
/* Dynamic mesh preview */
int *preview_vert_index_list;
@@ -374,9 +392,12 @@ typedef struct SculptSession {
float pose_origin[3];
SculptPoseIKChain *pose_ik_chain_preview;
- /* Layer brush persistence between strokes */
+ /* Mesh State Persistence */
/* This is freed with the PBVH, so it is always in sync with the mesh. */
- SculptLayerPersistentBase *layer_base;
+ SculptPersistentBase *persistent_base;
+
+ SculptVertexInfo vertex_info;
+ SculptFakeNeighbors fake_neighbors;
/* Transform operator */
float pivot_pos[3];
@@ -430,7 +451,8 @@ void BKE_sculptsession_bm_to_me_for_render(struct Object *object);
void BKE_sculpt_update_object_for_edit(struct Depsgraph *depsgraph,
struct Object *ob_orig,
bool need_pmap,
- bool need_mask);
+ bool need_mask,
+ bool need_colors);
void BKE_sculpt_update_object_before_eval(struct Object *ob_eval);
void BKE_sculpt_update_object_after_eval(struct Depsgraph *depsgraph, struct Object *ob_eval);