|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "BLI_atomic_disjoint_set.hh"#include "BLI_bitmap.h"#include "BLI_blenlib.h"#include "BLI_math_matrix.h"#include "BLI_math_vector.h"#include "BLI_math_vector.hh"#include "BLI_task.hh"#include "BLI_vector_set.hh"#include "IMB_imbuf.hh"#include "IMB_imbuf_types.hh"#include "DNA_mesh_types.h"#include "DNA_meshdata_types.h"#include "DNA_object_types.h"#include "BKE_attribute.hh"#include "BKE_context.hh"#include "BKE_customdata.hh"#include "BKE_global.hh"#include "BKE_mesh.hh"#include "BKE_mesh_mapping.hh"#include "BKE_object.hh"#include "BKE_object_types.hh"#include "ED_mesh.hh"#include "ED_screen.hh"#include "ED_select_utils.hh"#include "ED_view3d.hh"#include "WM_api.hh"#include "WM_types.hh"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_query.hh"Go to the source code of this file.
|
static |
Join all edges of each face in the #AtomicDisjointSet. This can be used to find out which faces are connected to each other.
| islands | Is expected to be of length mesh->edges_num. |
| skip_seams | Faces separated by a seam will be treated as not connected. |
Definition at line 229 of file editface.cc.
Referenced by paintface_select_linked_faces().
|
static |
Definition at line 359 of file editface.cc.
References distance(), blender::math::distance_squared(), ED_view3d_project_float_object(), float, FLT_MAX, blender::math::midpoint(), V3D_PROJ_RET_OK, and V3D_PROJ_TEST_CLIP_DEFAULT.
Referenced by paintface_select_loop().
|
static |
Follow quads around the mesh by finding opposing edges.
Definition at line 406 of file editface.cc.
References blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), get_opposing_edge_index(), and size().
Referenced by paintface_select_loop().
|
static |
Definition at line 389 of file editface.cc.
References blender::Span< T >::first_index(), and blender::Span< T >::slice().
Referenced by follow_face_loop().
Definition at line 658 of file editface.cc.
References BKE_mesh_from_object(), paintface_flush_flags(), SEL_DESELECT, SEL_INVERT, SEL_SELECT, SEL_TOGGLE, and blender::bke::SpanAttributeWriter< T >::span.
Referenced by do_lasso_select_paintface(), do_paintface_box_select(), ed_wpaint_vertex_select_pick(), face_select_all_exec(), paint_facesel_circle_select(), paintface_mouse_select(), and paintface_select_loop_invoke().
Copy the face flags, most importantly selection from the mesh to the final evaluated mesh, use in object mode when selecting faces (while painting).
Definition at line 49 of file editface.cc.
References BKE_mesh_batch_cache_dirty_tag(), BKE_MESH_BATCH_DIRTY_ALL, BKE_MESH_BATCH_DIRTY_SELECT_PAINT, BKE_mesh_from_object(), BLI_assert, CD_ORIGINDEX, CTX_data_ensure_evaluated_depsgraph(), CustomData_get_layer(), Object::data, DEG_get_evaluated_object(), DEG_id_tag_update(), depsgraph, Mesh::face_data, Mesh::faces_num, ID_RECALC_SELECT, ID_RECALC_SYNC_TO_EVAL, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::AttributeAccessor::lookup_or_default(), blender::VArrayCommon< T >::materialize(), NC_GEOM, ND_SELECT, ORIGINDEX_NONE, Object::runtime, blender::bke::GSpanAttributeWriter::span, and WM_event_add_notifier().
Referenced by do_lasso_select_paintface(), do_paintface_box_select(), paint_facesel_circle_select(), paint_select_less_exec(), paint_select_more_exec(), paintface_deselect_all_visible(), paintface_hide(), paintface_mouse_select(), paintface_reveal(), paintface_select_linked(), and paintface_select_loop().
Definition at line 159 of file editface.cc.
References BKE_mesh_from_object(), blender::bke::SpanAttributeWriter< T >::finish(), paintface_flush_flags(), and blender::bke::SpanAttributeWriter< T >::span.
Referenced by face_select_hide_exec().
Definition at line 717 of file editface.cc.
References add_v3_v3v3(), BKE_mesh_from_object(), CD_PROP_FLOAT2, copy_m3_m4(), CustomData_has_layer(), minmax_v3v3_v3(), mul_v3_m3v3(), and blender::Span< T >::slice().
Referenced by viewselected_exec().
| bool paintface_mouse_select | ( | bContext * | C, |
| const int | mval[2], | ||
| const SelectPick_Params * | params, | ||
| Object * | ob ) |
Definition at line 756 of file editface.cc.
References BKE_mesh_from_object(), BLI_assert_unreachable, CTX_wm_region(), ED_MESH_PICK_DEFAULT_FACE_DIST, ED_mesh_pick_face(), ED_region_tag_redraw(), int, paintface_deselect_all_visible(), paintface_flush_flags(), params, SEL_DESELECT, SEL_OP_ADD, SEL_OP_AND, SEL_OP_SET, SEL_OP_SUB, and SEL_OP_XOR.
Referenced by view3d_select_exec().
Definition at line 193 of file editface.cc.
References BKE_mesh_from_object(), blender::VArrayCommon< T >::index_range(), paintface_flush_flags(), select(), and blender::bke::SpanAttributeWriter< T >::span.
Referenced by face_vert_reveal_exec().
| void paintface_select_less | ( | Mesh * | mesh, |
| const bool | face_step ) |
Definition at line 613 of file editface.cc.
References blender::Span< T >::slice(), and blender::bke::SpanAttributeWriter< T >::span.
Referenced by paint_select_less_exec().
Definition at line 319 of file editface.cc.
References BKE_mesh_from_object(), ED_MESH_PICK_DEFAULT_FACE_DIST, ED_mesh_pick_face(), blender::bke::SpanAttributeWriter< T >::finish(), indices, paintface_flush_flags(), paintface_select_linked_faces(), select(), and blender::bke::SpanAttributeWriter< T >::span.
Referenced by paint_select_linked_exec(), and paint_select_linked_pick_invoke().
|
static |
Definition at line 275 of file editface.cc.
References build_poly_connections(), and blender::Span< T >::slice().
Referenced by paintface_select_linked().
Definition at line 457 of file editface.cc.
References blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::as_span(), BKE_mesh_from_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_wm_region(), DEG_get_evaluated_object(), depsgraph, ED_MESH_PICK_DEFAULT_FACE_DIST, ED_mesh_pick_face(), ED_view3d_init_mats_rv3d(), ED_view3d_select_id_validate(), ED_view3d_viewcontext_init(), find_closest_edge_in_poly(), blender::bke::SpanAttributeWriter< T >::finish(), follow_face_loop(), paintface_flush_flags(), select(), blender::Span< T >::slice(), blender::bke::SpanAttributeWriter< T >::span, and verts.
Referenced by paintface_select_loop_invoke().
| void paintface_select_more | ( | Mesh * | mesh, |
| bool | face_step ) |
Grow the selection of faces.
| face_step | If true will also select faces that only touch on the corner. |
Definition at line 559 of file editface.cc.
References blender::bke::SpanAttributeWriter< T >::span.
Referenced by paint_select_more_exec().
Definition at line 1087 of file editface.cc.
References BKE_mesh_from_object(), BKE_mesh_mselect_clear(), BKE_mesh_mselect_validate(), ELEM, paintvert_flush_flags(), SEL_DESELECT, SEL_INVERT, SEL_SELECT, SEL_TOGGLE, and blender::bke::SpanAttributeWriter< T >::span.
Referenced by do_lasso_select_paintvert(), do_paintvert_box_select(), ed_wpaint_vertex_select_pick(), paint_vertsel_circle_select(), paintvert_select_ungrouped(), and vert_select_all_exec().
| void paintvert_flush_flags | ( | Object * | ob | ) |
(similar to void paintface_flush_flags(Object *ob)) copy the vertex flags, most importantly selection from the mesh to the final evaluated mesh, use in object mode when selecting vertices (while painting).
Definition at line 822 of file editface.cc.
References BKE_mesh_batch_cache_dirty_tag(), BKE_MESH_BATCH_DIRTY_ALL, BKE_mesh_from_object(), BKE_object_get_evaluated_mesh(), CD_ORIGINDEX, CustomData_get_layer(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::AttributeAccessor::lookup_or_default(), blender::VArrayCommon< T >::materialize(), ORIGINDEX_NONE, blender::bke::GSpanAttributeWriter::span, and Mesh::vert_data.
Referenced by do_lasso_select_paintvert(), do_paintvert_box_select(), ed_wpaint_vertex_select_pick(), paint_vertsel_circle_select(), paintvert_deselect_all_visible(), paintvert_hide(), paintvert_reveal(), paintvert_select_less_exec(), paintvert_select_more_exec(), paintvert_select_ungrouped(), and blender::ed::object::vgroup_select_verts().
Definition at line 1193 of file editface.cc.
References BKE_mesh_from_object(), blender::bke::SpanAttributeWriter< T >::finish(), paintvert_flush_flags(), paintvert_tag_select_update(), and blender::bke::SpanAttributeWriter< T >::span.
Referenced by vert_select_hide_exec().
Definition at line 1227 of file editface.cc.
References BKE_mesh_from_object(), paintvert_flush_flags(), paintvert_tag_select_update(), select(), and blender::bke::SpanAttributeWriter< T >::span.
Referenced by face_vert_reveal_exec().
| void paintvert_select_less | ( | Mesh * | mesh, |
| const bool | face_step ) |
Definition at line 1026 of file editface.cc.
References face_step(), blender::bke::SpanAttributeWriter< T >::finish(), blender::Span< T >::size(), blender::Span< T >::slice(), and blender::bke::SpanAttributeWriter< T >::span.
Referenced by paintvert_select_less_exec().
Definition at line 945 of file editface.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BKE_mesh_from_object(), blender::bke::SpanAttributeWriter< T >::finish(), indices, paintvert_select_linked_vertices(), and blender::bke::SpanAttributeWriter< T >::span.
Referenced by paintvert_select_linked_exec().
| void paintvert_select_linked_pick | ( | bContext * | C, |
| Object * | ob, | ||
| const int | region_coordinates[2], | ||
| const bool | select ) |
Definition at line 931 of file editface.cc.
References ED_MESH_PICK_DEFAULT_VERT_DIST, ED_mesh_pick_vert(), int, paintvert_select_linked_vertices(), and select().
Referenced by paintvert_select_linked_pick_invoke().
|
static |
Definition at line 881 of file editface.cc.
References BKE_mesh_from_object().
Referenced by paintvert_select_linked(), and paintvert_select_linked_pick().
| void paintvert_select_more | ( | Mesh * | mesh, |
| const bool | face_step ) |
Definition at line 968 of file editface.cc.
References face_step(), blender::bke::SpanAttributeWriter< T >::finish(), blender::Span< T >::slice(), and blender::bke::SpanAttributeWriter< T >::span.
Referenced by paintvert_select_more_exec().
| void paintvert_select_ungrouped | ( | Object * | ob, |
| bool | extend, | ||
| bool | flush_flags ) |
Definition at line 1155 of file editface.cc.
References BKE_mesh_from_object(), blender::Span< T >::is_empty(), paintvert_deselect_all_visible(), paintvert_flush_flags(), SEL_DESELECT, and blender::bke::SpanAttributeWriter< T >::span.
Referenced by vert_select_ungrouped_exec().
Definition at line 1081 of file editface.cc.
References Object::data, DEG_id_tag_update(), ID_RECALC_SELECT, ID_RECALC_SYNC_TO_EVAL, NC_GEOM, ND_SELECT, and WM_event_add_notifier().
Referenced by do_lasso_select_paintvert(), do_paintvert_box_select(), ed_wpaint_vertex_select_pick(), paint_vertsel_circle_select(), paintvert_hide(), paintvert_reveal(), paintvert_select_less_exec(), paintvert_select_more_exec(), vert_select_all_exec(), and vert_select_ungrouped_exec().
|
static |
Definition at line 536 of file editface.cc.
References face_step().
|
static |
Definition at line 592 of file editface.cc.
References face_step().