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

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Duroure <julien.duroure@gmail.com>2022-07-07 09:03:39 +0300
committerJulien Duroure <julien.duroure@gmail.com>2022-07-07 09:03:39 +0300
commit042fbefac686666190915d206600a5dab8e03066 (patch)
tree52bb07b361d72b14b98275a07418f7d72489b5bf /io_scene_gltf2/blender/imp/gltf2_blender_material.py
parent09d752e8453415daff11e94f87d8692a04b4eeff (diff)
glTF importer/exporter: Manage some official Khronos Extensions about Materials
KHR_materials_ior KHR_materials_sheen KHR_materials_specular KHR_materials_transmission KHR_materials_variants KHR_materials_emissive_strength KHR_materials_volume Documentation update is still in progress
Diffstat (limited to 'io_scene_gltf2/blender/imp/gltf2_blender_material.py')
-rwxr-xr-xio_scene_gltf2/blender/imp/gltf2_blender_material.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_material.py b/io_scene_gltf2/blender/imp/gltf2_blender_material.py
index 1d18c65d..9a582f7e 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_material.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_material.py
@@ -48,6 +48,11 @@ class BlenderMaterial():
else:
pbr_metallic_roughness(mh)
+ # Manage KHR_materials_variants
+ # We need to store link between material idx in glTF and Blender Material id
+ if gltf.KHR_materials_variants is True:
+ gltf.variant_mapping[str(material_idx) + str(vertex_color)] = mat
+
import_user_extensions('gather_import_material_after_hook', gltf, pymaterial, vertex_color, mat)
@staticmethod