diff options
author | mano-wii <germano.costa@ig.com.br> | 2019-06-14 05:40:49 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2019-06-14 06:03:00 +0300 |
commit | a4bd3f7d7e5634c96fd15d4bd8c2ed0211dc990a (patch) | |
tree | 60ca6fef990d1c8155786da0e3f8e3004421c9c2 /source/blender/editors/include | |
parent | accd8d005bba1a78566b19f368b6485a698c9f68 (diff) |
Mesh Selection: Move Selection ID Context Utilities to ED_view3d.
This patch does not bring functional changes, but it is a good change if we want to use these utilities in areas other than those using BMesh (eg painting editors).
This is also a step to replace `ED_view3d_select_id_validate`. That function erroneously checks `V3D_INVALID_BACKBUF` which causes it to update unnecessarily.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D5072
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_mesh.h | 16 | ||||
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 17 |
2 files changed, 17 insertions, 16 deletions
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 0a8304f3f8a..5d8038d0b28 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -142,22 +142,6 @@ bool BMBVH_EdgeVisible(struct BMBVHTree *tree, void ED_mesh_undosys_type(struct UndoType *ut); /* editmesh_select.c */ -struct EDBMSelectID_Context; -struct EDBMSelectID_Context *EDBM_select_id_context_create(struct ViewContext *vc, - struct Base **bases, - const uint bases_len, - short select_mode); -void EDBM_select_id_context_destroy(struct EDBMSelectID_Context *sel_id_ctx); -struct BMElem *EDBM_select_id_bm_elem_get(struct EDBMSelectID_Context *sel_id_ctx, - const uint sel_id, - uint *r_base_index); - -uint EDBM_select_id_context_offset_for_object_elem(const struct EDBMSelectID_Context *sel_id_ctx, - int base_index, - char htype); - -uint EDBM_select_id_context_elem_len(const struct EDBMSelectID_Context *sel_id_ctx); - void EDBM_select_mirrored( struct BMEditMesh *em, const int axis, const bool extend, int *r_totmirr, int *r_totfail); void EDBM_automerge(struct Scene *scene, struct Object *ob, bool update, const char hflag); diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 751f71cc53b..21a18a0b387 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -512,6 +512,23 @@ int view3d_opengl_select(struct ViewContext *vc, eV3DSelectObjectFilter select_filter); /* view3d_select.c */ +struct EDSelectID_Context; +struct EDSelectID_Context *ED_view3d_select_id_context_create(struct ViewContext *vc, + struct Base **bases, + const uint bases_len, + short select_mode); + +void ED_view3d_select_id_context_destroy(struct EDSelectID_Context *sel_id_ctx); +uint ED_view3d_select_id_context_offset_for_object_elem( + const struct EDSelectID_Context *sel_id_ctx, int base_index, char elem_type); + +uint ED_view3d_select_id_context_elem_len(const struct EDSelectID_Context *sel_id_ctx); +bool ED_view3d_select_id_elem_get(struct EDSelectID_Context *sel_id_ctx, + const uint sel_id, + uint *r_elem, + uint *r_base_index, + char *r_elem_type); + float ED_view3d_select_dist_px(void); void ED_view3d_viewcontext_init(struct bContext *C, struct ViewContext *vc); void ED_view3d_viewcontext_init_object(struct ViewContext *vc, struct Object *obact); |