mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
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:
@@ -1088,7 +1088,7 @@ class Blender(bonsai.core.tool.Blender):
|
|||||||
for item_name in dir(bpy.types):
|
for item_name in dir(bpy.types):
|
||||||
item = getattr(bpy.types, item_name)
|
item = getattr(bpy.types, item_name)
|
||||||
# filter only panels
|
# 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
|
continue
|
||||||
# ignore bbim panels
|
# ignore bbim panels
|
||||||
if item.__module__.startswith("bonsai"):
|
if item.__module__.startswith("bonsai"):
|
||||||
|
|||||||
Reference in New Issue
Block a user