Fix bug where switching to an object with modifiers applied would double the effect of modifiers.

This commit is contained in:
Dion Moult
2021-10-22 16:23:36 +11:00
parent 9ffe92eae5
commit c551275db2
12 changed files with 40 additions and 46 deletions
+3 -1
View File
@@ -189,6 +189,7 @@ class TestSwitchRepresentation:
geometry.rename_object("new_data", "name").should_be_called()
geometry.link("representation", "new_data").should_be_called()
geometry.change_object_data("obj", "new_data", is_global=True).should_be_called()
geometry.clear_modifiers("obj").should_be_called()
geometry.is_body_representation("representation").should_be_called().will_return(True)
geometry.create_dynamic_voids("obj").should_be_called()
subject.switch_representation(
@@ -204,6 +205,7 @@ class TestSwitchRepresentation:
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=True).should_be_called()
geometry.clear_modifiers("obj").should_be_called()
geometry.is_body_representation("representation").should_be_called().will_return(True)
geometry.create_dynamic_voids("obj").should_be_called()
subject.switch_representation(
@@ -219,7 +221,7 @@ class TestSwitchRepresentation:
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_dynamic_voids("obj").should_be_called()
geometry.clear_modifiers("obj").should_be_called()
subject.switch_representation(
geometry,
obj="obj",