Comments (5)
What is the expected behavior?
from tinygltf.
I suppose to create a relative path, like it does with the image uris?
The spec does not enforce a relative file path:
The uri of the buffer. Relative paths are relative to the .gltf file. Instead of referencing an external file, the uri can also be a data-uri.
It seems illogical to save an absolute path, though, because it prevents you from sharing or moving the .bin file.
from tinygltf.
Could you please post a minimal procedure for reproducing issue and expected behavior?
from tinygltf.
It's just this:
std::string error;
tinygltf::Model model;
parser.LoadASCIIFromFile(&model, &error, absoluteFilePath));
parser.WriteGltfSceneToFile(&model, "D:/[someDir]/[someName].gltf");
The result is a buffer.uri with an absolute file path, but a different extension. I would expect the buffer.uri property to contain a path relative to the gltf (which is just gltfFileName.bin
in this case).
from tinygltf.
Fixed : d42767e#diff-f70622f14b85ce3409f1f100e5c47ec4R3722
It should work well on Windows, but if you face an issue, please send us PR.
from tinygltf.
Related Issues (20)
- Version numbers in header file is outdate HOT 1
- hows to get model coordinates
- How can I retreive referenced file names in GLB/GLTF file?
- Convert .B3DM to .glb, .glb file has lost its geospatial coordinates
- Unused string in LoadBinaryFromFile in tiny_gltf.h HOT 2
- Empty nodes are wrongly serialized as null HOT 5
- Light reference in the node HOT 3
- Default constructed Material has wrong emissiveFactor
- how to enable EXT_Meshopt_compression
- Empty scenes are wrongly serialized as null HOT 2
- Enabling the file "tiny_gltf.h" to another header file HOT 1
- stbi_load and stbi_free_image are disabled
- model.nodes[idx].name returned wrong string when name is unicode string? HOT 6
- TinyGltf not setting the correct indices when loading a model HOT 1
- Images are not saved to disk properly HOT 3
- C2065 'M_PI': undeclared identifier error when building glview.cpp on WIN32 HOT 4
- The extension EXT_meshopt_compression is REQUIRED and not supported
- WriteGltfSceneToFile (_wopen) might fail when compiling with MinGW (MSYS2) HOT 1
- scene.nodes.size() always gives ยซ1ยป HOT 1
- test failures on ppc64le and s390x HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinygltf.