"Reading past end of file" Trying to apply Preset from Script


i'm creating first ae script , have run small problem. wish apply preset layer keep getting error/warning message pop-up "after effects warning: reading pas end of file". wantto apply preset gaussian blur although i've tested toehr presets , still same result. bandicam 2016-08-31 04-56-20-772.png

this message. can click 'ok' , preset still applies though quite annoying warning pops every single time want apply preset.

 

var gaussianblur = new file('f:\\amvs\\adobe after effects cs6\\support files\\plug-ins\\effects\\gaussian_blur.aex');

function blurbg(){

    var layerscale = null;

        for( var i=1; <= pcomp.numlayers; i++){

           += 1;

           layerscale = pcomp.layer(i).scale.value;

           layerscale[1] = (pcompwidth/pcomp.layer(i).width)*100;

           layerscale[0] = (pcompwidth/pcomp.layer(i).width)*100;

           pcomp.layer(i).scale.setvalue(layerscale);

           pcomp.layer(i).applypreset(gaussianblur);

       }

}

blurbg();

 

a bit of context: import bunch of pictures , create layers of them, duplicate each layer , resize them (behind original) , apply blur effect.

 

is there way fix this?

or in worst case there way actuommatically skip warning(since effect still applies)?

regarding worst case question, have come accross suppressdialogs method altough still know how fix error/warning.



More discussions in After Effects Scripting


adobe

Comments

Popular posts from this blog

Illustrator CS6 Ocurrío un error E/S en el archivo.

Why is os_ViewContainer running?

Animate - problem with duplicating scripts after loop