mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-20 09:05:51 +00:00
Merge remote-tracking branch 'upstream/main' into cache-defaults-3298
This commit is contained in:
commit
9924ebb1e0
171 files changed
+6309
-720
No files matched your search
@@ -65,6 +65,7 @@ impl Exporter for FileExporter {
|
||||
caches: job.caches.map(|c| effectcraft_export::JobCaches { gpu: &c.gpu, cpu: &c.cpu }),
|
||||
renderer: job.renderer,
|
||||
gpu_frames: job.gpu_frames,
|
||||
free_memory: Some(&free_memory),
|
||||
},
|
||||
nested_switches: job.nested_switches,
|
||||
};
|
||||
@@ -87,6 +88,11 @@ impl Exporter for FileExporter {
|
||||
}
|
||||
}
|
||||
|
||||
/// The memory the system can hand out now, for an export's Auto CPU frames in flight (#1615).
|
||||
fn free_memory() -> Option<u64> {
|
||||
effectcraft_engine::sysinfo::memory().map(|m| m.available)
|
||||
}
|
||||
|
||||
/// A new session with media, import, expressions, scripting and export enabled.
|
||||
pub fn session() -> Session {
|
||||
let mut s = Session {
|
||||
|
||||
@@ -547,6 +547,7 @@ fn script_imports_footage_and_saves() {
|
||||
std::fs::create_dir_all(&dir).unwrap();
|
||||
let q = |n: &str| serde_json::to_string(&dir.join(n).to_string_lossy()).unwrap();
|
||||
let mut s = super::session();
|
||||
s.execute("prefs.set", json!({"key": "scripting.allowScriptsWriteFiles", "value": true})).unwrap();
|
||||
let code = format!(
|
||||
r#"
|
||||
var c = app.project.items.addComp("Src", 32, 32, 1, 1, 10);
|
||||
|
||||
Reference in new issue
Block a user