This commit is contained in:
Andrej730
2024-10-28 11:23:35 +05:00
parent 86d0139f41
commit bdbe91f043
6 changed files with 25 additions and 21 deletions
@@ -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:
+1 -1
View File
@@ -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: