mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 09:32:46 +00:00
Fix #2599. Unassigning materials now also removes the Blender material.
This commit is contained in:
@@ -89,7 +89,7 @@ Scenario: Unassign material - single material
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterial"
|
||||
And I press "bim.assign_material"
|
||||
When I press "bim.unassign_material"
|
||||
Then nothing happens
|
||||
Then the object "IfcWall/Cube" does not have the material "Default"
|
||||
|
||||
Scenario: Enable editing assigned material - single material
|
||||
Given an empty IFC project
|
||||
@@ -132,10 +132,6 @@ Scenario: Edit assigned material - single material
|
||||
|
||||
Scenario: Assign material - material layer set
|
||||
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 add an empty
|
||||
And the object "Empty" is selected
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
@@ -144,14 +140,10 @@ Scenario: Assign material - material layer set
|
||||
And I press "bim.add_material(obj='')"
|
||||
When I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
Then nothing happens
|
||||
Then the object "IfcWallType/Empty" does not have the material "Default"
|
||||
|
||||
Scenario: Unassign material - material layer set
|
||||
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 add an empty
|
||||
And the object "Empty" is selected
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
@@ -219,10 +211,6 @@ Scenario: Edit assigned material - material layer set
|
||||
|
||||
Scenario: Assign material - material profile set
|
||||
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 add an empty
|
||||
And the object "Empty" is selected
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
@@ -231,14 +219,10 @@ Scenario: Assign material - material profile set
|
||||
And I press "bim.add_material(obj='')"
|
||||
When I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet"
|
||||
And I press "bim.assign_material"
|
||||
Then nothing happens
|
||||
Then the object "IfcWallType/Empty" does not have the material "Default"
|
||||
|
||||
Scenario: Unassign material - material profile set
|
||||
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 add an empty
|
||||
And the object "Empty" is selected
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
|
||||
|
||||
@@ -498,6 +498,11 @@ def the_object_name_has_the_material_material(name, material):
|
||||
assert material in [ms.material.name for ms in the_object_name_exists(name).material_slots]
|
||||
|
||||
|
||||
@then(parsers.parse('the object "{name}" does not have the material "{material}"'))
|
||||
def the_object_name_does_not_have_the_material_material(name, material):
|
||||
assert material not in [ms.material.name for ms in the_object_name_exists(name).material_slots]
|
||||
|
||||
|
||||
@then(parsers.parse('the object "{name}" is in the collection "{collection}"'))
|
||||
def the_object_name_is_in_the_collection_collection(name, collection):
|
||||
assert collection in [c.name for c in the_object_name_exists(name).users_collection]
|
||||
|
||||
Reference in New Issue
Block a user