Fix bug where switching representations didn't update the material checksum, leading to unnecessary material syncs at export time.

This commit is contained in:
Dion Moult
2023-04-13 18:15:28 +10:00
parent 07badd3df5
commit 3628a0e241
2 changed files with 10 additions and 5 deletions
@@ -199,6 +199,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.record_object_materials("obj").should_be_called()
geometry.clear_modifiers("obj").should_be_called()
ifc.get_entity("obj").should_be_called().will_return("element")
geometry.clear_cache("element").should_be_called()
@@ -222,6 +223,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.record_object_materials("obj").should_be_called()
geometry.delete_data("existing_data").should_be_called()
geometry.clear_modifiers("obj").should_be_called()
ifc.get_entity("obj").should_be_called().will_return("element")
@@ -242,6 +244,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.record_object_materials("obj").should_be_called()
geometry.clear_modifiers("obj").should_be_called()
ifc.get_entity("obj").should_be_called().will_return("element")
geometry.clear_cache("element").should_be_called()
@@ -264,6 +267,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.record_object_materials("obj").should_be_called()
geometry.clear_modifiers("obj").should_be_called()
ifc.get_entity("obj").should_be_called().will_return("element")
geometry.clear_cache("element").should_be_called()