mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 09:02:44 +00:00
Fix bug in IFC2X3 where updating style colours didn't work.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user