This repository was archived by the owner on Nov 24, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -753,3 +753,30 @@ def test_disable_text_editing(self):
753753 # test first literal value is unchanged
754754 assert props .literals [0 ].attributes ["Literal" ].string_value == "Literal"
755755 assert ifc .by_type ("IfcTextLiteralWithExtent" )[0 ].Literal == "Literal"
756+
757+
758+ class TestDrawingStyles (NewFile ):
759+ def setup_project_with_drawing (self ):
760+ bpy .ops .bim .create_project ()
761+ bpy .ops .bim .load_drawings ()
762+ bpy .ops .bim .add_drawing ()
763+ ifc = tool .Ifc .get ()
764+ drawing = ifc .by_type ("IfcAnnotation" )[0 ]
765+ bpy .ops .bim .activate_drawing (drawing = drawing .id ())
766+ self .drawing_styles = bpy .context .scene .DocProperties .drawing_styles
767+
768+ def test_drawing_styles_not_loaded_if_underlay_is_inactive (self ):
769+ self .setup_project_with_drawing ()
770+ assert len (self .drawing_styles ) == 0
771+
772+ def test_drawing_styles_loaded_on_underlay_enabled (self ):
773+ self .setup_project_with_drawing ()
774+ bpy .context .scene .camera .data .BIMCameraProperties .has_underlay = True
775+ assert len (self .drawing_styles ) == 3
776+
777+ def test_drawing_styles_reload (self ):
778+ self .setup_project_with_drawing ()
779+ bpy .ops .bim .reload_drawing_styles ()
780+ assert len (self .drawing_styles ) == 3
781+
782+
You can’t perform that action at this time.
0 commit comments