diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-23 05:17:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-23 05:19:22 +0300 |
commit | 1ffb2bf917acf19aa5d3c0b9215371a771a2ccb1 (patch) | |
tree | 5a7822b7266f85c404ebdb4251181e074da28acb /source/blender/editors/space_view3d | |
parent | e829e47b55813aaeb3aeff7cba9d1ccae354a731 (diff) |
Pose: make pose-bone xray usable in wpaint mode
Update UI, draw-manager and operator to support with pose-bone-xray
when in weight paint mode.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 82e0511afe5..c94aab1a3c1 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -4930,7 +4930,10 @@ static int toggle_xray_exec(bContext *C, wmOperator *op) ScrArea *sa = CTX_wm_area(C); Object *obact = CTX_data_active_object(C); - if (obact && obact->mode & OB_MODE_POSE) { + if (obact && + ((obact->mode & OB_MODE_POSE) || + ((obact->mode & OB_MODE_WEIGHT_PAINT) && BKE_object_pose_armature_get(obact)))) + { v3d->overlay.flag ^= V3D_OVERLAY_BONE_SELECT; } else { |