-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GLTF: Don't duplicate textures when importing blend files
Blender imports will always start within `.godot/imported` folder because we first convert the .blend file to .gltf, store it in `.godot/imported` and run the import from there, so on-disk resources linked from .blend files end up with duplicate textures.
- Loading branch information
Showing
9 changed files
with
674 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
147 changes: 147 additions & 0 deletions
147
modules/gltf/tests/data/gltf_embedded_texture/embedded_texture.gltf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
{ | ||
"asset":{ | ||
"generator":"Khronos glTF Blender I/O v4.2.70", | ||
"version":"2.0" | ||
}, | ||
"scene":0, | ||
"scenes":[ | ||
{ | ||
"name":"Scene", | ||
"nodes":[ | ||
1 | ||
] | ||
} | ||
], | ||
"nodes":[ | ||
{ | ||
"mesh":0, | ||
"name":"mesh_instance_3d" | ||
}, | ||
{ | ||
"children":[ | ||
0 | ||
], | ||
"name":"_Node3D_6" | ||
} | ||
], | ||
"materials":[ | ||
{ | ||
"name":"material", | ||
"pbrMetallicRoughness":{ | ||
"baseColorFactor":[ | ||
0.9999998807907104, | ||
0.9999998807907104, | ||
0.9999998807907104, | ||
1 | ||
], | ||
"baseColorTexture":{ | ||
"index":0 | ||
}, | ||
"metallicFactor":0 | ||
} | ||
} | ||
], | ||
"meshes":[ | ||
{ | ||
"name":"Mesh_0", | ||
"primitives":[ | ||
{ | ||
"attributes":{ | ||
"POSITION":0, | ||
"NORMAL":1, | ||
"TEXCOORD_0":2 | ||
}, | ||
"indices":3, | ||
"material":0 | ||
} | ||
] | ||
} | ||
], | ||
"textures":[ | ||
{ | ||
"sampler":0, | ||
"source":0 | ||
} | ||
], | ||
"images":[ | ||
{ | ||
"mimeType":"image/png", | ||
"name":"material_albedo000", | ||
"uri":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAABZJREFUCJljZGBg+P+fgYGBBUIxMAAAKCAEAplLvcoAAAAASUVORK5CYII=" | ||
} | ||
], | ||
"accessors":[ | ||
{ | ||
"bufferView":0, | ||
"componentType":5126, | ||
"count":4, | ||
"max":[ | ||
1, | ||
0, | ||
1 | ||
], | ||
"min":[ | ||
-1, | ||
0, | ||
-1 | ||
], | ||
"type":"VEC3" | ||
}, | ||
{ | ||
"bufferView":1, | ||
"componentType":5126, | ||
"count":4, | ||
"type":"VEC3" | ||
}, | ||
{ | ||
"bufferView":2, | ||
"componentType":5126, | ||
"count":4, | ||
"type":"VEC2" | ||
}, | ||
{ | ||
"bufferView":3, | ||
"componentType":5123, | ||
"count":6, | ||
"type":"SCALAR" | ||
} | ||
], | ||
"bufferViews":[ | ||
{ | ||
"buffer":0, | ||
"byteLength":48, | ||
"byteOffset":0, | ||
"target":34962 | ||
}, | ||
{ | ||
"buffer":0, | ||
"byteLength":48, | ||
"byteOffset":48, | ||
"target":34962 | ||
}, | ||
{ | ||
"buffer":0, | ||
"byteLength":32, | ||
"byteOffset":96, | ||
"target":34962 | ||
}, | ||
{ | ||
"buffer":0, | ||
"byteLength":12, | ||
"byteOffset":128, | ||
"target":34963 | ||
} | ||
], | ||
"samplers":[ | ||
{ | ||
"magFilter":9729, | ||
"minFilter":9987 | ||
} | ||
], | ||
"buffers":[ | ||
{ | ||
"byteLength":140, | ||
"uri":"data:application/octet-stream;base64,AACAPwAAAAAAAIA/AACAvwAAAAAAAIA/AACAPwAAAAAAAIC/AACAvwAAAAAAAIC/AAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAACAPwAAgD8AAAAAAAAAAAAAAAACAAEAAAACAAMAAQA=" | ||
} | ||
] | ||
} |
Oops, something went wrong.