mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-08 13:26:34 +00:00
typing
This commit is contained in:
@@ -24,7 +24,7 @@ import ifcopenshell.util.doc
|
||||
import ifcopenshell.util.schema
|
||||
import bonsai.tool as tool
|
||||
from bonsai.bim.module.drawing.helper import format_distance
|
||||
from typing import Any
|
||||
from typing import Any, Union
|
||||
|
||||
|
||||
def refresh():
|
||||
@@ -174,7 +174,7 @@ class ObjectMaterialData:
|
||||
cls.is_loaded = True
|
||||
|
||||
@classmethod
|
||||
def material_class(cls):
|
||||
def material_class(cls) -> Union[str, None]:
|
||||
element = tool.Ifc.get_entity(bpy.context.active_object)
|
||||
cls.material = ifcopenshell.util.element.get_material(element)
|
||||
if cls.material:
|
||||
|
||||
@@ -52,7 +52,7 @@ def purge():
|
||||
qtonames = {}
|
||||
|
||||
|
||||
def blender_formatted_enum_from_psets(psets):
|
||||
def blender_formatted_enum_from_psets(psets: list[ifcopenshell.entity_instance]) -> list[tuple[str, str, str]]:
|
||||
enum_items = []
|
||||
version = tool.Ifc.get_schema()
|
||||
for pset in psets:
|
||||
|
||||
Reference in New Issue
Block a user