Skip to content

Commit

Permalink
fix: glTF material name for 3.3 or earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
saturday06 committed May 19, 2024
1 parent 6a2afd1 commit e8335e4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/io_scene_vrm/importer/gltf2_addon_vrm_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1435,8 +1435,10 @@ def assign_packed_image_filepaths(self) -> None:
if not image_name:
image_name = remove_unsafe_path_chars(image.name)
image_type = image.file_format.lower()
sep = os.sep if bpy.app.version >= (3, 4) else os.altsep
image.filepath_raw = f"//textures{sep}{image_name}.{image_type}"
if bpy.app.version >= (3, 4):
image.filepath_raw = f"//textures{os.sep}{image_name}.{image_type}"
else:
image.filepath_raw = f"//{image_name}.{image_type}"

def extract_textures(self, repack: bool) -> None:
dir_path = self.parse_result.filepath.with_suffix(".vrm.textures").absolute()
Expand Down

0 comments on commit e8335e4

Please sign in to comment.