[Bf-blender-cvs] [0e9999a93ed] blender-v2.90-release: Fix shape key pin toggle drawing as disabled in edit-mode

Campbell Barton noreply at git.blender.org
Fri Jul 24 07:56:39 CEST 2020


Commit: 0e9999a93edd3c8d62688e03340d9687ca6ce953
Author: Campbell Barton
Date:   Fri Jul 24 15:55:11 2020 +1000
Branches: blender-v2.90-release
https://developer.blender.org/rB0e9999a93edd3c8d62688e03340d9687ca6ce953

Fix shape key pin toggle drawing as disabled in edit-mode

Pin can be used in edit-mode when shape key in edit-mode is enabled.

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

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

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

diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py
index 27df265d013..77308fed014 100644
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@ -346,9 +346,11 @@ class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
 
         enable_edit = ob.mode != 'EDIT'
         enable_edit_value = False
+        enable_pin = False
 
-        if ob.show_only_shape_key is False:
-            if enable_edit or (ob.type == 'MESH' and ob.use_shape_key_edit_mode):
+        if enable_edit or (ob.use_shape_key_edit_mode and ob.type == 'MESH'):
+            enable_pin = True
+            if ob.show_only_shape_key:
                 enable_edit_value = True
 
         row = layout.row()
@@ -386,7 +388,7 @@ class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
             sub = row.row(align=True)
             sub.label()  # XXX, for alignment only
             subsub = sub.row(align=True)
-            subsub.active = enable_edit_value
+            subsub.active = enable_pin
             subsub.prop(ob, "show_only_shape_key", text="")
             sub.prop(ob, "use_shape_key_edit_mode", text="")



More information about the Bf-blender-cvs mailing list