Fix issue where invalidly declared representation contexts can confuse drawing creation

This commit is contained in:
Dion Moult
2020-12-01 22:26:02 +11:00
parent efd2663f15
commit 5f76062575
2 changed files with 2 additions and 1 deletions
@@ -2047,7 +2047,7 @@ class IfcExporter:
if representation.RepresentationIdentifier != "Body":
continue
rep_context = self.ifc_parser.get_obj_representation_context(product["raw"], "Model", "Body", "MODEL_VIEW")
if rep_context and rep_context.ifc_definition_id:
if self.ifc_export_settings.should_roundtrip_native and rep_context and rep_context.ifc_definition_id:
# For native roundtripping, each slot could be a one to many relationship to items
for item in self.get_geometric_representation_items(representation):
original_id = self.roundtrip_id_new_to_old[item.id()]
@@ -2556,6 +2556,7 @@ class CutSection(bpy.types.Operator):
def does_obj_have_target_view_representation(self, obj, camera):
return camera.data.BIMCameraProperties.target_view in [
c.target_view for c in obj.BIMObjectProperties.representation_contexts
if c.context == "Plan" and c.name == "Annotation"
]
def is_landscape(self):