From ea360ffc12ce2615eac4d644fda36cfa862fbd9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 15 Sep 2023 14:53:40 +0200 Subject: [PATCH] Anim: hide bone collection customprop editor on overrides Blender's generic custom property panel doesn't support operating on overridden data yet, so it's better to just hide the panel altogether. Before this commit, the 'Custom Properties' panel was shown but empty. --- scripts/startup/bl_ui/properties_data_armature.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/startup/bl_ui/properties_data_armature.py b/scripts/startup/bl_ui/properties_data_armature.py index 75cc3d31f21..28fa5c91f01 100644 --- a/scripts/startup/bl_ui/properties_data_armature.py +++ b/scripts/startup/bl_ui/properties_data_armature.py @@ -255,7 +255,17 @@ class DATA_PT_custom_props_bcoll(ArmatureButtonsPanel, PropertyPanel, Panel): @classmethod def poll(cls, context): - return context.armature and context.armature.collections.active + arm = context.armature + if not arm: + return False + + is_lib_override = arm.id_data.override_library and arm.id_data.override_library.reference + if is_lib_override: + # This is due to a limitation in scripts/modules/rna_prop_ui.py; if that + # limitation is lifted, this poll function should be adjusted. + return False + + return arm.collections.active classes = (