Getting ready for deploy
This commit is contained in:
+28
-47
@@ -64,27 +64,21 @@ def _inner_NEON_GLOW(nodes, links, y=0, color=(0.0, 1.0, 0.9, 1.0),
|
||||
def _inner_METALLIC(nodes, links, y=0, color=(1.0, 0.78, 0.28, 1.0),
|
||||
roughness=0.05, metallic=1.0, emission_strength=1.0, **kwargs):
|
||||
prin = nodes.new("ShaderNodeBsdfPrincipled"); prin.location = (0, y)
|
||||
prin.inputs["Base Color"].default_value = color
|
||||
prin.inputs["Metallic"].default_value = metallic
|
||||
prin.inputs["Roughness"].default_value = roughness
|
||||
try:
|
||||
prin.inputs["Specular IOR Level"].default_value = 1.0
|
||||
except KeyError:
|
||||
pass # name differs in older Blender versions
|
||||
prin.inputs["Base Color"].default_value = color
|
||||
prin.inputs["Metallic"].default_value = metallic
|
||||
prin.inputs["Roughness"].default_value = roughness
|
||||
prin.inputs["Specular IOR Level"].default_value = 1.0
|
||||
return prin.outputs["BSDF"]
|
||||
|
||||
|
||||
def _inner_GLASS(nodes, links, y=0, color=(0.85, 0.95, 1.0, 1.0),
|
||||
roughness=0.0, metallic=0.0, emission_strength=1.0, **kwargs):
|
||||
prin = nodes.new("ShaderNodeBsdfPrincipled"); prin.location = (0, y)
|
||||
prin.inputs["Base Color"].default_value = color
|
||||
prin.inputs["Metallic"].default_value = metallic
|
||||
prin.inputs["Roughness"].default_value = roughness
|
||||
prin.inputs["IOR"].default_value = 1.45
|
||||
for key in ("Transmission Weight", "Transmission"):
|
||||
if key in prin.inputs:
|
||||
prin.inputs[key].default_value = 1.0
|
||||
break
|
||||
prin.inputs["Base Color"].default_value = color
|
||||
prin.inputs["Metallic"].default_value = metallic
|
||||
prin.inputs["Roughness"].default_value = roughness
|
||||
prin.inputs["IOR"].default_value = 1.45
|
||||
prin.inputs["Transmission Weight"].default_value = 1.0
|
||||
return prin.outputs["BSDF"]
|
||||
|
||||
|
||||
@@ -169,8 +163,6 @@ def _inner_MATTE_CLAY(nodes, links, y=0, color=(0.6, 0.4, 0.3, 1.0),
|
||||
prin = nodes.new("ShaderNodeBsdfPrincipled"); prin.location = (0, y)
|
||||
prin.inputs["Base Color"].default_value = color
|
||||
prin.inputs["Roughness"].default_value = roughness
|
||||
if "Specular" in prin.inputs:
|
||||
prin.inputs["Specular"].default_value = 0.1
|
||||
return prin.outputs["BSDF"]
|
||||
|
||||
|
||||
@@ -192,15 +184,11 @@ def _inner_GHOST(nodes, links, y=0, color=(0.7, 0.8, 1.0, 1.0),
|
||||
def _inner_CAR_PAINT(nodes, links, y=0, color=(0.8, 0.05, 0.1, 1.0),
|
||||
roughness=0.3, metallic=0.8, emission_strength=1.0, **kwargs):
|
||||
prin = nodes.new("ShaderNodeBsdfPrincipled"); prin.location = (0, y)
|
||||
prin.inputs["Base Color"].default_value = color
|
||||
prin.inputs["Metallic"].default_value = metallic
|
||||
prin.inputs["Roughness"].default_value = roughness
|
||||
if "Clearcoat" in prin.inputs:
|
||||
prin.inputs["Clearcoat"].default_value = 1.0
|
||||
prin.inputs["Clearcoat Roughness"].default_value = 0.03
|
||||
elif "Coat Weight" in prin.inputs:
|
||||
prin.inputs["Coat Weight"].default_value = 1.0
|
||||
prin.inputs["Coat Roughness"].default_value = 0.03
|
||||
prin.inputs["Base Color"].default_value = color
|
||||
prin.inputs["Metallic"].default_value = metallic
|
||||
prin.inputs["Roughness"].default_value = roughness
|
||||
prin.inputs["Coat Weight"].default_value = 1.0
|
||||
prin.inputs["Coat Roughness"].default_value = 0.03
|
||||
return prin.outputs["BSDF"]
|
||||
|
||||
|
||||
@@ -216,28 +204,22 @@ def _inner_CHROME(nodes, links, y=0, color=(0.95, 0.95, 0.95, 1.0),
|
||||
def _inner_RUBY_GLASS(nodes, links, y=0, color=(1.0, 0.05, 0.05, 1.0),
|
||||
roughness=0.02, metallic=0.0, emission_strength=1.0, **kwargs):
|
||||
prin = nodes.new("ShaderNodeBsdfPrincipled"); prin.location = (0, y)
|
||||
prin.inputs["Base Color"].default_value = color
|
||||
prin.inputs["Metallic"].default_value = metallic
|
||||
prin.inputs["Roughness"].default_value = roughness
|
||||
prin.inputs["IOR"].default_value = 1.6
|
||||
for key in ("Transmission Weight", "Transmission"):
|
||||
if key in prin.inputs:
|
||||
prin.inputs[key].default_value = 1.0
|
||||
break
|
||||
prin.inputs["Base Color"].default_value = color
|
||||
prin.inputs["Metallic"].default_value = metallic
|
||||
prin.inputs["Roughness"].default_value = roughness
|
||||
prin.inputs["IOR"].default_value = 1.6
|
||||
prin.inputs["Transmission Weight"].default_value = 1.0
|
||||
return prin.outputs["BSDF"]
|
||||
|
||||
|
||||
def _inner_FROSTED_ICE(nodes, links, y=0, color=(0.9, 0.95, 1.0, 1.0),
|
||||
roughness=0.4, metallic=0.0, emission_strength=1.0, **kwargs):
|
||||
prin = nodes.new("ShaderNodeBsdfPrincipled"); prin.location = (0, y)
|
||||
prin.inputs["Base Color"].default_value = color
|
||||
prin.inputs["Metallic"].default_value = metallic
|
||||
prin.inputs["Roughness"].default_value = roughness
|
||||
prin.inputs["IOR"].default_value = 1.31
|
||||
for key in ("Transmission Weight", "Transmission"):
|
||||
if key in prin.inputs:
|
||||
prin.inputs[key].default_value = 1.0
|
||||
break
|
||||
prin.inputs["Base Color"].default_value = color
|
||||
prin.inputs["Metallic"].default_value = metallic
|
||||
prin.inputs["Roughness"].default_value = roughness
|
||||
prin.inputs["IOR"].default_value = 1.31
|
||||
prin.inputs["Transmission Weight"].default_value = 1.0
|
||||
return prin.outputs["BSDF"]
|
||||
|
||||
|
||||
@@ -375,11 +357,10 @@ def _inner_PEARLESCENT(nodes, links, y=0, color=(1.0, 0.4, 0.7, 1.0),
|
||||
cr.interpolation = 'LINEAR'
|
||||
cr.elements[0].position = 0.0; cr.elements[0].color = (0.1, 0.8, 1.0, 1.0)
|
||||
cr.elements[1].position = 1.0; cr.elements[1].color = color
|
||||
prin.inputs["Metallic"].default_value = metallic
|
||||
prin.inputs["Roughness"].default_value = roughness
|
||||
if "Clearcoat" in prin.inputs:
|
||||
prin.inputs["Clearcoat"].default_value = 1.0
|
||||
prin.inputs["Clearcoat Roughness"].default_value = 0.02
|
||||
prin.inputs["Metallic"].default_value = metallic
|
||||
prin.inputs["Roughness"].default_value = roughness
|
||||
prin.inputs["Coat Weight"].default_value = 1.0
|
||||
prin.inputs["Coat Roughness"].default_value = 0.02
|
||||
links.new(lw.outputs["Facing"], ramp.inputs["Fac"])
|
||||
links.new(ramp.outputs["Color"], prin.inputs["Base Color"])
|
||||
return prin.outputs["BSDF"]
|
||||
|
||||
Reference in New Issue
Block a user