diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2021-01-17 11:43:30 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2021-01-17 11:43:30 +0300 |
commit | 377222442fe1b696a10584ed86f7422963e6d106 (patch) | |
tree | 24454e1523d154054ec9e425b1d05450805a49ca /io_scene_gltf2 | |
parent | 1715c1e8f528d67ec817290a1ae320070995fd06 (diff) | |
parent | ebdf1861dc568a9b4b92b29a9b8f7117ad1eec05 (diff) |
Merge branch 'blender-v2.92-release'
Diffstat (limited to 'io_scene_gltf2')
-rwxr-xr-x | io_scene_gltf2/__init__.py | 2 | ||||
-rw-r--r-- | io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_clearcoat.py | 14 |
2 files changed, 11 insertions, 5 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 2a32d8a6..448a2acc 100755 --- a/io_scene_gltf2/__init__.py +++ b/io_scene_gltf2/__init__.py @@ -15,7 +15,7 @@ bl_info = { 'name': 'glTF 2.0 format', 'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', - "version": (1, 6, 1), + "version": (1, 6, 2), 'blender': (2, 91, 0), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_clearcoat.py b/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_clearcoat.py index 611bffff..018fdb3b 100644 --- a/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_clearcoat.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_clearcoat.py @@ -16,7 +16,7 @@ from ...io.com.gltf2_io import TextureInfo, MaterialNormalTextureInfoClass from .gltf2_blender_texture import texture -# [Texture] => [Clearcoat Factor] => +# [Texture] => [Separate R] => [Clearcoat Factor] => def clearcoat(mh, location, clearcoat_socket): x, y = location try: @@ -49,9 +49,15 @@ def clearcoat(mh, location, clearcoat_socket): x -= 200 - # Clearcoat is in the R component; we don't need to separate it out - # since hooking a color socket up to a value socket automatically gets - # the R + # Separate RGB + node = mh.node_tree.nodes.new('ShaderNodeSeparateRGB') + node.location = x - 150, y - 75 + # Outputs + mh.node_tree.links.new(clearcoat_socket, node.outputs['R']) + # Inputs + clearcoat_socket = node.inputs[0] + + x -= 200 texture( mh, |