Fix critical typo in rendering styles creation that led to invisible styles

This commit is contained in:
Dion Moult
2022-09-19 23:10:56 +10:00
parent 83f70624a4
commit d751ee9995
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ class Style(blenderbim.core.tool.Style):
@classmethod @classmethod
def get_surface_rendering_attributes(cls, obj): def get_surface_rendering_attributes(cls, obj):
transparency = obj.diffuse_color[3] transparency = 1 - obj.diffuse_color[3]
diffuse_color = obj.diffuse_color diffuse_color = obj.diffuse_color
attributes = { attributes = {
+5 -5
View File
@@ -175,7 +175,7 @@ class TestGetSurfaceRenderingAttributes(NewFile):
"Green": 1, "Green": 1,
"Blue": 1, "Blue": 1,
}, },
"Transparency": 1, "Transparency": 0,
"DiffuseColour": { "DiffuseColour": {
"Name": None, "Name": None,
"Red": 0.5, "Red": 0.5,
@@ -202,7 +202,7 @@ class TestGetSurfaceRenderingAttributes(NewFile):
"Green": 1, "Green": 1,
"Blue": 1, "Blue": 1,
}, },
"Transparency": 1, "Transparency": 0,
"DiffuseColour": { "DiffuseColour": {
"Name": None, "Name": None,
"Red": 0.5, "Red": 0.5,
@@ -229,7 +229,7 @@ class TestGetSurfaceRenderingAttributes(NewFile):
"Green": 1, "Green": 1,
"Blue": 1, "Blue": 1,
}, },
"Transparency": 1, "Transparency": 0,
"DiffuseColour": { "DiffuseColour": {
"Name": None, "Name": None,
"Red": 0.5, "Red": 0.5,
@@ -255,7 +255,7 @@ class TestGetSurfaceRenderingAttributes(NewFile):
"Green": 1, "Green": 1,
"Blue": 1, "Blue": 1,
}, },
"Transparency": 1, "Transparency": 0,
"DiffuseColour": { "DiffuseColour": {
"Name": None, "Name": None,
"Red": 0.5, "Red": 0.5,
@@ -281,7 +281,7 @@ class TestGetSurfaceRenderingAttributes(NewFile):
"Green": 1, "Green": 1,
"Blue": 1, "Blue": 1,
}, },
"Transparency": 1, "Transparency": 0,
"DiffuseColour": { "DiffuseColour": {
"Name": None, "Name": None,
"Red": 1, "Red": 1,