mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +00:00
As this fix is no longer needed and covered by more general resolve_uri refactor
This commit is contained in:
@@ -1320,13 +1320,11 @@ class LoadLink(bpy.types.Operator):
|
|||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
def link_blend(self, filepath: Path) -> None:
|
def link_blend(self, filepath: Path) -> None:
|
||||||
# Resolve it, otherwise it might not match with `library.filepath`.
|
with bpy.data.libraries.load(str(filepath), link=True) as (data_from, data_to):
|
||||||
blend_filepath = filepath.resolve()
|
|
||||||
with bpy.data.libraries.load(str(blend_filepath), link=True) as (data_from, data_to):
|
|
||||||
data_to.scenes = data_from.scenes
|
data_to.scenes = data_from.scenes
|
||||||
link = tool.Project.get_project_props().links[self.filepath]
|
link = tool.Project.get_project_props().links[self.filepath]
|
||||||
for scene in bpy.data.scenes:
|
for scene in bpy.data.scenes:
|
||||||
if not scene.library or Path(scene.library.filepath) != blend_filepath:
|
if not scene.library or Path(scene.library.filepath) != filepath:
|
||||||
continue
|
continue
|
||||||
for child in scene.collection.children:
|
for child in scene.collection.children:
|
||||||
if "IfcProject" not in child.name:
|
if "IfcProject" not in child.name:
|
||||||
|
|||||||
Reference in New Issue
Block a user