Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

Do something after Warp Stabilizer completes Analysis

$
0
0

Hi, there!

 

     I've already searched the forum about how to add Warp Stabilizer and start analyzing in After Effects by scripting, plus how to detect whether the analyzation progress has completed by checking whether the percentage appears in "Auto-scale" property. However, as I checked the analyzation status by a while loop, After Effects gets into the infinite loop and Warp Stabilizer does not run! (the status kept "Initializing"), the code is below:

#target aftereffects
var activeItem = app.project.activeItem;
if (activeItem != null && activeItem instanceof CompItem) {       // only proceeds if one comp is active
var theLayer = activeItem.selectedLayers[0]; // Only proceeds the first layer
var theEffect = theLayer.property("Effects").addProperty("Warp Stabilizer"); // the regular way to add an effect
theLayer.effect(1).property("Detailed Analysis").setValue(0);                    // prompt analysis to start
var effect = theLayer.Effects.property(1);
while(effect.property(11).name == "Auto-scale") {
} // The loop checks the analyzation progress
alert("Stabilization Analysis Finished");
}

     Thanks in advance for any information provided!


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>