diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-12 02:21:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-12 02:28:38 +0300 |
commit | 6ad91be5d742be0a30b758b93d91561b8ff023cb (patch) | |
tree | 4d176817d351c8b792dafb1b6bfcf3098d668060 | |
parent | a71891085d8150e2a4ba97e8159229f3074c2b77 (diff) |
Fix overlay pose panel context check
Displayed pose options when weight-paint armature wasn't in pose mode.
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 83f3bde32d1..ed1cba69acd 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -4135,10 +4135,7 @@ class VIEW3D_MT_shading_ex_pie(Menu): pie.prop_enum(view.shading, "type", value='SOLID') # Note this duplicates "view3d.toggle_xray" logic, so we can see the active item: T58661. - if ( - (context.mode == 'POSE') or - ((context.mode == 'WEIGHT_PAINT') and (context.active_object.find_armature())) - ): + if context.pose_object: pie.prop(view.overlay, "show_xray_bone", icon='XRAY') else: xray_active = ( @@ -5158,7 +5155,7 @@ class VIEW3D_PT_overlay_pose(Panel): mode = context.mode return ( (mode == 'POSE') or - (mode == 'PAINT_WEIGHT' and context.active_object.find_armature()) + (mode == 'PAINT_WEIGHT' and context.pose_object) ) def draw(self, context): |