Skip to content

Commit

Permalink
Accept version 200 in vox loader
Browse files Browse the repository at this point in the history
  • Loading branch information
Zylann committed Feb 1, 2025
1 parent 3682852 commit 45c4ebb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/source/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Primarily developped with Godot 4.3.
- Fixed crash when assigning an empty image to the `Image` node
- `VoxelMesherTransvoxel`: revert texturing logic that attempted to prevent air voxels from contributing, but was lowering quality. It is now optional as an experimental property.
- `VoxelStreamSQLite`: Fixed "empty size" errors when loading areas with edited `VoxelInstancer` data
- `VoxelVoxLoader`: Fixed loading `.vox` files saved with versions of MagicaVoxel following 0.99.7
- `.vox` scene importer: disabled threaded import to workaround the editor freezing when saving meshes

- Breaking changes
Expand Down
7 changes: 6 additions & 1 deletion streams/vox/vox_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,12 @@ Error Data::_load_from_file(String fpath) {
ERR_FAIL_COND_V(strcmp(magic, "VOX ") != 0, ERR_PARSE_ERROR);

const uint32_t version = f.get_32();
ERR_FAIL_COND_V(version != 150, ERR_PARSE_ERROR);
// <2025/01/22>: at this time, the spec repo from ephtracy only indicates version 150. 200 was added at some point,
// supposedly adding new extensions, but I could not find a clue in the spec indicating that they were added at
// version 200 (the string "200" appears nowhere in the repo). For now, since there was no change to extensions our
// loader support, we just allow that version without other difference.
// See https://github.com/ephtracy/ephtracy.github.io/issues/264
ERR_FAIL_COND_V(version != 150 && version != 200, ERR_PARSE_ERROR);

const size_t file_length = f.get_length();

Expand Down

0 comments on commit 45c4ebb

Please sign in to comment.