From 06ec6cbe538c7377a0a0f7de0324e3aed23a85d1 Mon Sep 17 00:00:00 2001 From: onvia <272493431@qq.com> Date: Tue, 25 Jul 2023 14:08:59 +0800 Subject: [PATCH] =?UTF-8?q?psd=E8=84=9A=E6=9C=AC=E5=A2=9E=E5=8A=A0=20?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E9=A2=84=E8=AE=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ccc-tnt-psd2ui-v2.4.x/PS脚本-图层重命名.jsx | 87 +++++++++++++++++---- ccc-tnt-psd2ui-v3.4.+/PS脚本-图层重命名.jsx | 87 +++++++++++++++++---- 2 files changed, 146 insertions(+), 28 deletions(-) diff --git a/ccc-tnt-psd2ui-v2.4.x/PS脚本-图层重命名.jsx b/ccc-tnt-psd2ui-v2.4.x/PS脚本-图层重命名.jsx index 77a08a3..1b46150 100644 --- a/ccc-tnt-psd2ui-v2.4.x/PS脚本-图层重命名.jsx +++ b/ccc-tnt-psd2ui-v2.4.x/PS脚本-图层重命名.jsx @@ -48,6 +48,37 @@ text:'图层批量重命名 ',\ dropdownlist:DropDownList { alignment:'left', itemSize: [34,16] },\ }, \ }\ + prefabGroup: Panel{orientation: 'column',alignChildren:'top',text: '属性预设',\ + prefab1: Group { orientation: 'row', alignment:'left', \ + btnButton: Button { text:'btn',size:{width:72,height:22}}, \ + btnToggle: Button { text:'toggle'} \ + btnCheck: Button { text:'toggle@check'} \ + }, \ + prefab2: Group { orientation: 'row',alignment:'left', \ + btnPng9: Button { text:'.9',size:{width:60,height:22}} \ + btnProgressBar: Button { text:'progressBar'} \ + btnBar: Button { text:'progressBar@bar'} \ + }, \ + prefab3: Group { orientation: 'row',alignment:'left', \ + btnSize: Button { text:'size'} \ + btnScale: Button { text:'scale'} \ + btnFull: Button { text:'full'} \ + }, \ + prefab4: Group { orientation: 'row', alignment:'left',\ + btnFlip: Button { text:'flip'} \ + btnFlipX: Button { text:'flipX'} \ + btnFlipY: Button { text:'flipY'} \ + }, \ + prefab5: Group { orientation: 'row',alignment:'left', \ + btnIgnore: Button { text:'ignore'} \ + btnIgnoreImg: Button { text:'ignoreimg'} \ + btnIgnoreNode: Button { text:'ignorenode'} \ + }, \ + prefab6: Group { orientation: 'row', alignment:'left',\ + btnImg: Button { text:'img'} \ + btnAR: Button { text:'ar'} \ + }, \ + }\ }, \ repGroup: Group { orientation: 'column',alignChildren:'left',text: '命名规则',\ helpTip: Group{orientation: 'column',alignChildren:'left',\ @@ -110,7 +141,9 @@ text:'图层批量重命名 ',\ }"; - + + var prefabBtns = [['btnButton','@btn'],['btnToggle','@toggle'],['btnCheck','@check'],['btnPng9','@.9{l:0,r:0,b:0,t:0}'],['btnProgressBar','@progressBar'],['btnBar','@bar'],['btnSize','@size{w:100,h:100}'],['btnScale','@scale{x:1,y:1}'],['btnFull','@full'],['btnFlip','@flip{bind: 0, x: 0, y: 0}'],['btnFlipX','@flipX{bind: 0}'],['btnFlipY','@flipY{bind: 0}'],['btnIgnore','@ignore'],['btnIgnoreImg','@ignoreimg'],['btnIgnoreNode','@ignorenode'],['btnImg','@img{name: *,id: 0,bind: 0}'],['btnAR','@ar{x:0.5,y:0.5}']]; + app.bringToFront(); if (documents.length == 0) { alert("没有可处理的文档"); @@ -182,16 +215,36 @@ function initWin(){ win.close(); } win.buttons.btnOK.onClick = function () { + var isSucc = false; if(renameall.visible){ - exeRename(); + isSucc = exeRename(); }else if(add_del.visible){ - exeAdd_Del(); + isSucc = exeAdd_Del(); }else if(repGroup.visible){ - exeReplace(); + isSucc = exeReplace(); } - win.close(); + + isSucc && win.close(); } + + for(var i=0;i