27 if (selection.is_empty()) {
31 if (use_face_select) {
32 for (const int face : range) {
33 flags.slice(faces[face]).fill(selection[face] ? 1 : 0);
37 const Span<int> corner_verts = mr.corner_verts;
38 for (const int face : range) {
39 for (const int corner : faces[face]) {
40 flags[corner] = selection[corner_verts[corner]] ? 1 : 0;
45 if (!mr.hide_poly.is_empty()) {
46 const Span<bool> hide_poly = mr.hide_poly;
47 for (const int face : range) {
48 if (hide_poly[face]) {
49 flags.slice(faces[face]).fill(-1);
53 if (mr.edit_bmesh && mr.orig_index_vert) {
54 const Span<int> corner_verts = mr.corner_verts;
55 const Span<int> orig_indices(mr.orig_index_vert, mr.verts_num);
56 for (const int face : range) {
57 for (const int corner : faces[face]) {
58 if (orig_indices[corner_verts[corner]] == ORIGINDEX_NONE) {
72 for (const int face_index : range) {
73 const BMFace &face = *BM_face_at_index(&const_cast<BMesh &>(bm), face_index);
74 if (BM_elem_flag_test(&face, BM_ELEM_HIDDEN)) {
75 const IndexRange face_range(BM_elem_index_get(BM_FACE_FIRST_LOOP(&face)), face.len);
76 flags.slice(face_range).fill(-1);
85 gpu::VertAttrType::SINT_32);
122 const int default_value = 0;
blender::gpu::VertBuf * GPU_vertbuf_create_on_device(const GPUVertFormat &format, uint v_len)
void GPU_vertbuf_use(blender::gpu::VertBuf *)
static blender::gpu::VertBuf * GPU_vertbuf_create_with_format(const GPUVertFormat &format)
void GPU_vertbuf_data_alloc(blender::gpu::VertBuf &verts, uint v_len)
void GPU_vertbuf_update_sub(blender::gpu::VertBuf *verts, uint start, uint len, const void *data)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
constexpr bool is_empty() const
static constexpr IndexRange from_begin_end(const int64_t begin, const int64_t end)
constexpr MutableSpan take_back(const int64_t n) const
constexpr T * data() const
constexpr void fill(const T &value) const
constexpr MutableSpan take_front(const int64_t n) const
constexpr bool is_empty() const
static const GPUVertFormat & get_paint_overlay_flag_format()
void draw_subdiv_build_paint_overlay_flag_buffer(const DRWSubdivCache &cache, gpu::VertBuf &flags)
int subdiv_full_vbo_size(const MeshRenderData &mr, const DRWSubdivCache &cache)
static void extract_edit_flags_bm(const MeshRenderData &mr, MutableSpan< int > flags)
gpu::VertBufPtr extract_paint_overlay_flags_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
gpu::VertBufPtr extract_paint_overlay_flags(const MeshRenderData &mr)
static void update_loose_flags(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::VertBuf &flags)
std::unique_ptr< gpu::VertBuf, gpu::VertBufDeleter > VertBufPtr
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
const int * orig_index_vert
MeshExtractType extract_type
VArraySpan< bool > select_vert
VArraySpan< bool > select_poly
VArraySpan< bool > hide_poly
OffsetIndices< int > faces