mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-30 04:57:54 -06:00
Templates: packages keep indented project JSON, as the docs say; only Save Compact applies
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
bcf2d2b7e5
commit
31a2716a19
@@ -865,7 +865,7 @@ fn export_template(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
{
|
||||
entries.push(("poster.png".into(), png));
|
||||
}
|
||||
entries.insert(0, ("project.ecproj".into(), sub.to_json_compact().into_bytes()));
|
||||
entries.insert(0, ("project.ecproj".into(), sub.to_json().into_bytes()));
|
||||
entries.insert(0, ("manifest.json".into(), serde_json::to_vec_pretty(&manifest).unwrap_or_default()));
|
||||
let bytes = effectcraft_lottie::zip::store(&entries);
|
||||
s.services.write_file(&path, &bytes).map_err(|e| EngineError::Other(format!("cannot write {path}: {e}")))?;
|
||||
|
||||
@@ -895,7 +895,7 @@ fn save_as(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
let t = s.time_of(cid);
|
||||
let mut entries: Vec<(String, Vec<u8>)> = vec![
|
||||
("manifest.json".into(), serde_json::to_vec_pretty(&manifest).unwrap_or_default()),
|
||||
("project.ecproj".into(), proj.to_json_compact().into_bytes()),
|
||||
("project.ecproj".into(), proj.to_json().into_bytes()),
|
||||
];
|
||||
entries.extend(media_entries);
|
||||
if let Ok((w, h, rgba)) = s.render_rgba8(cid, t, 320) {
|
||||
|
||||
Reference in New Issue
Block a user