129 if (
mesh.runtime->edit_mesh !=
nullptr) {
131 return *editmesh_eval_final;
243 return uint2(corner, corner_next);
253 [&](
const int i,
const int pos) {
254 const int2 edge = edges[i];
255 gpu_data[pos * 2 + 0] = vert_data[edge[0]];
256 gpu_data[pos * 2 + 1] = vert_data[edge[1]];
334 bool &no_loose_wire);
339 bool &no_loose_wire);
387 bool &r_is_manifold);
General operations, lookup, etc. for blender objects.
#define BM_ELEM_CD_GET_FLOAT_P(ele, offset)
#define BM_elem_index_get(ele)
constexpr int64_t size_in_bytes() const
constexpr const T * data() const
constexpr bool is_empty() const
void foreach_index_optimized(Fn &&fn, Mode mode=exec_mode::serial) const
int face_corner_next(const IndexRange face, const int corner)
void extract_mesh_loose_edge_data(const Span< T > vert_data, const Span< int2 > edges, const IndexMask &loose_edges, MutableSpan< T > gpu_data)
BLI_INLINE BMFace * bm_original_face_get(const MeshRenderData &mr, int idx)
void mesh_render_data_update_face_normals(MeshRenderData &mr)
BLI_INLINE BMVert * bm_original_vert_get(const MeshRenderData &mr, int idx)
gpu::IndexBufPtr extract_lines_adjacency_subdiv(const DRWSubdivCache &subdiv_cache, bool &r_is_manifold)
gpu::VertBufPtr extract_edit_data_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
gpu::VertBufPtr extract_skin_roots(const MeshRenderData &mr)
gpu::IndexBufPtr extract_edituv_lines_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, UvExtractionMode mode)
gpu::IndexBufPtr extract_lines_adjacency(const MeshRenderData &mr, bool &r_is_manifold)
gpu::IndexBufPtr extract_points_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
gpu::IndexBufPtr extract_edituv_face_dots(const MeshRenderData &mr)
BLI_INLINE BMEdge * bm_original_edge_get(const MeshRenderData &mr, int idx)
gpu::VertBufPtr extract_edit_data(const MeshRenderData &mr)
void scatter_face_to_corner_gpu(const MeshRenderData &mr, MeshBufferCache &cache, gpu::VertBuf &src, gpu::VertBuf &dst)
gpu::VertBufPtr extract_tangents_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const MeshBatchCache &cache)
gpu::VertBufPtr extract_edituv_stretch_angle_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const MeshBatchCache &cache)
gpu::VertBufPtr extract_edge_index(const MeshRenderData &mr)
gpu::VertBufPtr extract_attribute_subdiv(const MeshRenderData &mr, MeshBufferCache &cache, const DRWSubdivCache &subdiv_cache, StringRef name)
gpu::VertBufPtr extract_vert_index_subdiv(const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr)
gpu::VertBufPtr extract_weights_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const MeshBatchCache &batch_cache, MeshBufferCache &cache)
gpu::VertBufPtr extract_tangents(const MeshRenderData &mr, const MeshBatchCache &cache, bool use_hq)
gpu::VertBufPtr extract_normals(const MeshRenderData &mr, MeshBufferCache &cache, bool use_hq)
gpu::VertBufPtr extract_face_dot_index(const MeshRenderData &mr)
gpu::IndexBufPtr extract_edituv_tris(const MeshRenderData &mr, bool edit_uvs)
void mesh_render_data_loop_flag(const MeshRenderData &mr, const BMLoop *l, const BMUVOffsets &offsets, EditLoopData &eattr)
gpu::VertBufPtr extract_sculpt_data_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
gpu::IndexBufPtr extract_edituv_points(const MeshRenderData &mr)
gpu::IndexBufPtr extract_edituv_tris_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
void extract_lines(const MeshRenderData &mr, gpu::IndexBufPtr *lines, gpu::IndexBufPtr *lines_loose, bool &no_loose_wire)
uint2 edge_from_corners(const IndexRange face, const int corner)
void mesh_render_data_face_flag(const MeshRenderData &mr, const BMFace *efa, const BMUVOffsets &offsets, EditLoopData &eattr)
gpu::VertBufPtr extract_orco(const MeshRenderData &mr, MeshBufferCache &cache)
gpu::VertBufPtr extract_positions_subdiv(const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::VertBufPtr *orco_vbo)
gpu::IndexBufPtr extract_edituv_points_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
gpu::VertBufPtr extract_positions(const MeshRenderData &mr, MeshBufferCache &cache)
gpu::VertBufPtr extract_face_index_subdiv(const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr)
void gather_edge_to_corner_gpu(const MeshRenderData &mr, MeshBufferCache &cache, gpu::VertBuf &src, gpu::VertBuf &dst)
gpu::IndexBufPtr extract_lines_paint_mask(const MeshRenderData &mr)
gpu::VertBufPtr extract_uv_maps(const MeshRenderData &mr, const MeshBatchCache &cache)
void mesh_render_data_loop_edge_flag(const MeshRenderData &mr, const BMLoop *l, const BMUVOffsets &offsets, EditLoopData &eattr)
gpu::VertBufPtr extract_edge_index_subdiv(const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr)
gpu::VertBufPtr extract_paint_overlay_flags_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
gpu::VertBufPtr extract_edituv_data(const MeshRenderData &mr)
gpu::VertBufPtr extract_weights(const MeshRenderData &mr, const MeshBatchCache &batch_cache, MeshBufferCache &cache)
const Mesh & editmesh_final_or_this(const Object &object, const Mesh &mesh)
gpu::VertBufPtr extract_paint_overlay_flags(const MeshRenderData &mr)
gpu::IndexBufPtr extract_tris_subdiv(const DRWSubdivCache &subdiv_cache, MeshBatchCache &cache)
gpu::IndexBufPtr extract_face_dots(const MeshRenderData &mr)
BLI_INLINE const float * bm_face_no_get(const MeshRenderData &mr, const BMFace *efa)
gpu::VertBufPtr extract_face_dot_normals(const MeshRenderData &mr, bool use_hq)
void gather_vert_to_corner_gpu(const MeshRenderData &mr, MeshBufferCache &cache, gpu::VertBuf &src, gpu::VertBuf &dst)
void mesh_render_data_update_corner_normals(MeshRenderData &mr)
void extract_face_dots_subdiv(const DRWSubdivCache &subdiv_cache, gpu::VertBufPtr &fdots_pos, gpu::VertBufPtr *fdots_nor, gpu::IndexBufPtr &fdots)
gpu::VertBufPtr extract_edituv_stretch_area(const MeshRenderData &mr, float &tot_area, float &tot_uv_area)
gpu::VertBufPtr extract_edge_factor_subdiv(const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::VertBuf &pos)
const SortedFaceData & mesh_render_data_faces_sorted_ensure(const MeshRenderData &mr, MeshBufferCache &cache)
gpu::VertBufPtr extract_normals_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::VertBuf &pos)
gpu::VertBufPtr extract_attr_viewer(const MeshRenderData &mr, MeshBufferCache &cache)
gpu::IndexBufPtr extract_tris(const MeshRenderData &mr, const SortedFaceData &face_sorted)
gpu::IndexBufPtr extract_edituv_lines(const MeshRenderData &mr, UvExtractionMode mode)
gpu::VertBufPtr extract_face_dots_position(const MeshRenderData &mr)
BLI_INLINE const float * bm_vert_no_get(const MeshRenderData &mr, const BMVert *eve)
gpu::VertBufPtr extract_edituv_stretch_area_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, float &tot_area, float &tot_uv_area)
gpu::VertBufPtr extract_edge_factor(const MeshRenderData &mr)
MeshRenderData mesh_render_data_create(Object &object, Mesh &mesh, const bool is_editmode, const bool is_paint_mode, const bool do_final, const bool do_uvedit, const bool use_hide, const ToolSettings *ts)
void mesh_render_data_update_loose_geom(MeshRenderData &mr, MeshBufferCache &cache)
gpu::VertBufPtr extract_vert_index(const MeshRenderData &mr)
gpu::IndexBufPtr extract_lines_paint_mask_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
gpu::VertBufPtr extract_edituv_stretch_angle(const MeshRenderData &mr)
gpu::VertBufPtr extract_vert_normals(const MeshRenderData &mr, MeshBufferCache &cache)
void loose_data_upload(const MeshRenderData &mr, const Span< T > loose_data, gpu::VertBuf &dst)
gpu::VertBufPtr extract_uv_maps_subdiv(const DRWSubdivCache &subdiv_cache, const MeshBatchCache &cache)
gpu::IndexBufPtr extract_points(const MeshRenderData &mr)
gpu::VertBufPtr extract_face_index(const MeshRenderData &mr)
BLI_INLINE const float * bm_vert_co_get(const MeshRenderData &mr, const BMVert *eve)
gpu::VertBufPtr extract_attribute(const MeshRenderData &mr, MeshBufferCache &cache, StringRef name)
gpu::VertBufPtr extract_face_dots_uv(const MeshRenderData &mr)
gpu::VertBufPtr extract_face_dots_edituv_data(const MeshRenderData &mr)
gpu::VertBufPtr extract_mesh_analysis(const MeshRenderData &mr, const float4x4 &object_to_world)
gpu::VertBufPtr extract_sculpt_data(const MeshRenderData &mr)
gpu::VertBufPtr extract_edituv_data_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
void extract_lines_subdiv(const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::IndexBufPtr *lines, gpu::IndexBufPtr *lines_loose, bool &no_loose_wire)
void create_material_subranges(const SortedFaceData &face_sorted, gpu::IndexBuf &tris_ibo, MutableSpan< gpu::IndexBufPtr > ibos)
constexpr ParallelGrainSize grain_size(int grain_size)
std::unique_ptr< IndexBuf, IndexBufDeleter > IndexBufPtr
std::unique_ptr< gpu::VertBuf, gpu::VertBufDeleter > VertBufPtr
VecBase< uint32_t, 2 > uint2
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
ATTR_WARN_UNUSED_RESULT const BMLoop * l
BLI_INLINE BMEdge * BM_edge_at_index(BMesh *bm, const int index)
const Mesh * BKE_object_get_editmesh_eval_final(const Object *object)
void GPU_vertbuf_use(gpu::VertBuf *)
const GPUVertFormat * GPU_vertbuf_get_format(const gpu::VertBuf *verts)
MatBase< float, 4, 4 > float4x4
VecBase< int32_t, 2 > int2
void GPU_vertbuf_update_sub(gpu::VertBuf *verts, uint start, uint len, const void *data)
BLI_INLINE BMVert * BM_vert_at_index(BMesh *bm, const int index)
BLI_INLINE BMFace * BM_face_at_index(BMesh *bm, const int index)
VArraySpan< bool > hide_vert
const char * default_color_name
Span< float3 > bm_vert_coords
VArraySpan< bool > hide_edge
Span< float3 > bm_vert_normals
bke::EditMeshData * edit_data
const int * orig_index_vert
bool use_simplify_normals
const ToolSettings * toolsettings
Span< float3 > vert_positions
MeshExtractType extract_type
const int * orig_index_face
VArraySpan< bool > select_vert
VArraySpan< bool > sharp_faces
const char * active_color_name
int bm_free_normal_offset_face
VArraySpan< bool > select_poly
VArraySpan< bool > select_edge
Span< float3 > bm_face_normals
Span< float3 > face_normals
int bm_free_normal_offset_corner
const int * orig_index_edge
Span< float3 > corner_normals
VArraySpan< int > material_indices
VArraySpan< bool > hide_poly
OffsetIndices< int > faces
bke::MeshNormalDomain normals_domain
int bm_free_normal_offset_vert
Array< float3 > bm_loop_normals