Fix #2599. Unassigning materials now also removes the Blender material.

This commit is contained in:
Dion Moult
2023-02-02 18:27:08 +11:00
parent 7d944255d0
commit a5adf0021f
5 changed files with 53 additions and 47 deletions
+5
View File
@@ -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]