diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py index f1bd5448d3935e9242b0e0fffc497dd98e1ff9d9..1981737aea10bb649524059f4678c77c1b7ec487 100644 --- a/io_import_images_as_planes.py +++ b/io_import_images_as_planes.py @@ -453,7 +453,15 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper): image.use_fields = self.use_fields if self.relative: - image.filepath = bpy.path.relpath(image.filepath) + # can't always find the relative path + # (between drive letters on windows) + try: + filepath_rel = bpy.path.relpath(image.filepath) + except ValueError: + filepath_rel = None + + if filepath_rel is not None: + image.filepath = filepath_rel def set_texture_options(self, context, texture): texture.image.use_alpha = self.use_transparency