glTF importer: fix bug on windows, use absolute path
This commit is contained in:
parent
e4269fc795
commit
520b6af2be
|
@ -15,7 +15,7 @@
|
|||
bl_info = {
|
||||
'name': 'glTF 2.0 format',
|
||||
'author': 'Julien Duroure, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
|
||||
"version": (1, 2, 40),
|
||||
"version": (1, 2, 41),
|
||||
'blender': (2, 82, 7),
|
||||
'location': 'File > Import-Export',
|
||||
'description': 'Import-Export as glTF 2.0',
|
||||
|
|
|
@ -58,7 +58,7 @@ class BlenderImage():
|
|||
path = tmp_file.name
|
||||
|
||||
num_images = len(bpy.data.images)
|
||||
blender_image = bpy.data.images.load(path, check_existing=img_from_file)
|
||||
blender_image = bpy.data.images.load(os.path.abspath(path), check_existing=img_from_file)
|
||||
if len(bpy.data.images) != num_images: # If created a new image
|
||||
blender_image.name = img_name
|
||||
if gltf.import_settings['import_pack_images'] or not img_from_file:
|
||||
|
|
Loading…
Reference in New Issue