52 for (
int j = 0; j < 2; j++) {
57 for (
int j = 0; j < 2; j++) {
113 MEM_SAFE_DELETE(psel->
edges);
116 MEM_SAFE_DELETE(psel->
verts);
123 switch (preselect_color) {
184 for (
int i = 0; i < psel->
edges_len; i++) {
202 for (
int i = 0; i < psel->
verts_len; i++) {
223 vcos_get(eve, verts[0], vert_positions);
243 BMEdge *e_pair[2] = {
nullptr};
246 if (v_act->
e !=
nullptr) {
247 for (
uint allow_wire = 0; allow_wire < 2 && (e_pair[1] ==
nullptr); allow_wire++) {
255 e_pair[0] = e_pair[1] =
nullptr;
258 e_pair[i++] = e_iter;
264 if (e_pair[1] !=
nullptr) {
287 if (e_pair[0]->v1 == v_act) {
295 if (e_pair[1]->v1 == v_act) {
318 }
while ((l_iter = l_iter->
next) != l_first);
361 }
while ((l_iter = l_iter->
next) != l_first);
380 psel,
bm,
reinterpret_cast<BMVert *
>(ele), vert_positions);
384 psel,
bm,
reinterpret_cast<BMEdge *
>(ele), vert_positions);
388 psel,
bm,
reinterpret_cast<BMFace *
>(ele), vert_positions);
404 psel, vc,
bm,
reinterpret_cast<BMVert *
>(ele), mval);
409 psel, vc,
bm,
reinterpret_cast<BMEdge *
>(ele), mval);
413 psel, vc,
bm,
reinterpret_cast<BMFace *
>(ele), mval);
Object is a sort of wrapper for general info.
Read Blender memory allocation and freeing.
#define BM_DISK_EDGE_NEXT(e, v)
#define BM_FACE_FIRST_LOOP(p)
#define BM_elem_index_get(ele)
#define BM_elem_flag_test(ele, hflag)
constexpr bool is_empty() const
void * MEM_new_uninitialized(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void BM_mesh_elem_index_ensure(BMesh *bm, const char htype)
BLI_INLINE bool BM_edge_is_wire(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
MINLINE void copy_v3_v3(float r[3], const float a[3])
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
EditMesh_PreSelElem * EDBM_preselect_elem_create()
static void vcos_get(BMVert *v, float r_co[3], const Span< float3 > vert_positions)
eEditMesh_PreSelPreviewAction
@ PRESELECT_ACTION_CREATE
@ PRESELECT_ACTION_TRANSFORM
@ PRESELECT_ACTION_DELETE
void immUniformColor4ub(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
void EDBM_preselect_elem_update_from_single(EditMesh_PreSelElem *psel, BMesh *bm, BMElem *ele, Span< float3 > vert_positions)
void mul_v3_m4v3(float r[3], const float mat[4][4], const float vec[3])
GPUVertFormat * immVertexFormat()
static void view3d_preselect_update_preview_triangle_from_face(EditMesh_PreSelElem *psel, ViewContext *, BMesh *, BMFace *efa, const int[2])
void GPU_point_size(float size)
void immBegin(GPUPrimType, uint vertex_len)
ATTR_WARN_UNUSED_RESULT const BMVert * v
void GPU_matrix_mul(const float m[4][4])
void GPU_line_width(float width)
void EDBM_preselect_elem_destroy(EditMesh_PreSelElem *psel)
void immBindBuiltinProgram(GPUBuiltinShader shader_id)
void mul_m4_v3(const float M[4][4], float r[3])
static void view3d_preselect_update_preview_triangle_from_vert(EditMesh_PreSelElem *psel, ViewContext *vc, BMesh *, BMVert *eed, const int mval[2])
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void EDBM_preselect_elem_draw(EditMesh_PreSelElem *psel, const float matrix[4][4])
@ GPU_SHADER_3D_UNIFORM_COLOR
@ GPU_SHADER_3D_POINT_UNIFORM_COLOR
static void vcos_get_pair(BMVert *v[2], float r_cos[2][3], const Span< float3 > vert_positions)
eEditMesh_PreSelPreviewAction EDBM_preselect_action_get(EditMesh_PreSelElem *psel)
BLI_INLINE bool BM_edge_is_boundary(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
static void view3d_preselect_mesh_elem_update_from_face(EditMesh_PreSelElem *psel, BMesh *, BMFace *efa, const Span< float3 > vert_positions)
static void view3d_preselect_mesh_elem_update_from_edge(EditMesh_PreSelElem *psel, BMesh *, BMEdge *eed, const Span< float3 > vert_positions)
uint GPU_vertformat_attr_add(GPUVertFormat *format, StringRef name, gpu::VertAttrType type)
void EDBM_preselect_action_set(EditMesh_PreSelElem *psel, eEditMesh_PreSelPreviewAction action)
static void edbm_preselect_imm_color(PreselectColor preselect_color)
void immVertex3fv(uint attr_id, const float data[3])
void mid_v3_v3v3(float r[3], const float a[3], const float b[3])
void EDBM_preselect_elem_update_preview(EditMesh_PreSelElem *psel, ViewContext *vc, BMesh *bm, BMElem *ele, const int mval[2])
void EDBM_preselect_elem_clear(EditMesh_PreSelElem *psel)
static void view3d_preselect_update_preview_triangle_from_edge(EditMesh_PreSelElem *psel, ViewContext *vc, BMesh *, BMEdge *eed, const int mval[2])
void ED_view3d_win_to_3d_int(const View3D *v3d, const ARegion *region, const float depth_pt[3], const int mval[2], float r_out[3])
void EDBM_preselect_preview_clear(EditMesh_PreSelElem *psel)
void GPU_depth_test(GPUDepthTest test)
static void view3d_preselect_mesh_elem_update_from_vert(EditMesh_PreSelElem *psel, BMesh *, BMVert *eve, const Span< float3 > vert_positions)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
eEditMesh_PreSelPreviewAction preview_action
float(* preview_lines)[2][3]
float(* preview_tris)[3][3]