// by 熊猫
function sseett(ll)
{
try{
//不单独尺寸时
ll.transform.position.setValue([comp.width/2,comp.height/2,0]) //位置
}catch(e){
//单独尺寸时
ll.transform.xPosition.setValue(comp.width/2); //x位置
ll.transform.yPosition.setValue(comp.height/2); //y位置
}
try{
ll.transform.zPosition.setValue(0); //z位置
}catch(e){}//alert (e)}
ll.transform.scale.setValue([100,100,100]) //缩放
try{
//图层3D开关开启时
ll.transform.xRotation.setValue(0); //x旋转
ll.transform.yRotation.setValue(0); //y旋转
ll.transform.zRotation.setValue(0); //z旋转
ll.transform.orientation.setValue([0,0,0]);
}catch(e){
//图层3D开关关闭时
ll.rotation.setValue(0) //旋转
}
}
var comp = app.project.activeItem;
if(comp && comp.selectedLayers.length > 0){
for(var i = 0 ; i < comp.selectedLayers.length ; i++){
var layer = comp.selectedLayers[i];
sseett(layer);
};
}else{
alert('您没有选中图层。');
};
暂无讨论,说说你的看法吧