From 9120191fe2a28a3d01a51f536df7b433a7764803 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Fri, 27 Mar 2020 18:14:14 +0100 Subject: Sculpt: Pose Brush Face Sets origin mode This commit introduces a new mode for calculating the positions and weights of the IK segments in the Pose Brush based on the Face Sets. The first segment of the chain will always include all face sets inside the brush radius and it will propagate until the boundary of the last face sets added in the flood fill. Then consecutive connected face sets are added to the chain until the chain length limit is reached or all face sets of the mesh are already part of the chain. This feature enables complete control over the pose brush origins in case that is needed. Also, with this mode, the user can have a library of base meshes with face sets already configured to get to the initial pose as fast as possible. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7235 --- source/blender/editors/sculpt_paint/sculpt_intern.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source/blender/editors/sculpt_paint/sculpt_intern.h') diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index 7f93355e269..fe56283dbcb 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -125,6 +125,9 @@ void SCULPT_vertex_neighbors_get(struct SculptSession *ss, } \ ((void)0) +int SCULPT_active_vertex_get(SculptSession *ss); +const float *SCULPT_active_vertex_co_get(SculptSession *ss); + /* Sculpt Original Data */ typedef struct { struct BMLog *bm_log; @@ -143,6 +146,11 @@ typedef struct { void SCULPT_orig_vert_data_init(SculptOrigVertData *data, Object *ob, PBVHNode *node); void SCULPT_orig_vert_data_update(SculptOrigVertData *orig_data, PBVHVertexIter *iter); +/* Face Sets */ +int SCULPT_vertex_face_set_get(SculptSession *ss, int index); +bool SCULPT_vertex_has_face_set(SculptSession *ss, int index, int face_set); +bool SCULPT_vertex_has_unique_face_set(SculptSession *ss, int index); + /* Dynamic topology */ void sculpt_pbvh_clear(Object *ob); void sculpt_dyntopo_node_layers_add(struct SculptSession *ss); @@ -196,6 +204,13 @@ void SCULPT_floodfill_add_active(struct Sculpt *sd, struct SculptSession *ss, SculptFloodFill *flood, float radius); +void SCULPT_floodfill_add_initial_with_symmetry(struct Sculpt *sd, + struct Object *ob, + struct SculptSession *ss, + SculptFloodFill *flood, + int index, + float radius); +void sculpt_floodfill_add_initial(SculptFloodFill *flood, int index); void SCULPT_floodfill_execute( struct SculptSession *ss, SculptFloodFill *flood, -- cgit v1.2.3