mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-18 16:24:38 +00:00
Merge branch 'codex/fbx-package' into codex/fbx-integration
This commit is contained in:
commit
8355676df4
2 files changed
+15
-15
No files matched your search
@@ -1087,12 +1087,12 @@ impl Document {
|
||||
paths.push(path);
|
||||
}
|
||||
}
|
||||
if !paths.is_empty() {
|
||||
if let Some(bytes) = resolve(&paths) {
|
||||
budget.take(Some(bytes.len()), "a resolved image")?;
|
||||
image = Some(bytes);
|
||||
break;
|
||||
}
|
||||
if !paths.is_empty()
|
||||
&& let Some(bytes) = resolve(&paths)
|
||||
{
|
||||
budget.take(Some(bytes.len()), "a resolved image")?;
|
||||
image = Some(bytes);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,16 +95,16 @@ pub fn write(
|
||||
return Some(data.clone());
|
||||
}
|
||||
for path in paths {
|
||||
if let Some(name) = below(path) {
|
||||
if let Some(data) = found(path).filter(|d| d.len() as u64 <= package_limits.max_texture_bytes) {
|
||||
total = total.saturating_add(data.len() as u64);
|
||||
if total > package_limits.max_total_bytes {
|
||||
exceeded = true;
|
||||
return None;
|
||||
}
|
||||
files.push((name, data.clone()));
|
||||
return Some(data);
|
||||
if let Some(name) = below(path)
|
||||
&& let Some(data) = found(path).filter(|d| d.len() as u64 <= package_limits.max_texture_bytes)
|
||||
{
|
||||
total = total.saturating_add(data.len() as u64);
|
||||
if total > package_limits.max_total_bytes {
|
||||
exceeded = true;
|
||||
return None;
|
||||
}
|
||||
files.push((name, data.clone()));
|
||||
return Some(data);
|
||||
}
|
||||
}
|
||||
if let Some(first) = paths.first().filter(|p| !missing.iter().any(|m| m == **p)) {
|
||||
|
||||
Reference in new issue
Block a user