Skip to content

armgit / raea

Public Imported from GitHub
0

Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.

CC2d: raea export capcut keeps the copy of CapCut's project list in the person's own folder, ~/.raea/capcut/backups (%LOCALAPPDATA%\raea\capcut\backups on Windows, RAEA_CAPCUT_BACKUPS to choose), as docs/capcut.feature says. It went to raea's home, which from a checkout is the source tree, so an export run from one left the backup in the repository

shinyobjectz45aa5ca212f4
diff --git a/apps/capcut/src/lib.rs b/apps/capcut/src/lib.rs
index 03febc31..658139a0 100644
--- a/apps/capcut/src/lib.rs
+++ b/apps/capcut/src/lib.rs
@@ -186,8 +186,7 @@ fn export(args: &[String]) -> R<String> {
let listed = if !in_store || args.iter().any(|a| a == "--no-register") {
"not entered in CapCut's project list".to_string()
} else {
- let backups = raea_io_home::home().join("capcut/backups");
- match raea_io_capcut::register(&root, &written.dir, &written.meta, written.info_bytes, &backups) {
+ match raea_io_capcut::register(&root, &written.dir, &written.meta, written.info_bytes, &backups()) {
Ok(b) => format!("entered in CapCut's project list (its list before: {})", b.display()),
Err(e) => format!("not entered in CapCut's project list: {e}"),
}
@@ -213,6 +212,16 @@ fn export(args: &[String]) -> R<String> {
Ok(said)
}
+/// Where CapCut's project list is copied before a draft is entered in it: the person's own folder, ~/.raea/capcut/backups
+/// ($RAEA_CAPCUT_BACKUPS; %LOCALAPPDATA%\raea\capcut\backups on Windows, which sets no HOME). Never raea's home, which
+/// is its install or, from a checkout, the source tree (11-11: a list's backup landed in the repository).
+fn backups() -> PathBuf {
+ match std::env::var_os("LOCALAPPDATA").filter(|d| cfg!(windows) && !d.is_empty() && std::env::var_os("RAEA_CAPCUT_BACKUPS").is_none()) {
+ Some(d) => PathBuf::from(d).join("raea").join("capcut").join("backups"),
+ None => raea_io_home::env_path("RAEA_CAPCUT_BACKUPS", ".raea/capcut/backups"),
+ }
+}
+
/// A movie raea drew, as clips of it wherever it draws, full frame on tracks named `name`; none when it draws nothing.
fn drawn(media: &mut Vec<Media>, path: &Path, m: &raea_io_alpha::Made, fps: f64, name: &str) -> Vec<Track> {
let spans = plan::spans(&m.drawn);
diff --git a/docs/manual/reference/cli/export.md b/docs/manual/reference/cli/export.md
index 355f8d7f..f692152f 100644
--- a/docs/manual/reference/cli/export.md
+++ b/docs/manual/reference/cli/export.md
@@ -16,7 +16,7 @@ raea renders the composition three times. The first render, as it is, is kept in
Each stretch of frames that shows one video file becomes a clip of that file, starting where the composition starts it and playing at its rate. It is placed and scaled as `object-fit` shows it in raea (`cover`, `contain`, a crop). Clips covering the whole frame go on the main track; the others go on tracks above it. A video's own sound stays on its clip at the composition's volume; every other sound becomes an audio clip with its gain and fades. The output names what doesn't carry over, such as the Tone graph's music, which has no file, or a clip that moves or fades within its shot (placed as its first frame shows it).
-CapCut rewrites its project list when it quits, so `raea export capcut` refuses to write into CapCut's projects while CapCut is open. Quit it first, or pass `--no-register` or `-o`. The previous project list is kept in `~/.raea/capcut/backups` first.
+CapCut rewrites its project list when it quits, so `raea export capcut` refuses to write into CapCut's projects while CapCut is open. Quit it first, or pass `--no-register` or `-o`. The previous project list is kept first in `~/.raea/capcut/backups` (`%LOCALAPPDATA%\raea\capcut\backups` on Windows), never in raea's own folder.
<!-- generated:begin by tools/manual-ref/cli.ts from `raea help --json`; edit only the flag descriptions -->