Copy link to clipboard
Copied
Bonsoir,
Connaissez vous un moyen de mettre tous les effects settings d'un layer vers essential graphique de manière automatique avec un script ?
Merci
Add_Effects_to_EGP.jsx
(function (thisObj) {
buildUI(thisObj);
function buildUI(thisObj) {
var palette = new Window("palette", "Add Effects to EGP", undefined, {
resizeable: true
});
palette.orientation = "column";
palette.alignChildren = ["center", "top"];
palette.spacing = 10;
palette.margins = 10;
var button1 = palette.add("button");
button1.text = "ADD FX TO EGP";
palette.show();
button1.
...
Copy link to clipboard
Copied
Add_Effects_to_EGP.jsx
(function (thisObj) {
buildUI(thisObj);
function buildUI(thisObj) {
var palette = new Window("palette", "Add Effects to EGP", undefined, {
resizeable: true
});
palette.orientation = "column";
palette.alignChildren = ["center", "top"];
palette.spacing = 10;
palette.margins = 10;
var button1 = palette.add("button");
button1.text = "ADD FX TO EGP";
palette.show();
button1.onClick = function () {
var proj = app.project;
var thisComp = proj.activeItem;
if (thisComp.selectedLayers.length) {
var selectedLayer = thisComp.selectedLayers[0];
app.beginUndoGroup("egp");
addPropstoEGP(selectedLayer, thisComp);
app.endUndoGroup();
} else {
alert('select a layer')
}
}
function addPropstoEGP(layer, thisComp) {
thisComp.openInEssentialGraphics();
app.executeCommand(2012);
for (var i = 1; i <= layer.Effects.numProperties; i++) {
var canAddProp = layer.effect(i).property(1).canAddToMotionGraphicsTemplate(thisComp);
if (canAddProp) {
layer.effect(i).property(1).addToMotionGraphicsTemplateAs(thisComp, layer.effect(i).name);
}
}
thisComp.motionGraphicsTemplateName = thisComp.name;
}
}
})(this);
Copy link to clipboard
Copied
GENIAL ! MERCI BEAUCOUP ! Ca va me faciliter la vie sur une projet, merci Airweb