mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 02:23:34 +00:00
Solving test fail - keeping unnamed profiles when updating profiles in MaterialsData
Solves test_enable_editing_material_set_item test error
```
FAILED test/bim/test_feature.py::test_enable_editing_material_set_item - RuntimeError: Error: Python: Traceback (most recent call last).
RuntimeError: Error: Python: Traceback (most recent call last):
File "\blenderbim\bim\module\material\operator.py", line 587, in execute
self.mprops.profiles = str(material_set_item.Profile.id())
TypeError: bpy_struct: item.attr = val: enum "107" not found in ('79', '98')
Location: C:\software\Steam\steamapps\common\Blender\3.4\scripts\modules\bpy\ops.py:113
```
The problem was `bim.enable_editing_material_set_item"` was trying to set `MaterialsData` profiles and wasn't able to set unnamed profile because `MaterialsData.profiles()` was discarding unnamed profiles (which is seems contradictory because `profiles()` is also handling unnamed profiles anyway).
This commit is contained in:
@@ -76,7 +76,6 @@ class MaterialsData:
|
||||
return [
|
||||
(str(p.id()), p.ProfileName or "Unnamed", "")
|
||||
for p in tool.Ifc.get().by_type("IfcProfileDef")
|
||||
if p.ProfileName
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user