Allow blend exports without images
This commit is contained in:
+2
-5
@@ -282,11 +282,8 @@ fn make_glb(
|
|||||||
})?;
|
})?;
|
||||||
let mut bin = fs::read(temp.path().join(bin_name))?;
|
let mut bin = fs::read(temp.path().join(bin_name))?;
|
||||||
let model_parent = model_asset_path.parent().unwrap_or_else(|| Path::new(""));
|
let model_parent = model_asset_path.parent().unwrap_or_else(|| Path::new(""));
|
||||||
let image_count = json["images"]
|
let image_count = json["images"].as_array().map_or(0, Vec::len);
|
||||||
.as_array()
|
if image_count > 0 && !json["bufferViews"].is_array() {
|
||||||
.ok_or_else(|| io::Error::new(io::ErrorKind::InvalidData, "glTF images are not an array"))?
|
|
||||||
.len();
|
|
||||||
if !json["bufferViews"].is_array() {
|
|
||||||
return Err(io::Error::new(
|
return Err(io::Error::new(
|
||||||
io::ErrorKind::InvalidData,
|
io::ErrorKind::InvalidData,
|
||||||
"glTF bufferViews are not an array",
|
"glTF bufferViews are not an array",
|
||||||
|
|||||||
Reference in New Issue
Block a user