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.
This commit is contained in:
Sybren A. Stüvel
2024-02-29 12:58:52 +01:00
parent 71df742eb4
commit 1c5766f8bc

View File

@@ -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