Blender V4.3
sculpt_face_set.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include "BLI_array.hh"
12#include "BLI_offset_indices.hh"
13#include "BLI_set.hh"
14#include "BLI_span.hh"
15
16#include "BKE_attribute.hh"
17
18struct BMVert;
19struct Mesh;
20struct Object;
21struct SubdivCCG;
22struct SubdivCCGCoord;
23
25
26int active_face_set_get(const Object &object);
27int vert_face_set_get(GroupedSpan<int> vert_to_face_map, Span<int> face_sets, int vert);
28int vert_face_set_get(const SubdivCCG &subdiv_ccg, Span<int> face_sets, int grid);
29int vert_face_set_get(int face_set_offset, const BMVert &vert);
30
31bool vert_has_face_set(GroupedSpan<int> vert_to_face_map,
32 Span<int> face_sets,
33 int vert,
34 int face_set);
35bool vert_has_face_set(const SubdivCCG &subdiv_ccg, Span<int> face_sets, int grid, int face_set);
36bool vert_has_face_set(int face_set_offset, const BMVert &vert, int face_set);
37bool vert_has_unique_face_set(GroupedSpan<int> vert_to_face_map, Span<int> face_sets, int vert);
38bool vert_has_unique_face_set(OffsetIndices<int> faces,
39 Span<int> corner_verts,
40 GroupedSpan<int> vert_to_face_map,
41 Span<int> face_sets,
42 const SubdivCCG &subdiv_ccg,
43 SubdivCCGCoord coord);
44bool vert_has_unique_face_set(int face_set_offset, const BMVert &vert);
45
51bool create_face_sets_mesh(Object &object);
52
58bke::SpanAttributeWriter<int> ensure_face_sets_mesh(Mesh &mesh);
60Array<int> duplicate_face_sets(const Mesh &mesh);
61Set<int> gather_hidden_face_sets(Span<bool> hide_poly, Span<int> face_sets);
62
63void filter_verts_with_unique_face_sets_mesh(GroupedSpan<int> vert_to_face_map,
64 Span<int> face_sets,
65 bool unique,
66 Span<int> verts,
67 MutableSpan<float> factors);
68void filter_verts_with_unique_face_sets_grids(OffsetIndices<int> faces,
69 Span<int> corner_verts,
70 GroupedSpan<int> vert_to_face_map,
71 Span<int> face_sets,
72 const SubdivCCG &subdiv_ccg,
73 bool unique,
74 Span<int> grids,
75 MutableSpan<float> factors);
76void filter_verts_with_unique_face_sets_bmesh(int face_set_offset,
77 bool unique,
78 const Set<BMVert *, 0> &verts,
79 MutableSpan<float> factors);
80
81} // namespace blender::ed::sculpt_paint::face_set
static float verts[][3]
int vert_face_set_get(const GroupedSpan< int > vert_to_face_map, const Span< int > face_sets, const int vert)
Definition sculpt.cc:232
void filter_verts_with_unique_face_sets_mesh(const GroupedSpan< int > vert_to_face_map, const Span< int > face_sets, const bool unique, const Span< int > verts, const MutableSpan< float > factors)
bool vert_has_unique_face_set(const GroupedSpan< int > vert_to_face_map, const Span< int > face_sets, int vert)
Definition sculpt.cc:294
bool vert_has_face_set(const GroupedSpan< int > vert_to_face_map, const Span< int > face_sets, const int vert, const int face_set)
Definition sculpt.cc:254
void filter_verts_with_unique_face_sets_bmesh(int face_set_offset, const bool unique, const Set< BMVert *, 0 > &verts, const MutableSpan< float > factors)
Array< int > duplicate_face_sets(const Mesh &mesh)
Set< int > gather_hidden_face_sets(const Span< bool > hide_poly, const Span< int > face_sets)
void filter_verts_with_unique_face_sets_grids(const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face_map, const Span< int > face_sets, const SubdivCCG &subdiv_ccg, const bool unique, const Span< int > grids, const MutableSpan< float > factors)
bke::SpanAttributeWriter< int > ensure_face_sets_mesh(Mesh &mesh)
int active_face_set_get(const Object &object)
Definition sculpt.cc:198