Blender 4.3 - fix not hidden Blender scene panels #5767

No idea what happened but in Blender <4.3 `type(bpy.types.SCENE_PT_rigid_body_world_settings.bl_rna)` is `<class 'bl_ui.properties_scene.SCENE_PT_rigid_body_world_settings'>` which is `bpy.types.Panel` but in Blender 4.3 it's now is `bpy.types.Struct`. Using `.base` seems to work for both versions.
This commit is contained in:
Andrej730
2024-11-20 12:01:31 +05:00
parent 361e0419cf
commit 1a72089b3b
+1 -1
View File
@@ -1088,7 +1088,7 @@ class Blender(bonsai.core.tool.Blender):
for item_name in dir(bpy.types):
item = getattr(bpy.types, item_name)
# filter only panels
if not hasattr(item, "bl_rna") or not isinstance(item.bl_rna, bpy.types.Panel):
if not hasattr(item, "bl_rna") or not isinstance(item.bl_rna.base, bpy.types.Panel):
continue
# ignore bbim panels
if item.__module__.startswith("bonsai"):