Previews fixed

This commit is contained in:
Mark Hoekveen
2019-10-28 12:32:38 +01:00
parent a05c72fc4a
commit cc2a677005
3 changed files with 87 additions and 31 deletions
+7 -1
View File
@@ -27,6 +27,10 @@ const SKIN_COLORS = [
Color("#333333")
]
var SKIN_MATERIALS = [
SpatialMaterial.new()
]
func initialize():
# Make one boolean per thing we need
for i in range(TRAITS.size()):
@@ -93,7 +97,9 @@ func set_color():
var mesh = get_node("Node/Node 2/Armature/Mesh")
var mat = mesh.get_surface_material(0).duplicate()
mat.albedo_color = SKIN_COLORS[x]
mesh.set_surface_material(0, mat)
# mesh.set_surface_material(0, mat)
SKIN_MATERIALS[0].albedo_color = SKIN_COLORS[x]
mesh.set_surface_material(0, SKIN_MATERIALS[0])
print(SKIN_COLORS[x])
func _ready():