Fix bug in IFC2X3 where updating style colours didn't work.

This commit is contained in:
Dion Moult
2021-11-10 16:45:16 +11:00
parent 0dac56dbdf
commit a7b3b5261f
5 changed files with 24 additions and 3 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ class Geometry(blenderbim.core.tool.Geometry):
@classmethod
def clear_scale(cls, obj):
if obj.scale != Vector((1.0, 1.0, 1.0)):
if (obj.scale - Vector((1., 1.,1.))).length > 1e-4:
if obj.data.users == 1:
context_override = {}
context_override["object"] = context_override["active_object"] = obj
+4 -1
View File
@@ -83,7 +83,7 @@ class Style(blenderbim.core.tool.Style):
@classmethod
def get_surface_shading_attributes(cls, obj):
return {
data = {
"SurfaceColour": {
"Name": None,
"Red": obj.diffuse_color[0],
@@ -92,6 +92,9 @@ class Style(blenderbim.core.tool.Style):
},
"Transparency": 1 - obj.diffuse_color[3],
}
if tool.Ifc.get_schema() == "IFC2X3":
del data["Transparency"]
return data
@classmethod
def get_surface_shading_style(cls, obj):