Fix #1522. Appending from project libraries now supports material properties and styles.

This commit is contained in:
Dion Moult
2021-06-18 15:54:01 +10:00
parent 1ee2f420c8
commit 2f1f332d31
2 changed files with 33 additions and 4 deletions
@@ -3,6 +3,7 @@ import logging
import ifcopenshell
import ifcopenshell.api
import bpy
import blenderbim.bim.handler
from blenderbim.bim.ifc import IfcStore
from blenderbim.bim import import_ifc
@@ -232,9 +233,11 @@ class AppendLibraryElement(bpy.types.Operator):
element = ifcopenshell.api.run(
"project.append_asset",
IfcStore.get_file(),
library=IfcStore.library_file,
element=IfcStore.library_file.by_id(self.definition),
)
self.import_type_from_ifc(element)
blenderbim.bim.handler.purge_module_data()
return {"FINISHED"}
def import_type_from_ifc(self, element):