mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-08 05:16:25 +00:00
Fix bug where switching representations didn't update the material checksum, leading to unnecessary material syncs at export time.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user