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

This commit is contained in:
MarekSpodBiedry
2026-10-11 19:13:39 +02:00
parent 67434e9038
commit 55f4d163f8
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;