mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
get material constituents from cache and filter active element material
This commit is contained in:
@@ -64,8 +64,11 @@ def get_shape_aspects(self, context):
|
||||
|
||||
|
||||
def get_material_constituents(self, context, edit_text):
|
||||
# TODO: cache in data.py
|
||||
return [m.Name for m in tool.Ifc.get().by_type("IfcMaterialConstituent") if m.Name]
|
||||
from blenderbim.bim.module.material.data import ObjectMaterialData
|
||||
|
||||
if not ObjectMaterialData.is_loaded:
|
||||
ObjectMaterialData.load()
|
||||
return ObjectMaterialData.data["active_material_constituents"]
|
||||
|
||||
|
||||
def update_shape_aspect(self, context):
|
||||
|
||||
Reference in New Issue
Block a user