35#define USE_TRICKY_EXTEND
48 for (
Object *obedit : objects) {
62 if (
bm->totvertsel == 0) {
82 mul_v2_fl(cent_sco, 1.0f /
float(cent_tot));
94 float cent_sco_test[2];
102 if (dist_sq_test < dist_sq_best) {
103 dist_sq_best = dist_sq_test;
126#ifdef USE_TRICKY_EXTEND
147 else if (tot_sel == 0) {
173 if (angle_test < angle_best) {
174 angle_best = angle_test;
181#ifdef USE_TRICKY_EXTEND
203 if (
bm->uv_select_sync_valid) {
206 l_iter = l_first = e_best->
l;
208 bool was_select =
false;
209 if (l_iter->
next->
e == e_new) {
226 }
while ((l_iter = l_iter->
radial_next) != l_first);
241 params.calc_looptris =
true;
242 params.calc_normals =
false;
243 params.is_destructive =
true;
254 ot->name =
"Extend Vertices";
255 ot->idname =
"MESH_OT_rip_edge";
256 ot->description =
"Extend vertices along the edge closest to the cursor";
Scene * CTX_data_scene(const bContext *C)
RegionView3D * CTX_wm_region_view3d(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
View3D * CTX_wm_view3d(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
BMEditMesh * BKE_editmesh_from_object(Object *ob)
Return the BMEditMesh for a given object.
blender::Vector< Object * > BKE_view_layer_array_from_objects_in_edit_mode_unique_data(const Scene *scene, ViewLayer *view_layer, const View3D *v3d)
float closest_to_line_segment_v2(float r_close[2], const float p[2], const float l1[2], const float l2[2])
MINLINE float len_squared_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
float angle_normalized_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void mul_v2_fl(float r[2], float f)
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void add_v2_v2(float r[2], const float a[2])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void zero_v2(float r[2])
MINLINE float normalize_v2(float n[2])
Object is a sort of wrapper for general info.
void EDBM_update(Mesh *mesh, const EDBMUpdate_Params *params)
blender::float2 ED_view3d_project_float_v2_m4(const ARegion *region, const float co[3], const blender::float4x4 &mat)
blender::float4x4 ED_view3d_ob_project_mat_get(const RegionView3D *rv3d, const Object *ob)
@ OPTYPE_DEPENDS_ON_CURSOR
#define BM_elem_flag_disable(ele, hflag)
#define BM_elem_flag_test(ele, hflag)
#define BM_elem_flag_test_bool(ele, hflag)
#define BM_elem_flag_enable(ele, hflag)
#define BM_ITER_ELEM(ele, iter, data, itype)
#define BM_ITER_MESH(ele, iter, bm, itype)
void BM_select_history_clear(BMesh *bm)
void BM_mesh_select_mode_flush(BMesh *bm)
void BM_vert_select_set(BMesh *bm, BMVert *v, const bool select)
Select Vert.
void BM_edge_select_set(BMesh *bm, BMEdge *e, const bool select)
Select Edge.
BMVert * BM_edge_split(BMesh *bm, BMEdge *e, BMVert *v, BMEdge **r_e, float fac)
Edge Split.
BLI_INLINE BMVert * BM_edge_other_vert(BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
void BM_loop_edge_uvselect_set(BMesh *bm, BMLoop *l, bool select)
static wmOperatorStatus edbm_rip_edge_invoke(bContext *C, wmOperator *, const wmEvent *event)
void MESH_OT_rip_edge(wmOperatorType *ot)
bool EDBM_view3d_poll(bContext *C)
MatBase< float, 4, 4 > float4x4
VecBase< float, 2 > float2
struct BMLoop * radial_next