mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 13:46:54 +00:00
bim.convert_to_blender to ignore linked files
This commit is contained in:
@@ -90,12 +90,18 @@ class ConvertToBlender(bpy.types.Operator):
|
|||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
for obj in bpy.data.objects:
|
for obj in bpy.data.objects:
|
||||||
|
if obj.library:
|
||||||
|
continue
|
||||||
if obj.type in {"MESH", "EMPTY"}:
|
if obj.type in {"MESH", "EMPTY"}:
|
||||||
tool.Ifc.unlink(obj=obj)
|
tool.Ifc.unlink(obj=obj)
|
||||||
data = obj.data
|
data = obj.data
|
||||||
if tool.Geometry.has_mesh_properties(data):
|
if tool.Geometry.has_mesh_properties(data):
|
||||||
|
if data.library:
|
||||||
|
continue
|
||||||
data.BIMMeshProperties.ifc_definition_id = 0
|
data.BIMMeshProperties.ifc_definition_id = 0
|
||||||
for material in bpy.data.materials:
|
for material in bpy.data.materials:
|
||||||
|
if material.library:
|
||||||
|
continue
|
||||||
tool.Ifc.unlink(obj=material)
|
tool.Ifc.unlink(obj=material)
|
||||||
context.scene.BIMProperties.ifc_file = ""
|
context.scene.BIMProperties.ifc_file = ""
|
||||||
context.scene.BIMDebugProperties.attributes.clear()
|
context.scene.BIMDebugProperties.attributes.clear()
|
||||||
|
|||||||
Reference in New Issue
Block a user