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.
This commit is contained in:
Sybren A. Stüvel
2023-09-15 14:53:40 +02:00
parent 9580c377fe
commit ea360ffc12

View File

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