Merge pull request #14 from styinx/#13_bsdf_inputs_specular_key

#13: Add check for blender version on specular key
This commit is contained in:
PrismaticFlower 2023-12-03 12:03:14 +13:00 committed by GitHub
commit 9f4a205f3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -180,8 +180,10 @@ to provide an exact emulation"""
texture_input_nodes.append(texImage)
specular_key = "Specular" if bpy.app.version < (4, 0, 0) else "Specular IOR Level"
bsdf.inputs["Roughness"].default_value = 1.0
bsdf.inputs["Specular"].default_value = 0.0
bsdf.inputs[specular_key].default_value = 0.0
material.use_backface_culling = not bool(mat_props.doublesided)