From 1c5766f8bc98f1f56c819cccf2365ac2dd78d9db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 29 Feb 2024 12:58:52 +0100 Subject: [PATCH] Fix #118878: Anim: pinned bone custom properties not visible in edit-mode Use `context.edit_bone` when available. This also properly accounts for pinning of the armature. --- scripts/startup/bl_ui/properties_data_bone.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/startup/bl_ui/properties_data_bone.py b/scripts/startup/bl_ui/properties_data_bone.py index b1c0d1e4ca8..76f0948f01e 100644 --- a/scripts/startup/bl_ui/properties_data_bone.py +++ b/scripts/startup/bl_ui/properties_data_bone.py @@ -569,6 +569,10 @@ class BONE_PT_custom_props(BoneButtonsPanel, rna_prop_ui.PropertyPanel, Panel): @classmethod def _get_context_path(self, context): + if context.mode == 'EDIT_ARMATURE': + # This also accounts for pinned armatures. + return "edit_bone" + obj = context.object if not obj: # We have to return _something_. If there is some bone by some