Blender V5.0
editface.cc File Reference
#include "BLI_atomic_disjoint_set.hh"
#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 "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_mesh.hh"
#include "BKE_mesh_mapping.hh"
#include "BKE_object.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.

Functions

void paintface_flush_flags (bContext *C, Object *ob, const bool flush_selection, const bool flush_hidden)
void paintface_hide (bContext *C, Object *ob, const bool unselected)
void paintface_reveal (bContext *C, Object *ob, const bool select)
static void build_poly_connections (blender::AtomicDisjointSet &islands, Mesh &mesh, const bool skip_seams=true)
static void paintface_select_linked_faces (Mesh &mesh, const blender::Span< int > face_indices, const bool select)
void paintface_select_linked (bContext *C, Object *ob, const int mval[2], const bool select)
static int get_opposing_edge_index (const blender::IndexRange face, const blender::Span< int > corner_edges, const int current_edge_index)
static bool follow_face_loop (const int face_start_index, const int edge_start_index, const blender::OffsetIndices< int > faces, const blender::VArray< bool > &hide_poly, const blender::Span< int > corner_edges, const blender::GroupedSpan< int > edge_to_face_map, blender::VectorSet< int > &r_loop_faces)
void paintface_select_loop (bContext *C, Object *ob, const int mval[2], const bool select)
static bool poly_has_selected_neighbor (blender::Span< int > face_edges, blender::Span< blender::int2 > edges, blender::Span< bool > select_vert, const bool face_step)
void paintface_select_more (Mesh *mesh, const bool face_step)
static bool poly_has_unselected_neighbor (blender::Span< int > face_edges, blender::Span< blender::int2 > edges, blender::BitSpan verts_of_unselected_faces, const bool face_step)
void paintface_select_less (Mesh *mesh, const bool face_step)
bool paintface_deselect_all_visible (bContext *C, Object *ob, int action, bool flush_flags)
bool paintface_minmax (Object *ob, float r_min[3], float r_max[3])
bool paintface_mouse_select (bContext *C, const int mval[2], const SelectPick_Params &params, Object *ob)
void paintvert_flush_flags (Object *ob)
static void paintvert_select_linked_vertices (bContext *C, Object *ob, const blender::Span< int > vertex_indices, const bool select)
void paintvert_select_linked_pick (bContext *C, Object *ob, const int region_coordinates[2], const bool select)
void paintvert_select_linked (bContext *C, Object *ob)
void paintvert_select_more (Mesh *mesh, const bool face_step)
void paintvert_select_less (Mesh *mesh, const bool face_step)
void paintvert_tag_select_update (bContext *C, Object *ob)
bool paintvert_deselect_all_visible (Object *ob, int action, bool flush_flags)
void paintvert_select_ungrouped (Object *ob, bool extend, bool flush_flags)
void paintvert_hide (bContext *C, Object *ob, const bool unselected)
void paintvert_reveal (bContext *C, Object *ob, const bool select)

Function Documentation

◆ build_poly_connections()

void build_poly_connections ( blender::AtomicDisjointSet & islands,
Mesh & mesh,
const bool skip_seams = true )
static

Join all edges of each face in the #AtomicDisjointSet. This can be used to find out which faces are connected to each other.

Parameters
islandsIs expected to be of length mesh->edges_num.
skip_seamsFaces separated by a seam will be treated as not connected.

Definition at line 220 of file editface.cc.

References Geometry::attributes, blender::bke::Edge, blender::bke::Face, faces, blender::bke::AttributeAccessor::lookup_or_default(), and blender::threading::parallel_for().

Referenced by paintface_select_linked_faces().

◆ follow_face_loop()

bool follow_face_loop ( const int face_start_index,
const int edge_start_index,
const blender::OffsetIndices< int > faces,
const blender::VArray< bool > & hide_poly,
const blender::Span< int > corner_edges,
const blender::GroupedSpan< int > edge_to_face_map,
blender::VectorSet< int > & r_loop_faces )
static

Follow quads around the mesh by finding opposing edges.

Returns
True if the search has looped back on itself, finding the same index twice.

Definition at line 367 of file editface.cc.

References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), faces, get_opposing_edge_index(), and size().

Referenced by paintface_select_loop().

◆ get_opposing_edge_index()

int get_opposing_edge_index ( const blender::IndexRange face,
const blender::Span< int > corner_edges,
const int current_edge_index )
static

Definition at line 350 of file editface.cc.

References blender::Span< T >::first_index(), and blender::Span< T >::slice().

Referenced by follow_face_loop().

◆ paintface_deselect_all_visible()

◆ paintface_flush_flags()

◆ paintface_hide()

◆ paintface_minmax()

◆ paintface_mouse_select()

◆ paintface_reveal()

◆ paintface_select_less()

◆ paintface_select_linked()

◆ paintface_select_linked_faces()

◆ paintface_select_loop()

◆ paintface_select_more()

void paintface_select_more ( Mesh * mesh,
bool face_step )

◆ paintvert_deselect_all_visible()

◆ paintvert_flush_flags()

◆ paintvert_hide()

◆ paintvert_reveal()

◆ paintvert_select_less()

◆ paintvert_select_linked()

◆ paintvert_select_linked_pick()

void paintvert_select_linked_pick ( bContext * C,
Object * ob,
const int region_coordinates[2],
const bool select )

◆ paintvert_select_linked_vertices()

void paintvert_select_linked_vertices ( bContext * C,
Object * ob,
const blender::Span< int > vertex_indices,
const bool select )
static

◆ paintvert_select_more()

◆ paintvert_select_ungrouped()

◆ paintvert_tag_select_update()

◆ poly_has_selected_neighbor()

bool poly_has_selected_neighbor ( blender::Span< int > face_edges,
blender::Span< blender::int2 > edges,
blender::Span< bool > select_vert,
const bool face_step )
static

Definition at line 501 of file editface.cc.

References face_step().

◆ poly_has_unselected_neighbor()

bool poly_has_unselected_neighbor ( blender::Span< int > face_edges,
blender::Span< blender::int2 > edges,
blender::BitSpan verts_of_unselected_faces,
const bool face_step )
static

Definition at line 557 of file editface.cc.

References face_step().