|
Blender
V2.93
|
#include "DNA_armature_types.h"#include "DNA_curve_types.h"#include "DNA_lattice_types.h"#include "DNA_mesh_types.h"#include "DNA_meshdata_types.h"#include "DNA_meta_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "BLI_math_geom.h"#include "BLI_rect.h"#include "BLI_utildefines.h"#include "BKE_DerivedMesh.h"#include "BKE_action.h"#include "BKE_armature.h"#include "BKE_curve.h"#include "BKE_displist.h"#include "BKE_editmesh.h"#include "BKE_mesh_iterators.h"#include "BKE_mesh_runtime.h"#include "BKE_modifier.h"#include "DEG_depsgraph.h"#include "DEG_depsgraph_query.h"#include "bmesh.h"#include "ED_armature.h"#include "ED_screen.h"#include "ED_view3d.h"Go to the source code of this file.
Classes | |
| struct | foreachScreenObjectVert_userData |
| struct | foreachScreenVert_userData |
| struct | foreachScreenEdge_userData |
| struct | foreachScreenFace_userData |
Typedefs | |
| typedef struct foreachScreenObjectVert_userData | foreachScreenObjectVert_userData |
| typedef struct foreachScreenVert_userData | foreachScreenVert_userData |
| typedef struct foreachScreenEdge_userData | foreachScreenEdge_userData |
| typedef struct foreachScreenFace_userData | foreachScreenFace_userData |
Functions | |
| static void | meshobject_foreachScreenVert__mapFunc (void *userData, int index, const float co[3], const float UNUSED(no_f[3]), const short UNUSED(no_s[3])) |
| void | meshobject_foreachScreenVert (ViewContext *vc, void(*func)(void *userData, MVert *eve, const float screen_co[2], int index), void *userData, eV3DProjTest clip_flag) |
| static void | mesh_foreachScreenVert__mapFunc (void *userData, int index, const float co[3], const float UNUSED(no_f[3]), const short UNUSED(no_s[3])) |
| void | mesh_foreachScreenVert (ViewContext *vc, void(*func)(void *userData, BMVert *eve, const float screen_co[2], int index), void *userData, eV3DProjTest clip_flag) |
| static void | mesh_foreachScreenEdge__mapFunc (void *userData, int index, const float v0co[3], const float v1co[3]) |
| void | mesh_foreachScreenEdge (ViewContext *vc, void(*func)(void *userData, BMEdge *eed, const float screen_co_a[2], const float screen_co_b[2], int index), void *userData, eV3DProjTest clip_flag) |
| static void | mesh_foreachScreenEdge_clip_bb_segment__mapFunc (void *userData, int index, const float v0co[3], const float v1co[3]) |
| void | mesh_foreachScreenEdge_clip_bb_segment (ViewContext *vc, void(*func)(void *userData, BMEdge *eed, const float screen_co_a[2], const float screen_co_b[2], int index), void *userData, eV3DProjTest clip_flag) |
| static void | mesh_foreachScreenFace__mapFunc (void *userData, int index, const float cent[3], const float UNUSED(no[3])) |
| void | mesh_foreachScreenFace (ViewContext *vc, void(*func)(void *userData, BMFace *efa, const float screen_co_b[2], int index), void *userData, const eV3DProjTest clip_flag) |
| void | nurbs_foreachScreenVert (ViewContext *vc, void(*func)(void *userData, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, bool handles_visible, const float screen_co_b[2]), void *userData, const eV3DProjTest clip_flag) |
| void | mball_foreachScreenElem (struct ViewContext *vc, void(*func)(void *userData, struct MetaElem *ml, const float screen_co_b[2]), void *userData, const eV3DProjTest clip_flag) |
| void | lattice_foreachScreenVert (ViewContext *vc, void(*func)(void *userData, BPoint *bp, const float screen_co[2]), void *userData, const eV3DProjTest clip_flag) |
| void | armature_foreachScreenBone (struct ViewContext *vc, void(*func)(void *userData, struct EditBone *ebone, const float screen_co_a[2], const float screen_co_b[2]), void *userData, const eV3DProjTest clip_flag) |
| void | pose_foreachScreenBone (struct ViewContext *vc, void(*func)(void *userData, struct bPoseChannel *pchan, const float screen_co_a[2], const float screen_co_b[2]), void *userData, const eV3DProjTest clip_flag) |
| typedef struct foreachScreenEdge_userData foreachScreenEdge_userData |
| typedef struct foreachScreenFace_userData foreachScreenFace_userData |
| typedef struct foreachScreenObjectVert_userData foreachScreenObjectVert_userData |
| typedef struct foreachScreenVert_userData foreachScreenVert_userData |
| void armature_foreachScreenBone | ( | struct ViewContext * | vc, |
| void(*)(void *userData, struct EditBone *ebone, const float screen_co_a[2], const float screen_co_b[2]) | func, | ||
| void * | userData, | ||
| const eV3DProjTest | clip_flag | ||
| ) |
Definition at line 549 of file view3d_iterators.c.
References Object::data, EBONE_VISIBLE, ED_view3d_check_mats_rv3d, ED_view3d_project_float_object(), bArmature::edbo, ListBase::first, EditBone::head, IS_CLIPPED, EditBone::next, ViewContext::obedit, ViewContext::region, ViewContext::rv3d, EditBone::tail, and V3D_PROJ_RET_OK.
Referenced by armature_circle_select(), and do_lasso_select_armature().
| void lattice_foreachScreenVert | ( | ViewContext * | vc, |
| void(*)(void *userData, BPoint *bp, const float screen_co[2]) | func, | ||
| void * | userData, | ||
| const eV3DProjTest | clip_flag | ||
| ) |
Definition at line 515 of file view3d_iterators.c.
References BKE_displist_find(), MVert::co, Object_Runtime::curve_cache, Object::data, Lattice::def, CurveCache::disp, DL_VERTS, ED_view3d_check_mats_rv3d, ED_view3d_clipping_local(), ED_view3d_project_float_object(), Lattice::editlatt, BPoint::hide, EditLatt::latt, N, NULL, ViewContext::obedit, Object::obmat, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, ViewContext::region, Object::runtime, ViewContext::rv3d, V3D_PROJ_RET_OK, V3D_PROJ_TEST_CLIP_BB, BPoint::vec, and DispList::verts.
| void mball_foreachScreenElem | ( | struct ViewContext * | vc, |
| void(*)(void *userData, struct MetaElem *ml, const float screen_co_b[2]) | func, | ||
| void * | userData, | ||
| const eV3DProjTest | clip_flag | ||
| ) |
Definition at line 492 of file view3d_iterators.c.
References Object::data, ED_view3d_check_mats_rv3d, ED_view3d_project_float_object(), MetaBall::editelems, ListBase::first, MetaElem::next, ViewContext::obedit, ViewContext::region, ViewContext::rv3d, V3D_PROJ_RET_OK, and MetaElem::x.
| void mesh_foreachScreenEdge | ( | ViewContext * | vc, |
| void(*)(void *userData, BMEdge *eed, const float screen_co_a[2], const float screen_co_b[2], int index) | func, | ||
| void * | userData, | ||
| eV3DProjTest | clip_flag | ||
| ) |
Definition at line 226 of file view3d_iterators.c.
References BKE_mesh_foreach_mapped_edge(), BMEditMesh::bm, BM_EDGE, BM_mesh_elem_table_ensure(), CD_MASK_BAREMESH, data, ViewContext::depsgraph, ED_view3d_check_mats_rv3d, ED_view3d_clipping_local(), editbmesh_get_eval_cage_from_orig(), ViewContext::em, mesh_foreachScreenEdge__mapFunc(), ViewContext::obedit, Object::obmat, ViewContext::region, ViewContext::rv3d, ViewContext::scene, V3D_PROJ_TEST_CLIP_BB, ARegion::winx, and ARegion::winy.
|
static |
Definition at line 194 of file view3d_iterators.c.
References BLI_rctf_isect_segment(), BM_edge_at_index(), BM_elem_flag_test, BM_ELEM_HIDDEN, data, ED_view3d_project_float_object(), V3D_PROJ_RET_OK, and V3D_PROJ_TEST_CLIP_WIN.
Referenced by mesh_foreachScreenEdge(), and mesh_foreachScreenEdge_clip_bb_segment().
| void mesh_foreachScreenEdge_clip_bb_segment | ( | ViewContext * | vc, |
| void(*)(void *userData, BMEdge *eed, const float screen_co_a[2], const float screen_co_b[2], int index) | func, | ||
| void * | userData, | ||
| eV3DProjTest | clip_flag | ||
| ) |
A version of mesh_foreachScreenEdge that clips the segment when there is a clipping bounding box.
Definition at line 315 of file view3d_iterators.c.
References BKE_mesh_foreach_mapped_edge(), BMEditMesh::bm, BM_EDGE, BM_mesh_elem_table_ensure(), CD_MASK_BAREMESH, RegionView3D::clipbb, data, ViewContext::depsgraph, ED_view3d_check_mats_rv3d, ED_view3d_clipping_local(), editbmesh_get_eval_cage_from_orig(), ViewContext::em, mesh_foreachScreenEdge__mapFunc(), mesh_foreachScreenEdge_clip_bb_segment__mapFunc(), NULL, ViewContext::obedit, Object::obmat, ViewContext::region, ViewContext::rv3d, ViewContext::scene, V3D_PROJ_TEST_CLIP_BB, ARegion::winx, and ARegion::winy.
|
static |
Only call for bound-box clipping. Otherwise call mesh_foreachScreenEdge__mapFunc
Definition at line 267 of file view3d_iterators.c.
References BLI_assert, BLI_rctf_isect_segment(), BM_edge_at_index(), BM_elem_flag_test, BM_ELEM_HIDDEN, clip_segment_v3_plane_n(), data, ED_view3d_project_float_object(), V3D_PROJ_RET_OK, V3D_PROJ_TEST_CLIP_BB, and V3D_PROJ_TEST_CLIP_WIN.
Referenced by mesh_foreachScreenEdge_clip_bb_segment().
| void mesh_foreachScreenFace | ( | ViewContext * | vc, |
| void(*)(void *userData, BMFace *efa, const float screen_co_b[2], int index) | func, | ||
| void * | userData, | ||
| const eV3DProjTest | clip_flag | ||
| ) |
Definition at line 372 of file view3d_iterators.c.
References BKE_mesh_foreach_mapped_face_center(), BKE_mesh_foreach_mapped_subdiv_face_center(), BKE_modifiers_uses_subsurf_facedots(), BMEditMesh::bm, BM_FACE, BM_mesh_elem_table_ensure(), CD_MASK_BAREMESH, data, ViewContext::depsgraph, ED_view3d_check_mats_rv3d, editbmesh_get_eval_cage_from_orig(), ViewContext::em, MESH_FOREACH_NOP, mesh_foreachScreenFace__mapFunc(), ViewContext::obedit, ViewContext::rv3d, and ViewContext::scene.
|
static |
Definition at line 355 of file view3d_iterators.c.
References BM_elem_flag_test, BM_ELEM_HIDDEN, BM_face_at_index(), data, ED_view3d_project_float_object(), and V3D_PROJ_RET_OK.
Referenced by mesh_foreachScreenFace().
| void mesh_foreachScreenVert | ( | ViewContext * | vc, |
| void(*)(void *userData, BMVert *eve, const float screen_co[2], int index) | func, | ||
| void * | userData, | ||
| eV3DProjTest | clip_flag | ||
| ) |
Definition at line 166 of file view3d_iterators.c.
References BKE_mesh_foreach_mapped_vert(), BMEditMesh::bm, BM_mesh_elem_table_ensure(), BM_VERT, CD_MASK_BAREMESH, data, ViewContext::depsgraph, ED_view3d_check_mats_rv3d, ED_view3d_clipping_local(), editbmesh_get_eval_cage_from_orig(), ViewContext::em, MESH_FOREACH_NOP, mesh_foreachScreenVert__mapFunc(), ViewContext::obedit, Object::obmat, ViewContext::rv3d, ViewContext::scene, and V3D_PROJ_TEST_CLIP_BB.
|
static |
Definition at line 145 of file view3d_iterators.c.
References BM_elem_flag_test, BM_ELEM_HIDDEN, BM_vert_at_index(), MVert::co, data, ED_view3d_project_float_object(), and V3D_PROJ_RET_OK.
Referenced by mesh_foreachScreenVert().
| void meshobject_foreachScreenVert | ( | ViewContext * | vc, |
| void(*)(void *userData, MVert *eve, const float screen_co[2], int index) | func, | ||
| void * | userData, | ||
| eV3DProjTest | clip_flag | ||
| ) |
Definition at line 117 of file view3d_iterators.c.
References BKE_mesh_foreach_mapped_vert(), CD_MASK_BAREMESH, data, DEG_get_evaluated_object(), DEG_get_evaluated_scene(), ViewContext::depsgraph, ED_view3d_check_mats_rv3d, ED_view3d_clipping_local(), MESH_FOREACH_NOP, mesh_get_eval_final(), meshobject_foreachScreenVert__mapFunc(), ViewContext::obact, Object::obmat, ViewContext::rv3d, and V3D_PROJ_TEST_CLIP_BB.
|
static |
Definition at line 96 of file view3d_iterators.c.
References MVert::co, data, ED_view3d_project_float_object(), ME_HIDE, and V3D_PROJ_RET_OK.
Referenced by meshobject_foreachScreenVert().
| void nurbs_foreachScreenVert | ( | ViewContext * | vc, |
| void(*)(void *userData, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, bool handles_visible, const float screen_co_b[2]) | func, | ||
| void * | userData, | ||
| const eV3DProjTest | clip_flag | ||
| ) |
Definition at line 403 of file view3d_iterators.c.
References Nurb::bezt, BEZT_ISSEL_ANY, BKE_curve_editNurbs_get(), Nurb::bp, CU_BEZIER, CURVE_HANDLE_NONE, CURVE_HANDLE_SELECTED, Object::data, ED_view3d_check_mats_rv3d, ED_view3d_clipping_local(), ED_view3d_project_float_object(), ListBase::first, View3DOverlay::handle_display, BezTriple::hide, BPoint::hide, Nurb::next, NULL, ViewContext::obedit, Object::obmat, View3D::overlay, Nurb::pntsu, Nurb::pntsv, ViewContext::region, ViewContext::rv3d, Nurb::type, ViewContext::v3d, V3D_PROJ_RET_CLIP_BB, V3D_PROJ_RET_CLIP_WIN, V3D_PROJ_RET_OK, V3D_PROJ_TEST_CLIP_BB, BezTriple::vec, and BPoint::vec.
| void pose_foreachScreenBone | ( | struct ViewContext * | vc, |
| void(*)(void *userData, struct bPoseChannel *pchan, const float screen_co_a[2], const float screen_co_b[2]) | func, | ||
| void * | userData, | ||
| const eV3DProjTest | clip_flag | ||
| ) |
Definition at line 598 of file view3d_iterators.c.
References BKE_pose_channel_find_name(), bPoseChannel::bone, bPose::chanbase, Object::data, DEG_get_evaluated_object(), ViewContext::depsgraph, ED_view3d_check_mats_rv3d, ED_view3d_project_float_object(), ListBase::first, IS_CLIPPED, bPoseChannel::name, bPoseChannel::next, ViewContext::obact, PBONE_VISIBLE, Object::pose, bPoseChannel::pose_head, bPoseChannel::pose_tail, ViewContext::region, ViewContext::rv3d, and V3D_PROJ_RET_OK.
Referenced by do_lasso_tag_pose(), and pose_circle_select().