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/draw/modes/object_mode.c | |
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/draw/modes/object_mode.c')
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 11575cbf227..7b6519a6863 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -1840,8 +1840,7 @@ static void camera_view3d_reconstruction( BLI_assert(BLI_listbase_is_empty(&sgl->camera_path)); const bool is_solid_bundle = (v3d->bundle_drawtype == OB_EMPTY_SPHERE) && - ((v3d->shading.type != OB_SOLID) || - ((v3d->shading.flag & XRAY_FLAG(v3d)) == 0)); + ((v3d->shading.type != OB_SOLID) || !XRAY_FLAG_ENABLED(v3d)); MovieTracking *tracking = &clip->tracking; /* Index must start in 1, to mimic BKE_tracking_track_get_indexed. */ @@ -3155,8 +3154,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob) bArmature *arm = ob->data; if (arm->edbo == NULL) { if (DRW_state_is_select() || !DRW_pose_mode_armature(ob, draw_ctx->obact)) { - bool is_wire = (v3d->shading.type == OB_WIRE) || (ob->dt <= OB_WIRE) || - (v3d->shading.flag & XRAY_FLAG(v3d)) != 0; + bool is_wire = (v3d->shading.type == OB_WIRE) || (ob->dt <= OB_WIRE) || XRAY_FLAG_ENABLED(v3d); DRWArmaturePasses passes = { .bone_solid = (is_wire) ? NULL : sgl->bone_solid, .bone_outline = sgl->bone_outline, |