get comp by name
This commit is contained in:
parent
ebdf747494
commit
7bf2c94ef5
1 changed files with 7 additions and 2 deletions
|
@ -1,5 +1,10 @@
|
|||
var comp = app.project.item(2);
|
||||
|
||||
var comp;
|
||||
for (var i = 1; i <= app.project.numItems; i ++) {
|
||||
if ((app.project.item(i) instanceof CompItem) && (app.project.item(i).name === 'intro')) {
|
||||
comp = app.project.item(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
var layer_title = comp.layer('intro_title');
|
||||
var textProp_title = layer_title.property("Source Text");
|
||||
var textDocument_title = textProp_title.value;
|
||||
|
|
Loading…
Add table
Reference in a new issue