diff options
Diffstat (limited to 'io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_ior.py')
-rw-r--r-- | io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_ior.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_ior.py b/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_ior.py new file mode 100644 index 00000000..ab5b2e7e --- /dev/null +++ b/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_ior.py @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2018-2021 The glTF-Blender-IO authors. + +from ...io.com.gltf2_io_constants import GLTF_IOR + +def ior(mh, ior_socket): + try: + ext = mh.pymat.extensions['KHR_materials_ior'] + except Exception: + return + ior = ext.get('ior', GLTF_IOR) + ior_socket.default_value = ior |