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
@@ -33,6 +33,26 @@ Scenario: Switch representation
And I press "bim.switch_representation(obj='IfcWall/Cube', ifc_definition_id={representation})"
Then nothing happens
Scenario: Switch representation - existing Blender modifiers must be purged
Given an empty IFC project
And I add a cube
And the object "Cube" is selected
And I add an array modifier
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
And I press "bim.assign_class"
When the variable "representation" is "{ifc}.by_type('IfcShapeRepresentation')[0].id()"
And I press "bim.switch_representation(obj='IfcWall/Cube', ifc_definition_id={representation})"
Then the object "IfcWall/Cube" has no modifiers
Scenario: Update representation
Given an empty IFC project
And I add a cube
And the object "Cube" is selected
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
And I press "bim.assign_class"
And I press "bim.update_representation(obj='IfcWall/Cube')"
Then the object "IfcWall/Cube" has a "Tessellation" representation of "Model/Body/MODEL_VIEW"
Scenario: Copy representation
Given an empty IFC project
And I add a cube