mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-28 15:53:00 +00:00
Fix bug in IFC2X3 where updating style colours didn't work.
This commit is contained in:
@@ -131,6 +131,7 @@ class TestGetSurfaceRenderingStyle(NewFile):
|
||||
|
||||
class TestGetSurfaceShadingAttributes(NewFile):
|
||||
def test_get_colours_from_a_basic_material(self):
|
||||
tool.Ifc.set(ifcopenshell.file())
|
||||
obj = bpy.data.materials.new("Material")
|
||||
obj.diffuse_color = [1, 1, 1, 1]
|
||||
assert subject.get_surface_shading_attributes(obj) == {
|
||||
@@ -143,6 +144,19 @@ class TestGetSurfaceShadingAttributes(NewFile):
|
||||
"Transparency": 0,
|
||||
}
|
||||
|
||||
def test_get_colours_from_a_basic_material_ifc2x3(self):
|
||||
tool.Ifc.set(ifcopenshell.file(schema="IFC2X3"))
|
||||
obj = bpy.data.materials.new("Material")
|
||||
obj.diffuse_color = [1, 1, 1, 1]
|
||||
assert subject.get_surface_shading_attributes(obj) == {
|
||||
"SurfaceColour": {
|
||||
"Name": None,
|
||||
"Red": 1,
|
||||
"Green": 1,
|
||||
"Blue": 1,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
class TestGetSurfaceShadingStyle(NewFile):
|
||||
def test_run(self):
|
||||
|
||||
Reference in New Issue
Block a user