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

precompose crashes.

$
0
0

Hello,

 

I am trying to precomp the 1st layer of the comp using ExtendScript. I do something like this:

 

var comp = app.project.activeItem.layers.precompose([1], "new precomp", true);
comp.width = newW;
comp.height = newH;


for(var i = 1; i<= comp.numLayers; ++i)
{  comp.layer(i).position.setValue([newW / 2, newH / 2]); // center the layers w.r.t to new comp.
}

 

When I issue this script through the ExtendedScript Toolkit, it goes well. However, when I execute the script programatically in C++ using ExecuteScript(), the precomp is created but AE crashes with the following msg:

AfterFXLib`___lldb_unnamed_symbol1$$AfterFXLib: Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT) 

 

The script is executed when the user clicks on a button, so during the PF_Cmd_USER_CHANGED_PARAM call, could that be the issue ?

I commented out the centering code (lines 6-9) but the crash still occurs.

 

thx !


Viewing all articles
Browse latest Browse all 2143

Trending Articles



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