mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 07:26:56 +00:00
3d annotations for FALL, SECTION_LEVEL, PLAN_LEVEL #3145
Before that commit if you created those types of annotations and then reopened .ifc file (without .blend) then you would lose their z coordinate and therefore would lose their value (because they were created previously as 2d annotations). Now those annotations created as 3d to avoid that problem. I've also added temporary fallback that will turn your existing annotations to 3d next time you edit them.
This commit is contained in:
@@ -315,8 +315,13 @@ class Drawing(blenderbim.core.tool.Drawing):
|
||||
return literals
|
||||
|
||||
@classmethod
|
||||
def get_annotation_context(cls, target_view):
|
||||
if target_view in ("PLAN_VIEW", "REFLECTED_PLAN_VIEW"):
|
||||
def get_annotation_context(cls, target_view, object_type=None):
|
||||
# checking PLAN target view and annotation type that doesn't require 3d
|
||||
if target_view in ("PLAN_VIEW", "REFLECTED_PLAN_VIEW") and object_type not in (
|
||||
"FALL",
|
||||
"SECTION_LEVEL",
|
||||
"PLAN_LEVEL",
|
||||
):
|
||||
return ifcopenshell.util.representation.get_context(tool.Ifc.get(), "Plan", "Annotation", target_view)
|
||||
return ifcopenshell.util.representation.get_context(tool.Ifc.get(), "Model", "Annotation", target_view)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user