Merge main into M13.14

# Conflicts:
#	crates/engine/src/lib.rs
#	docs/agents.md
This commit is contained in:
Brandon Thomas
2026-10-03 13:13:50 -04:00
32 changed files with 1529 additions and 48 deletions
+12
View File
@@ -307,6 +307,11 @@ pub enum Seg {
/// Parse `transform/position`, `effects/#1/blurriness`, `effects/@57/blurriness`,
/// `contents/rect#2/size`.
/// `@57` (a whole path that is one uid).
fn bare_uid(path: &str) -> Option<Uid> {
path.trim().strip_prefix('@')?.parse().ok()
}
pub fn parse_path(s: &str) -> Vec<Seg> {
s.split(['/', '.'])
.filter(|x| !x.is_empty())
@@ -365,10 +370,17 @@ impl PropGroup {
let i = g.child_index(last)?;
g.children.get_mut(i)
}
/// A property by path; a bare `@uid` finds the property anywhere below this group.
pub fn prop(&self, path: &str) -> Option<&Property> {
if let Some(u) = bare_uid(path) {
return self.find(u);
}
self.node(path)?.as_prop()
}
pub fn prop_mut(&mut self, path: &str) -> Option<&mut Property> {
if let Some(u) = bare_uid(path) {
return self.find_mut(u);
}
match self.node_mut(path)? {
Node::Prop(p) => Some(p),
_ => None,
+5 -2
View File
@@ -1277,10 +1277,12 @@ impl RenderLog {
pub fn log_path(output: &str) -> String {
let p = std::path::Path::new(output);
let stem = p.file_stem().map(|s| s.to_string_lossy().to_string()).unwrap_or_default();
let mut stem: String = stem.replace("_[#####]", "").replace("[#####]", "");
let mut stem = stem;
if let Some(i) = stem.find('#') {
// The run of `#`s, with its brackets when it has them (`[###]`, `[#####]`).
let n = stem[i..].chars().take_while(|c| *c == '#').count();
stem.replace_range(i..i + n, "");
let (a, b) = if stem[..i].ends_with('[') && stem[i + n..].starts_with(']') { (i - 1, i + n + 1) } else { (i, i + n) };
stem.replace_range(a..b, "");
}
let stem = stem.trim_end_matches(['_', '.', ' ']);
let name = format!("{}_RenderLog.txt", if stem.is_empty() { "Render" } else { stem });
@@ -1529,6 +1531,7 @@ mod tests {
assert_eq!(log_path("/out/Main_[#####].png"), "/out/Main_RenderLog.txt");
assert_eq!(log_path("/out/a.mov"), "/out/a_RenderLog.txt");
assert_eq!(log_path("seq###.tif"), "seq_RenderLog.txt");
assert_eq!(log_path("gen/g_[###].png"), "gen/g_RenderLog.txt", "any bracketed run (M13.15)");
}
#[test]