mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 18:21:59 +00:00
@@ -833,9 +833,7 @@ class CreateDrawing(bpy.types.Operator):
|
|||||||
files = {bim_props.ifc_file: tool.Ifc.get()}
|
files = {bim_props.ifc_file: tool.Ifc.get()}
|
||||||
|
|
||||||
props = tool.Project.get_project_props()
|
props = tool.Project.get_project_props()
|
||||||
for link in props.links:
|
for link in props.get_loaded_links():
|
||||||
if not link.is_loaded:
|
|
||||||
continue
|
|
||||||
files[link.name] = self.get_linked_file(link)
|
files[link.name] = self.get_linked_file(link)
|
||||||
|
|
||||||
target_view = ifcopenshell.util.element.get_psets(self.camera_element)["EPset_Drawing"]["TargetView"]
|
target_view = ifcopenshell.util.element.get_psets(self.camera_element)["EPset_Drawing"]["TargetView"]
|
||||||
@@ -1257,7 +1255,7 @@ class CreateDrawing(bpy.types.Operator):
|
|||||||
return tool.Ifc.get().by_guid(guid)
|
return tool.Ifc.get().by_guid(guid)
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
props = tool.Project.get_project_props()
|
props = tool.Project.get_project_props()
|
||||||
for link in props.links:
|
for link in props.get_loaded_links():
|
||||||
ifc_file = self.get_linked_file(link)
|
ifc_file = self.get_linked_file(link)
|
||||||
try:
|
try:
|
||||||
return ifc_file.by_guid(guid)
|
return ifc_file.by_guid(guid)
|
||||||
@@ -1273,7 +1271,7 @@ class CreateDrawing(bpy.types.Operator):
|
|||||||
return tool.Ifc.get().by_id(step_id)
|
return tool.Ifc.get().by_id(step_id)
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
props = tool.Project.get_project_props()
|
props = tool.Project.get_project_props()
|
||||||
for link in props.links:
|
for link in props.get_loaded_links():
|
||||||
ifc_file = self.get_linked_file(link)
|
ifc_file = self.get_linked_file(link)
|
||||||
try:
|
try:
|
||||||
return ifc_file.by_id(step_id)
|
return ifc_file.by_id(step_id)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ from bpy.props import (
|
|||||||
IntProperty,
|
IntProperty,
|
||||||
StringProperty,
|
StringProperty,
|
||||||
)
|
)
|
||||||
from typing import TYPE_CHECKING, Literal, Union, get_args
|
from typing import TYPE_CHECKING, Literal, Union, get_args, Generator
|
||||||
from typing_extensions import assert_never
|
from typing_extensions import assert_never
|
||||||
|
|
||||||
|
|
||||||
@@ -500,6 +500,12 @@ class BIMProjectProperties(PropertyGroup):
|
|||||||
return self.library_breadcrumb[-1]
|
return self.library_breadcrumb[-1]
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def get_loaded_links(self) -> Generator[Link, None, None]:
|
||||||
|
for link in self.links:
|
||||||
|
if not link.is_loaded:
|
||||||
|
continue
|
||||||
|
yield link
|
||||||
|
|
||||||
|
|
||||||
class MeasureToolSettings(PropertyGroup):
|
class MeasureToolSettings(PropertyGroup):
|
||||||
measurement_type_items = [
|
measurement_type_items = [
|
||||||
|
|||||||
Reference in New Issue
Block a user