mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-02 06:27:11 -06:00
fix(script): expose After Effects text Path Options matchNames (#815)
This commit is contained in:
@@ -730,3 +730,30 @@ fn import_options_sequence_picks_one_still_or_the_run() {
|
||||
assert_eq!(kind_of(&s, "shot_[0001-0003].png"), FootageKind::Sequence);
|
||||
let _ = std::fs::remove_dir_all(&dir);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn script_text_path_options_expose_after_effects_match_names() {
|
||||
let mut s = session();
|
||||
let r = ok(
|
||||
&mut s,
|
||||
r#"
|
||||
var c = app.project.items.addComp("Text Path", 160, 90, 1, 2, 24);
|
||||
var t = c.layers.addText("On a path");
|
||||
var options = t.property("ADBE Text Properties").property("ADBE Text Path Options");
|
||||
var names = [];
|
||||
for (var i = 1; i <= options.numProperties; i++)
|
||||
names.push(options.property(i).matchName);
|
||||
[names, options.property("ADBE Text Path").matchName,
|
||||
options.property("ADBE Text Perpendicular To Path").matchName]
|
||||
"#,
|
||||
);
|
||||
assert_eq!(
|
||||
r.result,
|
||||
json!([
|
||||
["ADBE Text Path", "ADBE Text Reverse Path", "ADBE Text Perpendicular To Path",
|
||||
"ADBE Text Force Align Path", "ADBE Text First Margin", "ADBE Text Last Margin"],
|
||||
"ADBE Text Path",
|
||||
"ADBE Text Perpendicular To Path"
|
||||
])
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user