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/ED_view3d.h | |
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/ED_view3d.h')
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 17 |
1 files changed, 17 insertions, 0 deletions
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); |