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>2019-04-20 00:06:18 +0300
committerJulien Duroure <julien.duroure@gmail.com>2019-04-20 00:06:18 +0300
commite49613a5f9c879b1b525e8ac3e3c8af31c3eabcd (patch)
treed8e799111a5878e86eff2906daeb45d513e02446 /io_scene_gltf2/blender/imp/gltf2_blender_image.py
parente4165cee8b34b216db5ff41b20b9a05991a4b4b7 (diff)
glTF: better occlusion map management
At import, create a node group where you can link an image texture At export, use this node group to create correctly the material TODO: doc update
Diffstat (limited to 'io_scene_gltf2/blender/imp/gltf2_blender_image.py')
-rwxr-xr-xio_scene_gltf2/blender/imp/gltf2_blender_image.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_image.py b/io_scene_gltf2/blender/imp/gltf2_blender_image.py
index ed34123e..6e0a9617 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_image.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_image.py
@@ -56,7 +56,9 @@ class BlenderImage():
"""Image creation."""
img = gltf.data.images[img_idx]
- img.blender_image_name = None
+ if img.blender_image_name is not None:
+ # Image is already used somewhere
+ return
if gltf.import_settings['import_pack_images'] is False: