|
Blender V5.0
|
#include "MEM_guardedalloc.h"#include "BLI_bitmap.h"#include "BLI_kdtree.h"#include "BLI_listbase.h"#include "BLI_math_geom.h"#include "BLI_math_matrix.h"#include "BLI_math_vector.h"#include "BLI_set.hh"#include "BLT_translation.hh"#include "BKE_context.hh"#include "BKE_customdata.hh"#include "BKE_deform.hh"#include "BKE_editmesh.hh"#include "BKE_layer.hh"#include "BKE_material.hh"#include "BKE_object_types.hh"#include "BKE_report.hh"#include "DNA_meshdata_types.h"#include "WM_api.hh"#include "WM_types.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "ED_mesh.hh"#include "ED_screen.hh"#include "ED_select_utils.hh"#include "mesh_intern.hh"Go to the source code of this file.
Functions | |
Select Similar Vert | |
| static wmOperatorStatus | similar_vert_select_exec (bContext *C, wmOperator *op) |
Select Similar Operator | |
| static wmOperatorStatus | edbm_select_similar_exec (bContext *C, wmOperator *op) |
| static const EnumPropertyItem * | select_similar_type_itemf (bContext *C, PointerRNA *, PropertyRNA *, bool *r_free) |
| static bool | edbm_select_similar_poll_property (const bContext *, wmOperator *op, const PropertyRNA *prop) |
| void | MESH_OT_select_similar (wmOperatorType *ot) |
Select Similar Face | |
| enum | { SIMFACE_DATA_NONE = 0 , SIMFACE_DATA_TRUE = (1 << 0) , SIMFACE_DATA_FALSE = (1 << 1) , SIMFACE_DATA_ALL = (SIMFACE_DATA_TRUE | SIMFACE_DATA_FALSE) } |
| static bool | face_data_value_set (BMFace *face, const int hflag, int *r_value) |
| static void | face_to_plane (const Object *ob, BMFace *face, float r_plane[4]) |
| static wmOperatorStatus | similar_face_select_exec (bContext *C, wmOperator *op) |
Select Similar Edge | |
| enum | { SIMEDGE_DATA_NONE = 0 , SIMEDGE_DATA_TRUE = (1 << 0) , SIMEDGE_DATA_FALSE = (1 << 1) , SIMEDGE_DATA_ALL = (SIMEDGE_DATA_TRUE | SIMEDGE_DATA_FALSE) } |
| static void | edge_pos_direction_worldspace_get (Object *ob, BMEdge *edge, float *r_dir) |
| static float | edge_length_squared_worldspace_get (Object *ob, BMEdge *edge) |
| static bool | edge_data_value_set (BMEdge *edge, const int hflag, int *r_value) |
| static wmOperatorStatus | similar_edge_select_exec (bContext *C, wmOperator *op) |
Select Similar (Vert/Edge/Face) Operator - common | |
| static const EnumPropertyItem | prop_similar_compare_types [] |
| static const EnumPropertyItem | prop_similar_types [] |
| static int | mesh_select_similar_compare_int (const int delta, const int compare) |
| anonymous enum |
| Enumerator | |
|---|---|
| SIMFACE_DATA_NONE | |
| SIMFACE_DATA_TRUE | |
| SIMFACE_DATA_FALSE | |
| SIMFACE_DATA_ALL | |
Definition at line 111 of file editmesh_select_similar.cc.
| anonymous enum |
| Enumerator | |
|---|---|
| SIMEDGE_DATA_NONE | |
| SIMEDGE_DATA_TRUE | |
| SIMEDGE_DATA_FALSE | |
| SIMEDGE_DATA_ALL | |
Definition at line 533 of file editmesh_select_similar.cc.
|
static |
Definition at line 1271 of file editmesh_select_similar.cc.
References C, CTX_data_tool_settings(), wmOperator::ptr, RNA_enum_get(), RNA_property_float_get(), RNA_property_float_set(), RNA_property_is_set(), RNA_struct_find_property(), ToolSettings::select_thresh, similar_edge_select_exec(), similar_face_select_exec(), and similar_vert_select_exec().
Referenced by MESH_OT_select_similar().
|
static |
Definition at line 1342 of file editmesh_select_similar.cc.
References ELEM, wmOperator::ptr, RNA_enum_get(), RNA_property_identifier(), SIMEDGE_BEVEL, SIMEDGE_CREASE, SIMEDGE_DIR, SIMEDGE_FACE_ANGLE, SIMEDGE_LENGTH, SIMFACE_AREA, SIMFACE_COPLANAR, SIMFACE_NORMAL, SIMFACE_PERIMETER, SIMVERT_NORMAL, SIMVERT_VGROUP, and STREQ.
Referenced by MESH_OT_select_similar().
|
static |
Return true if we still don't know the final value for this edge data. In other words, if we need to keep iterating over the objects or we can just go ahead and select all the objects.
Definition at line 545 of file editmesh_select_similar.cc.
References BM_elem_flag_test, SIMEDGE_DATA_ALL, SIMEDGE_DATA_FALSE, and SIMEDGE_DATA_TRUE.
Referenced by similar_edge_select_exec().
Definition at line 523 of file editmesh_select_similar.cc.
References BMVert::co, len_squared_v3v3(), mul_v3_mat3_m4v3(), BMEdge::v1, BMEdge::v2, and v2.
Referenced by similar_edge_select_exec().
Definition at line 510 of file editmesh_select_similar.cc.
References BMVert::co, copy_v3_v3(), mul_m4_v3(), normalize_v3(), sub_v3_v3v3(), BMEdge::v1, BMEdge::v2, and v2.
Referenced by similar_edge_select_exec().
|
static |
Return true if we still don't know the final value for this edge data. In other words, if we need to keep iterating over the objects or we can just go ahead and select all the objects.
Definition at line 123 of file editmesh_select_similar.cc.
References BM_elem_flag_test, SIMFACE_DATA_ALL, SIMFACE_DATA_FALSE, and SIMFACE_DATA_TRUE.
Referenced by similar_face_select_exec().
World space normalized plane from a face.
Definition at line 138 of file editmesh_select_similar.cc.
References BM_FACE_FIRST_LOOP, copy_v3_v3(), mul_transposed_mat3_m4_v3(), mul_v3_m4v3(), BMFace::no, normalize_v3(), plane_from_point_normal_v3(), and v.
Referenced by similar_face_select_exec().
| void MESH_OT_select_similar | ( | wmOperatorType * | ot | ) |
Definition at line 1376 of file editmesh_select_similar.cc.
References BLT_I18NCONTEXT_ID_MESH, ED_operator_editmesh(), edbm_select_similar_exec(), edbm_select_similar_poll_property(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, prop_similar_compare_types, prop_similar_types, RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_float(), RNA_def_property_translation_context(), RNA_def_property_ui_range(), select_similar_type_itemf(), SIM_CMP_EQ, SIMVERT_NORMAL, and WM_menu_invoke().
Referenced by ED_operatortypes_mesh().
|
static |
Definition at line 90 of file editmesh_select_similar.cc.
References BLI_assert, SIM_CMP_EQ, SIM_CMP_GT, and SIM_CMP_LT.
Referenced by similar_edge_select_exec(), similar_face_select_exec(), and similar_vert_select_exec().
|
static |
Definition at line 1294 of file editmesh_select_similar.cc.
References BKE_editmesh_from_object(), C, CTX_data_edit_object(), OB_MESH, prop_similar_types, RNA_enum_item_end(), RNA_enum_items_add_value(), SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, BMEditMesh::selectmode, SIMEDGE_LENGTH, SIMFACE_FREESTYLE, SIMFACE_MATERIAL, SIMFACE_SMOOTH, SIMVERT_NORMAL, and Object::type.
Referenced by MESH_OT_select_similar().
|
static |
Definition at line 560 of file editmesh_select_similar.cc.
References angle(), angle_normalized_v3v3(), BKE_editmesh_from_object(), BKE_report(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data(), BLI_assert, BLI_gset_add(), BLI_gset_free(), BLI_gset_ptr_new(), BLI_gsetIterator_getKey(), bm, BMEditMesh::bm, BM_edge_calc_face_angle_with_imat3(), BM_edge_face_count(), BM_edge_face_count_at_most(), BM_edge_select_set(), BM_EDGES_OF_MESH, BM_ELEM_CD_GET_BOOL, BM_ELEM_CD_GET_FLOAT_P, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SEAM, BM_ELEM_SELECT, BM_ELEM_SMOOTH, BM_ITER_MESH, C, CD_PROP_BOOL, CD_PROP_FLOAT, copy_m3_m4(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), CustomData_get_offset_named(), CustomData_has_layer_named(), ED_select_similar_compare_float_tree(), EDBM_selectmode_flush(), EDBM_update(), EDBM_uvselect_clear(), edge_data_value_set(), edge_length_squared_worldspace_get(), edge_pos_direction_worldspace_get(), ELEM, float, GSET_ITER, invert_m3_m3(), length(), M_PI, mesh_select_similar_compare_int(), negate_v3_v3(), OPERATOR_CANCELLED, OPERATOR_FINISHED, params, POINTER_AS_INT, POINTER_FROM_INT, pos, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RNA_float_get(), RPT_ERROR, select, SIM_CMP_EQ, SIMEDGE_BEVEL, SIMEDGE_CREASE, SIMEDGE_DATA_ALL, SIMEDGE_DATA_FALSE, SIMEDGE_DATA_NONE, SIMEDGE_DATA_TRUE, SIMEDGE_DIR, SIMEDGE_FACE, SIMEDGE_FACE_ANGLE, SIMEDGE_FREESTYLE, SIMEDGE_LENGTH, SIMEDGE_SEAM, SIMEDGE_SHARP, and BMesh::totedgesel.
Referenced by edbm_select_similar_exec().
|
static |
Definition at line 152 of file editmesh_select_similar.cc.
References angle_normalized_v3v3(), angle_v3v3(), BKE_editmesh_from_object(), BKE_object_material_array_p(), BKE_report(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data(), BLI_assert, BLI_gset_add(), BLI_gset_free(), BLI_gset_ptr_new(), BLI_gsetIterator_getKey(), bm, BMEditMesh::bm, BM_ELEM_CD_GET_BOOL, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, BM_ELEM_SMOOTH, BM_face_calc_area_with_mat3(), BM_face_calc_perimeter_with_mat3(), BM_face_select_set(), BM_FACES_OF_MESH, BM_ITER_MESH, C, CD_PROP_BOOL, copy_m3_m4(), copy_v3_v3(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), CustomData_get_offset_named(), ED_select_similar_compare_float_tree(), EDBM_selectmode_flush(), EDBM_update(), EDBM_uvselect_clear(), ELEM, fabsf, face_data_value_set(), face_to_plane(), float, GSET_ITER, invert_m4_m4(), BMFace::len, M_PI, BMFace::mat_nr, mesh_select_similar_compare_int(), mul_transposed_mat3_m4_v3(), BMFace::no, normalize_v3(), OPERATOR_CANCELLED, OPERATOR_FINISHED, params, POINTER_AS_INT, POINTER_FROM_INT, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RNA_float_get(), RPT_ERROR, select, SIMFACE_AREA, SIMFACE_COPLANAR, SIMFACE_DATA_ALL, SIMFACE_DATA_FALSE, SIMFACE_DATA_NONE, SIMFACE_DATA_TRUE, SIMFACE_FREESTYLE, SIMFACE_MATERIAL, SIMFACE_NORMAL, SIMFACE_PERIMETER, SIMFACE_SIDES, SIMFACE_SMOOTH, and BMesh::totfacesel.
Referenced by edbm_select_similar_exec().
|
static |
Definition at line 953 of file editmesh_select_similar.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_as(), angle_normalized_v3v3(), BKE_defgroup_name_index(), BKE_editmesh_from_object(), BKE_object_defgroup_count(), BKE_object_defgroup_list(), BKE_report(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data(), BLI_BITMAP_ENABLE, BLI_BITMAP_NEW, BLI_BITMAP_TEST, BLI_listbase_count(), bm, BMEditMesh::bm, BM_ELEM_CD_GET_FLOAT_P, BM_ELEM_CD_GET_VOID_P, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, BM_ITER_MESH, BM_vert_edge_count(), BM_vert_face_count(), BM_vert_select_set(), BM_VERTS_OF_MESH, C, CD_MDEFORMVERT, CD_PROP_FLOAT, copy_v3_v3(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), CustomData_get_offset(), CustomData_get_offset_named(), CustomData_has_layer_named(), MDeformWeight::def_nr, MDeformVert::dw, ED_select_similar_compare_float_tree(), EDBM_selectmode_flush(), EDBM_update(), float, i, invert_m4_m4(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), LIKELY, LISTBASE_FOREACH, M_PI, MEM_freeN(), mesh_select_similar_compare_int(), mul_transposed_mat3_m4_v3(), name, BMVert::no, normalize_v3(), OPERATOR_CANCELLED, OPERATOR_FINISHED, params, pos, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RNA_float_get(), RPT_ERROR, RPT_INFO, select, SIMVERT_CREASE, SIMVERT_EDGE, SIMVERT_FACE, SIMVERT_NORMAL, SIMVERT_VGROUP, BMesh::totvertsel, MDeformVert::totweight, and MDeformWeight::weight.
Referenced by edbm_select_similar_exec().
|
static |
Definition at line 50 of file editmesh_select_similar.cc.
Referenced by MESH_OT_select_similar(), and UV_OT_select_similar().
|
static |
Definition at line 57 of file editmesh_select_similar.cc.