mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
fix failing test in model module
it was failing because type object was hidden in viewport and was unselectable
This commit is contained in:
@@ -566,10 +566,8 @@ class TestApplyIfcMaterialChanges(NewFile):
|
||||
|
||||
# Occurrence with a style.
|
||||
element_type_obj = tool.Ifc.get_object(element_type)
|
||||
tool.Blender.set_objects_selection(
|
||||
bpy.context, active_object=element_type_obj, selected_objects=[element_type_obj]
|
||||
)
|
||||
bpy.ops.bim.assign_style_to_selected(style_id=green_style.id())
|
||||
with bpy.context.temp_override(selected_objects=[element_type_obj]):
|
||||
bpy.ops.bim.assign_style_to_selected(style_id=green_style.id())
|
||||
|
||||
ifcopenshell.api.material.assign_material(ifc_file, material=red_material, products=[element_type])
|
||||
tool.Material.ensure_material_assigned([element_type], material=red_material)
|
||||
|
||||
Reference in New Issue
Block a user