From c9434f8ec2f72b0cdcd839c74add1be18a560f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex=20Rom=C3=A1n=20N=C3=BA=C3=B1ez?= Date: Mon, 21 Sep 2026 17:37:43 +0200 Subject: [PATCH] Allow blend exports without images --- src/blend_asset.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/blend_asset.rs b/src/blend_asset.rs index 58c05d4..5d45aa1 100644 --- a/src/blend_asset.rs +++ b/src/blend_asset.rs @@ -282,11 +282,8 @@ fn make_glb( })?; let mut bin = fs::read(temp.path().join(bin_name))?; let model_parent = model_asset_path.parent().unwrap_or_else(|| Path::new("")); - let image_count = json["images"] - .as_array() - .ok_or_else(|| io::Error::new(io::ErrorKind::InvalidData, "glTF images are not an array"))? - .len(); - if !json["bufferViews"].is_array() { + let image_count = json["images"].as_array().map_or(0, Vec::len); + if image_count > 0 && !json["bufferViews"].is_array() { return Err(io::Error::new( io::ErrorKind::InvalidData, "glTF bufferViews are not an array",