MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / get_tab

Function get_tab

src/bonsai/bonsai/bim/prop.py:477–502  ·  view source on GitHub ↗
(
    self: "Union[BIMAreaProperties, BIMTabProperties]", context: bpy.types.Context
)

Source from the content-addressed store, hash-verified

475
476
477def get_tab(
478 self: "Union[BIMAreaProperties, BIMTabProperties]", context: bpy.types.Context
479) -> list[tuple[str, str, str, str, int]]:
480
481 UIData = bonsai.bim.ui.UIData
482 if not UIData.is_loaded:
483 UIData.load()
484
485 icon_key = f"{UIData.data['menu_icon_color_mode']}_ifc"
486
487 if not hasattr(get_tab, "enum_items"):
488 get_tab.enum_items = [
489 ("PROJECT", "Project Overview", "", bonsai.bim.icons[icon_key].icon_id, 0),
490 ("OBJECT", "Object Information", "", "FILE_3D", 1),
491 ("GEOMETRY", "Geometry and Materials", "", "MATERIAL", 2),
492 ("DRAWINGS", "Drawings and Documents", "", "DOCUMENTS", 3),
493 ("SERVICES", "Services and Systems", "", "NETWORK_DRIVE", 4),
494 ("STRUCTURE", "Structural Analysis", "", "EDITMODE_HLT", 5),
495 ("SCHEDULING", "Costing and Scheduling", "", "NLA", 6),
496 ("FM", "Facility Management", "", "PACKAGE", 7),
497 ("QUALITY", "Quality and Coordination", "", "COMMUNITY", 8),
498 ("BOOKMARK", "Bookmark", "", "SOLO_ON", 9),
499 None,
500 ("BLENDER", "Blender Properties", "", "BLENDER", 10),
501 ]
502 return get_tab.enum_items
503
504
505class BIMAreaProperties(PropertyGroup):

Callers 1

executeMethod · 0.90

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected