diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2019-04-11 19:28:20 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2019-04-11 19:28:20 +0300 |
commit | adaa7688ee77f4bce284b99ef5ac19a7c7a8ae42 (patch) | |
tree | 7b3dba7f17393d6be87f08086b946b085d4bd14d /source/blender/editors/include | |
parent | 6b06440ed867189262034c26b483474fae670e60 (diff) |
Fix T63467: Edge/vertex selection isnt working properly with X-ray set to 1
Edit mode shows the mesh elements in X-ray mode even if alpha is set to
1. Now the code takes this into account so that you can still select
visible mesh elements in X-ray edit mode.
view3d_draw_legacy need to be updated with the new XRAY flag macros to
avoid crashes. Additional cleanup of the XRAY macro flags were done.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index e34014d179c..4c03be3bd5a 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -556,12 +556,11 @@ void ED_view3d_operator_properties_viewmat_get(struct wmOperator *op, int *winx, void ED_view3d_stop_render_preview(struct wmWindowManager *wm, struct ARegion *ar); void ED_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrArea *sa); -#define XRAY_ALPHA(v3d) (((v3d)->shading.type == OB_WIRE) ? (v3d)->shading.xray_alpha_wire : (v3d)->shading.xray_alpha) -#define XRAY_FLAG(v3d) (((v3d)->shading.type == OB_WIRE) ? V3D_SHADING_XRAY_BONE : V3D_SHADING_XRAY) -#define XRAY_ENABLED(v3d) ((((v3d)->shading.flag & XRAY_FLAG(v3d)) != 0) && (XRAY_ALPHA(v3d) < 1.0f)) -#define XRAY_ACTIVE(v3d) (XRAY_ENABLED(v3d) && ((v3d)->shading.type < OB_MATERIAL)) - -#define V3D_IS_ZBUF(v3d) (((v3d)->shading.flag & XRAY_FLAG(v3d)) == 0) +#define XRAY_ALPHA(v3d) (((v3d)->shading.type == OB_WIRE) ? (v3d)->shading.xray_alpha_wire : (v3d)->shading.xray_alpha) +#define XRAY_FLAG(v3d) (((v3d)->shading.type == OB_WIRE) ? V3D_SHADING_XRAY_BONE : V3D_SHADING_XRAY) +#define XRAY_FLAG_ENABLED(v3d) (((v3d)->shading.flag & XRAY_FLAG(v3d)) != 0) +#define XRAY_ENABLED(v3d) (XRAY_FLAG_ENABLED(v3d) && (XRAY_ALPHA(v3d) < 1.0f)) +#define XRAY_ACTIVE(v3d) (XRAY_ENABLED(v3d) && ((v3d)->shading.type < OB_MATERIAL)) /* view3d_draw_legacy.c */ /* Try avoid using these more move out of legacy. */ |