Use strict shared FBX record parsing

This commit is contained in:
Dylan M. Taylor
2026-11-15 18:41:48 +00:00
parent 8d593fdebe
commit 5a70a033cc
3 changed files with 6 additions and 6 deletions
Generated
+3 -3
View File
@@ -842,9 +842,9 @@ dependencies = [
[[package]]
name = "craft-mesh"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=4a84c00372972fb99755cba34978a5e73387c3f0#4a84c00372972fb99755cba34978a5e73387c3f0"
source = "git+https://github.com/storytold/craft-libs?rev=17e18e31c29fb8c4bf56bb7242ff9dcdb3d3a66f#17e18e31c29fb8c4bf56bb7242ff9dcdb3d3a66f"
dependencies = [
"craft-zip 0.1.0 (git+https://github.com/storytold/craft-libs?rev=4a84c00372972fb99755cba34978a5e73387c3f0)",
"craft-zip 0.1.0 (git+https://github.com/storytold/craft-libs?rev=17e18e31c29fb8c4bf56bb7242ff9dcdb3d3a66f)",
"miniz_oxide 0.9.1",
]
@@ -931,7 +931,7 @@ dependencies = [
[[package]]
name = "craft-zip"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=4a84c00372972fb99755cba34978a5e73387c3f0#4a84c00372972fb99755cba34978a5e73387c3f0"
source = "git+https://github.com/storytold/craft-libs?rev=17e18e31c29fb8c4bf56bb7242ff9dcdb3d3a66f#17e18e31c29fb8c4bf56bb7242ff9dcdb3d3a66f"
dependencies = [
"flate2",
"thiserror 2.0.21",
+1 -1
View File
@@ -69,7 +69,7 @@ rustix = { version = "1", default-features = false, features = ["std", "fs", "pr
craft-i18n = { git = "https://github.com/storytold/craft-libs", rev = "390fe98b0dd3fb84db7c3af7cbd958db4e8cc585" }
craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "390fe98b0dd3fb84db7c3af7cbd958db4e8cc585", features = ["serde"] }
craft-materialx = { git = "https://github.com/storytold/craft-libs", rev = "390fe98b0dd3fb84db7c3af7cbd958db4e8cc585" }
craft-mesh = { git = "https://github.com/storytold/craft-libs", rev = "4a84c00372972fb99755cba34978a5e73387c3f0", default-features = false, features = ["stl", "fbx"] }
craft-mesh = { git = "https://github.com/storytold/craft-libs", rev = "17e18e31c29fb8c4bf56bb7242ff9dcdb3d3a66f", default-features = false, features = ["stl", "fbx"] }
craft-mcmat = { git = "https://github.com/storytold/craft-libs", rev = "828b07f3c9f3f6a2e935087b859016a5e46b1c31" }
craft-zip = { git = "https://github.com/storytold/craft-libs", rev = "828b07f3c9f3f6a2e935087b859016a5e46b1c31" }
# Who draws the window frame, and the app-drawn strip as the title bar (crates/ui-egui/src/titlebar.rs).
+2 -2
View File
@@ -53,7 +53,7 @@ pub(crate) fn package(file_name: &str, bytes: &[u8], found: &mut dyn FnMut(&str)
}
crate::guard(KIND, || {
let limits = limits();
let doc = craft_mesh::fbx::read_document(bytes, &limits).map_err(convert)?;
let doc = craft_mesh::fbx::read_document_strict(bytes, &limits).map_err(convert)?;
if doc.version == 0 {
return Err(malformed(KIND, "not an FBX file (no FBXHeaderExtension / FBXVersion)"));
}
@@ -65,7 +65,7 @@ pub(crate) fn package(file_name: &str, bytes: &[u8], found: &mut dyn FnMut(&str)
fn read_inner(bytes: &[u8], files: &mut Files) -> Result<RawMesh> {
let limits = limits();
let doc = craft_mesh::fbx::read_document(bytes, &limits).map_err(convert)?;
let doc = craft_mesh::fbx::read_document_strict(bytes, &limits).map_err(convert)?;
if doc.version == 0 {
return Err(malformed(KIND, "not an FBX file (no FBXHeaderExtension / FBXVersion)"));
}