1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-04 19:21:46 +00:00

GLTF: Only pad zeros when exporting numbered images

This commit is contained in:
Aaron Franke
2025-01-08 00:04:25 -08:00
parent 594d64ec24
commit aeece9d5fb

View File

@@ -3832,10 +3832,9 @@ Error GLTFDocument::_serialize_images(Ref<GLTFState> p_state) {
if (p_state->filename.to_lower().ends_with("gltf")) {
String img_name = p_state->images[i]->get_name();
if (img_name.is_empty()) {
img_name = itos(i);
img_name = itos(i).pad_zeros(3);
}
img_name = _gen_unique_name(p_state, img_name);
img_name = img_name.pad_zeros(3);
String relative_texture_dir = "textures";
String full_texture_dir = p_state->base_path.path_join(relative_texture_dir);
Ref<DirAccess> da = DirAccess::open(p_state->base_path);