Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gltf2_blender_KHR_materials_ior.py « imp « blender « io_scene_gltf2 - git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ab5b2e7e36a95e2cf86d3aac348dc0bff46270ec (plain)
1
2
3
4
5
6
7
8
9
10
11
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