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>2020-09-05 16:25:26 +0300
committerJulien Duroure <julien.duroure@gmail.com>2020-09-05 16:25:26 +0300
commitf9696870783db9e33b69f29ee61e7e7616d33b8c (patch)
tree38de76c66a08ff05ce40eec4924082eb2694a74e /io_scene_gltf2/io
parent98672709fc4d73f353f94659f29bedb41cd251a1 (diff)
glTF importer:
Permit missing texture.source
Diffstat (limited to 'io_scene_gltf2/io')
-rwxr-xr-xio_scene_gltf2/io/com/gltf2_io.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/io_scene_gltf2/io/com/gltf2_io.py b/io_scene_gltf2/io/com/gltf2_io.py
index 7d70b5fb..86a29f5c 100755
--- a/io_scene_gltf2/io/com/gltf2_io.py
+++ b/io_scene_gltf2/io/com/gltf2_io.py
@@ -1117,7 +1117,7 @@ class Texture:
extras = obj.get("extras")
name = from_union([from_str, from_none], obj.get("name"))
sampler = from_union([from_int, from_none], obj.get("sampler"))
- source = from_int(obj.get("source"))
+ source = from_union([from_int, from_none], obj.get("source"))
return Texture(extensions, extras, name, sampler, source)
def to_dict(self):
@@ -1127,7 +1127,7 @@ class Texture:
result["extras"] = from_extra(self.extras)
result["name"] = from_union([from_str, from_none], self.name)
result["sampler"] = from_union([from_int, from_none], self.sampler)
- result["source"] = from_int(self.source) # most viewers can't handle missing sources
+ result["source"] = from_union([from_int, from_none], self.source)
return result