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:
authorPeter Kim <pk15950@gmail.com>2022-09-08 07:00:43 +0300
committerPeter Kim <pk15950@gmail.com>2022-09-08 07:00:43 +0300
commite83f88c951e26b01893acee4f24b40a46062a41c (patch)
tree09f60bf7d4fc2ae1ef50668823e416fc675b252e /io_scene_gltf2/blender/imp/gltf2_blender_material.py
parentec84e3294593e2e26475f18c81e847bf00dc201e (diff)
parent0cd92169d40ae1c7e103ff269e850eaf1b901646 (diff)
Merge branch 'master' into xr-devxr-dev
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