[AE脚本]基于文字内容 重命名图层

[AE脚本]基于文字内容 重命名图层

/*-------------------------------------
Select Parents N Children

Version History
1.0.1 [Current version]  -  Aug 16, 2021
    Change file name.

1.0.0  -  Aug 13, 2021
    Initial release
-------------------------------------*/

//______Files Path______
var thisFile = new File(this);
var thisFolderPath = thisFile.path;
//______Build Main Panel______
function buildUI(thisObj){
    if(thisObj instanceof Panel){
        var win = thisObj;
    }else{
        var win = new Window("palette", "Remove Expressions", [0, 0, 116, 236], {resizeable:true})
        win.center();
        win.show();
        tlnf();
    }       
    return win;
}

var win = buildUI(this);
var buttonRect = [0, 0, 100, 30];
var panelButtonSpace = [5, 5, 5, 5];
var buttonSpace = [55, 0, 55, 0];
var buttonA = win.add("Button", panelButtonSpace + buttonRect, "Rename");

function tlnf(){
    app.beginUndoGroup("IS");
    var proj = app.project;
    var comp = proj.activeItem;
    if(comp){
    var selectedLayers = comp.selectedLayers;
    if(selectedLayers.length > 0){
        for(var i = 0 ; i < selectedLayers.length ; i++){
            n = selectedLayers[i].property("Source Text");
            if(selectedLayers[i] instanceof TextLayer){
                selectedLayers[i].name = n.value;
            }
        }
    }
    }
    app.endUndoGroup();
}

buttonA.onClick = function(){
    tlnf();
}

 

给TA充电
共{{data.count}}人
人已充电
AE开发脚本开发

[AE脚本]查找菜单 ID

2021-9-10 13:51:17

AE开发脚本开发

[AE脚本]选择轨道遮罩层

2021-9-10 13:54:57

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
今日签到
搜索