diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-09-03 18:25:30 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-09-03 18:26:12 +0300 |
commit | afb43b881cc3d036aba9ab7a2b1ec5e91f745eaa (patch) | |
tree | 966ee120d41d28d62786f2c6fe26f4901032b03e /source/blender/blenkernel | |
parent | c8e5924cbb0b87fc429d0052ed6bdc5e30adcfd7 (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/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_screen.h | 5 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/screen.c | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index 1090deae93f..0eeccf71cc6 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -399,6 +399,11 @@ struct ARegion *BKE_screen_find_region_xy(struct bScreen *screen, int x, int y) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1); +struct ARegion *BKE_screen_find_main_region_at_xy(struct bScreen *screen, + const int space_type, + const int x, + const int y); + struct ScrArea *BKE_screen_find_area_from_space(struct bScreen *screen, struct SpaceLink *sl) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2); diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index d56658a6709..998e94ff11d 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -1057,6 +1057,18 @@ void BKE_screen_view3d_shading_init(View3DShading *shading) memcpy(shading, shading_default, sizeof(*shading)); } +ARegion *BKE_screen_find_main_region_at_xy(bScreen *screen, + const int space_type, + const int x, + const int y) +{ + ScrArea *area = BKE_screen_find_area_xy(screen, space_type, x, y); + if (!area) { + return NULL; + } + return BKE_area_find_region_xy(area, RGN_TYPE_WINDOW, x, y); +} + /* magic zoom calculation, no idea what * it signifies, if you find out, tell me! -zr */ |