Skip to content

Commit

Permalink
Add Blender 4.x compatibility for materials.py (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaoticByte authored May 30, 2024
1 parent b8a53fa commit b6dc83b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@
# Create principled shader
prin = nodes.new("ShaderNodeBsdfPrincipled")
prin.location = 300, 0
prin.inputs["Specular"].default_value = 0
if int(bpy.app.version_string.split('.')[0]) >= 4:
prin.inputs["Specular IOR Level"].default_value = 0
else:
prin.inputs["Specular"].default_value = 0

# Create output
out = nodes.new("ShaderNodeOutputMaterial")
Expand Down

0 comments on commit b6dc83b

Please sign in to comment.