[Bf-blender-cvs] [6ad91be5d74] master: Fix overlay pose panel context check

Campbell Barton noreply at git.blender.org
Tue Mar 12 00:30:25 CET 2019


Commit: 6ad91be5d742be0a30b758b93d91561b8ff023cb
Author: Campbell Barton
Date:   Tue Mar 12 10:21:55 2019 +1100
Branches: master
https://developer.blender.org/rB6ad91be5d742be0a30b758b93d91561b8ff023cb

Fix overlay pose panel context check

Displayed pose options when weight-paint armature wasn't in pose mode.

===================================================================

M	release/scripts/startup/bl_ui/space_view3d.py

===================================================================

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):



More information about the Bf-blender-cvs mailing list