fix linked ifc selectability toggle

This commit is contained in:
Andrej730
2024-03-25 13:57:29 +05:00
parent 2fadfc8eff
commit 1a449905f4
3 changed files with 28 additions and 6 deletions
@@ -329,6 +329,16 @@ Scenario: Toggle link visibility - wireframe mode
Then "scene.BIMProjectProperties.links['{cwd}/test/files/basic.ifc'].is_wireframe" is "False"
And the object "Chunk" should display as "TEXTURED"
Scenario: Toggle link selectability
Given an empty IFC project
And I press "bim.link_ifc(filepath='{cwd}/test/files/basic.ifc')"
When I press "bim.toggle_link_selectability(link='{cwd}/test/files/basic.ifc')"
Then "scene.BIMProjectProperties.links['{cwd}/test/files/basic.ifc'].is_selectable" is "False"
And the collection "IfcProject/basic.ifc" is unselectable
When I press "bim.toggle_link_selectability(link='{cwd}/test/files/basic.ifc')"
Then "scene.BIMProjectProperties.links['{cwd}/test/files/basic.ifc'].is_selectable" is "True"
And the collection "IfcProject/basic.ifc" is selectable
Scenario: Toggle link visibility - visible mode
Given an empty IFC project
And I press "bim.link_ifc(filepath='{cwd}/test/files/basic.ifc')"
+12
View File
@@ -397,6 +397,18 @@ def the_collection_name_exists(name) -> bpy.types.Collection:
return obj
@then(parsers.parse('the collection "{name}" is selectable'))
def the_collection_name_is_selectable(name: str) -> None:
col = the_collection_name_exists(name)
assert col.hide_select == False
@then(parsers.parse('the collection "{name}" is unselectable'))
def the_collection_name_is_unselectable(name: str) -> None:
col = the_collection_name_exists(name)
assert col.hide_select == True
@then(parsers.parse('the collection "{name}" exists in viewlayer'))
def the_collection_exists_in_viewlayer(name: str) -> bpy.types.LayerCollection:
col = the_collection_name_exists(name)