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:
authorPablo Dobarro <pablodp606@gmail.com>2020-09-03 18:25:30 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-09-03 18:26:12 +0300
commitafb43b881cc3d036aba9ab7a2b1ec5e91f745eaa (patch)
tree966ee120d41d28d62786f2c6fe26f4901032b03e /source/blender/editors/sculpt_paint/sculpt_face_set.c
parentc8e5924cbb0b87fc429d0052ed6bdc5e30adcfd7 (diff)
Sculpt: Face Set Extract Operator
This implements a Face Set Extract operator, which is similar to mask extract. This operator uses a picker to select and Face Set in the mesh and extract the geometry directly to a new object. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8599
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_face_set.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_face_set.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.c b/source/blender/editors/sculpt_paint/sculpt_face_set.c
index b9265380a35..22d3cc215b7 100644
--- a/source/blender/editors/sculpt_paint/sculpt_face_set.c
+++ b/source/blender/editors/sculpt_paint/sculpt_face_set.c
@@ -102,6 +102,18 @@ void ED_sculpt_face_sets_initialize_none_to_id(struct Mesh *mesh, const int new_
}
}
+int ED_sculpt_face_sets_active_update_and_get(bContext *C, Object *ob, const float mval[2])
+{
+ SculptSession *ss = ob->sculpt;
+ if (!ss) {
+ return SCULPT_FACE_SET_NONE;
+ }
+
+ SculptCursorGeometryInfo gi;
+ SCULPT_cursor_geometry_info_update(C, &gi, mval, false);
+ return SCULPT_active_face_set_get(ss);
+}
+
/* Draw Face Sets Brush. */
static void do_draw_face_sets_brush_task_cb_ex(void *__restrict userdata,