Purge old dynamic void system as Blender booleans are not sufficient.

This commit is contained in:
Dion Moult
2022-10-19 12:32:02 +11:00
parent f55b47dcb3
commit 80020970e1
14 changed files with 3 additions and 107 deletions
-21
View File
@@ -205,7 +205,6 @@ class TestSwitchRepresentation:
obj="obj",
representation="mapped_rep",
should_reload=True,
enable_dynamic_voids=True,
is_global=True,
should_sync_changes_first=True,
)
@@ -226,7 +225,6 @@ class TestSwitchRepresentation:
obj="obj",
representation="mapped_rep",
should_reload=True,
enable_dynamic_voids=True,
is_global=True,
should_sync_changes_first=True,
)
@@ -242,27 +240,10 @@ class TestSwitchRepresentation:
obj="obj",
representation="mapped_rep",
should_reload=False,
enable_dynamic_voids=True,
is_global=True,
should_sync_changes_first=True,
)
def test_switching_to_non_dynamic_baked_voids(self, geometry):
geometry.is_edited("obj").should_be_called().will_return(False)
geometry.resolve_mapped_representation("mapped_rep").should_be_called().will_return("representation")
geometry.get_representation_data("representation").should_be_called().will_return("data")
geometry.change_object_data("obj", "data", is_global=False).should_be_called()
geometry.clear_modifiers("obj").should_be_called()
subject.switch_representation(
geometry,
obj="obj",
representation="mapped_rep",
should_reload=False,
enable_dynamic_voids=False,
is_global=False,
should_sync_changes_first=True,
)
def test_updating_a_representation_if_the_blender_object_has_been_edited_prior_to_switching(self, geometry):
geometry.is_edited("obj").should_be_called().will_return(True)
geometry.is_box_representation("mapped_rep").should_be_called().will_return(False)
@@ -278,7 +259,6 @@ class TestSwitchRepresentation:
obj="obj",
representation="mapped_rep",
should_reload=False,
enable_dynamic_voids=False,
is_global=False,
should_sync_changes_first=True,
)
@@ -294,7 +274,6 @@ class TestSwitchRepresentation:
obj="obj",
representation="mapped_rep",
should_reload=False,
enable_dynamic_voids=False,
is_global=False,
should_sync_changes_first=True,
)
-11
View File
@@ -139,17 +139,6 @@ class TestGetRepresentationContext(NewFile):
assert subject.get_representation_context(representation) == context
class TestHasDynamicVoids(NewFile):
def test_run(self):
obj = bpy.data.objects.new("Object", None)
assert subject.has_dynamic_voids(obj) is False
def test_checking_modifiers(self):
obj = bpy.data.objects.new("Object", bpy.data.meshes.new("Mesh"))
obj.modifiers.new("IfcOpeningElement", "BOOLEAN")
assert subject.has_dynamic_voids(obj) is True
class TestHasMaterialUsage(NewFile):
def test_getting_a_profile_set_usage(self):
ifc = ifcopenshell.file()