diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-07-24 08:55:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-07-24 08:55:11 +0300 |
commit | 0e9999a93edd3c8d62688e03340d9687ca6ce953 (patch) | |
tree | 33286ad28fdb217df76057e62bc9d67aa37421c9 | |
parent | 9cbf43801ba21b0b4aad0aaccf681ebc7e29cc04 (diff) |
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.
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_mesh.py | 8 |
1 files changed, 5 insertions, 3 deletions
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="") |