Merge pull request #895 from MarekSpodBiedry/issue-837

Scripting: text range selectors resolve by match name and limit the animator (#837)

# Conflicts:
#	crates/script/src/tests.rs
This commit is contained in:
Brandon Thomas
2026-10-12 04:20:47 -04:00
3 changed files with 47 additions and 0 deletions
+7
View File
@@ -115,6 +115,13 @@ fn add_animator(s: &mut Session, p: &Value) -> Result<Value> {
if added == 0 && !kinds.is_empty() {
return Err(bad(C, "unknown animator property"));
}
// Like After Effects, a scripted animator has no selectors until the script adds one
// (addProperty("ADBE Text Selector")); a default 0-100% one would select every character.
if kinds.is_empty()
&& let Some(sels) = g.sub_mut("selectors")
{
sels.children.clear();
}
let uid = g.uid;
anims.children.push(g.into());
proj.next_id = next;