Quantcast
Channel: Adobe Community : Popular Discussions - After Effects SDK
Viewing all 73444 articles
Browse latest View live

Smart Plugin Memory Leak

$
0
0

Hi

I am just writing my first smart plugin - to date I have just written regular plugins. My first test was pretty simple, it just had a single slider going from 0 to 1, and it filled the whole output with black, white or the appropriate shade of grey.

 

However after scrubbing the slider backwards and forwards a few times everything locked up. Opening task manager (which took some effort) showed that AE had eaten all my memory. Running AE in the debugger I found thatcalling fill consumed about 8 MB of memory and then between returning from my smart render event and the call to free my pre_render_data AE had consumed about another 8 MB of memory. Each move of the slider resulted in another 15 MB or so being consumed and with the breakpoints removed sliding slowly from one end to the other consumed a few hundred MB.

 

I then changed my plugin so that it totally ignored both smart render and smart prerender events. It literally did nothing but return PF_Err_NONE. Still AE racked up memory usage. Still I am getting 10 or 15 MB of memory leakage for each render event.

 

Has anyone ever seen this type of behaviour before? Is there something I need to do in a smart plugin that I haven't needed to do before that might be causing this problem? If needed I can post my sample code. I am using Visual Studio 2012 on Windows 8.1 with AE CC.

 

Phil


How to get frame data(like PF_world) from sequence_data?

$
0
0

hi,everyone,

    I'm a newbie trying to write my first AE plugin as  an effect, porting existing C++ standalone code.

now I import a video to a layer, I just want to know how can I get each frame data of this video,like the format of PF_world?

And I feel so confused that we operate frame with the structure PF_world, so when we use PF_INDATA's member frame_data? And both frame_data and sequence_data defined as PF_Handle, How can I accsee the corresponding memory region?

 

 

Thank you all for your time.

adobe effects cs 6 crashed when the user trys to change key frame position.

$
0
0

hi,all:

     my plugin calls the AEGP_SetItemCurrentTime frequently in the main thread.and the user trys to move the key frame postion in the time panel window at the same time,then the AE crashed,i debuged my plugin,the crash call stack is as below:

>AfterFXLib.dll!0000000000c7d3a9()
AfterFXLib.dll!0000000000c5ad4a()
dvaui.dll!0000000003127e84()
dvaui.dll!0000000003135f6a()
dvaui.dll!0000000002f9ad5e()
dvaui.dll!0000000002f9ceb4()
dvaui.dll!0000000002f98d69()
dvaui.dll!0000000002f99da7()
dvaui.dll!0000000002f9bd63()
AfterFXLib.dll!0000000000cd8974()
dvaui.dll!0000000002f9c41a()
user32.dll!0000000076bb9bd1()
user32.dll!0000000076bb98da()
AfterFXLib.dll!00000000010f1892()
AfterFXLib.dll!0000000000cdb77e()
AfterFXLib.dll!0000000000cdbab8()
AfterFXLib.dll!00000000010f1b76()
AfterFX.exe!00000001400012c9()
AfterFX.exe!00000001400018e9()
AfterFX.exe!0000000140004137()
kernel32.dll!0000000076cb5a4d()
ntdll.dll!0000000076deb831()

 

and prompt a dialog that shows pure virtual function call.

 

is this a bug?

Change parameter name causes crash

$
0
0

I am trying to change the text on a button like this,

 

PF_ParamDef param = *params[ID];

strcpy((char*)u.button_d.u.namesptr, newLabel);

AEGP_SuiteHandler handler(in_data->pica_basicP);

ERR(handler.ParamUtilsSuite3()->PF_UpdateParamUI(in_data->effect_ref, ID, &param));

 

This 'works', but as soon as the project is closed, it causes a crash right after sequence data setdown:

 

Critical error detected c0000374

Exception thrown at 0x00007FFCA7CC47FB (ntdll.dll) in AfterFX.exe: 0xC0000374: A heap has been corrupted (parameters: 0x00007FFCA7D297B0).

Unhandled exception at 0x00007FFCA7CC47FB (ntdll.dll) in AfterFX.exe: 0xC0000374: A heap has been corrupted (parameters: 0x00007FFCA7D297B0).

 

If I disable the button renaming, I don't get the crash. It also doesn't occur when I attempt to rename a topic.

 

Also, if I don't include the \0 in the string, it does not crash (or does not seem to crash, yet), but it does corrupt the text shown on the button.

 

It usually takes a few goes for this to happen.

 

I guess I'm doing something wrong. Is there a better way to do it?

What is Zanzibar trying to say?

$
0
0

I am getting this error.

 

ProcessFromRenderThread ZANZIBAR-1: synchronization integrity correction: database timestamp mismatch: proj=167, sanity=200

 

If I understand correctly, and from other clues, a render thread may have started before the plugin's other processes had finished.

 

Is there a way to ask it to wait?

Unknown debug message in Visual Studio, " Damnit"

$
0
0

Are debugging messages like this coming from AE?

 

<7196> <U_Context> <1> Damnit

sequence_data gateway from popup_dialog to render

$
0
0

Hi everyone.

 

I'm working on a plugin wich use popupdialog in order to call a script UI. The function works fine.

But I try to send some strings results to the Render function. I tried by using sequence_data (based on pathMaster exemple and reduxFX exemple ) but when I look step by step the execution, the sequence_data get the good value in popudialog function but get back to the initial value before render call....

The popupdialog has the outFlag "PF_OutFlag_FORCE_RERENDER".

 

Is there an other way to comunicate between the PopupDialog and the Render ?

 

The code is a bit long with the sequence flattening so so I share the github link :: AE_tl_math/tl_math.cpp at master · crazylafo/AE_tl_math · GitHub

 

thanks for your help.

ColorGrid Sample.

$
0
0

Hi all

I work on the ColorGrid sample, and am interested in the UI component.

I can keep the colors chosen during the DrawEvent process, but I can't find the right list of selected colors during SmartRender. I find only the colors saved by default.

I must emphasize that I have tried several solutions but I block, maybe it is quite simple.

Can anyone tell me how to find the colors that are displayed in the component.

How to change the sample ColorGrid in order to save the new colors, and how to find a list of the colors displayed by the component during SmartRender process

Thank's


GetKeyframeTemporalEase - how to use it & what does it mean?

$
0
0

I am trying to copy/paste keyframes from one parameter to another (types slider, color & points only). To do this, I have a struct with keyframe properties, which I hope to populate/'copy' per keyframe into a vector of keyframes, which I then use to 'paste'. 

 

I am having difficulty understanding AEGP_GetKeyframeTemporalEase, the only guidance on which in the SDK guide is this,

 

Retrieves the AEGP_KeyframeEases associated with the specified dimension of the stream’s value at the time of the keyframe. dimensionL ranges from 0 to (temporal_dimensionality -1).

 

AEGP_GetKeyframeTemporalEase (AEGP_StreamRefH streamH, AEGP_KeyframeIndexkey_index, A_long dimensionL, AEGP_KeyframeEase *in_easeP0, AEGP_KeyframeEase *out_easeP0);

 

NOTE: the returned ease values must be multiplied by layer height to match the values displayed in the After Effects UI.

 

This is somewhat confusing.

 

  • What is 'the specified dimension of the stream’s value', and how is it specified?

 

  • What is dimensionL? The KF streams (slider, color & point) each seem only to have a 'temporal dimensionality' of 1, which leaves a range of 0 to 0.

 

  • How is ease value related to layer height? Is this only a concern for 'displaying' the values (where?), which i do not need to worry about when only copying keyframes from one to another?

 

Finally, is there an easier way of doing this, perhaps by just copying keyframe type/object?

how can I get the pluginID in Effect type plugins?

$
0
0
Hi,

I am craeting Effcet plugin and I want to get the PluginID because I want to execute the script file using AEGP_ExecuteScript() function?.

so Could you please tell me how can I get the pluginID in Effect plugins?

Thanks
Manjunath G

AEGP_FastBlur with EffectWorld?

$
0
0

I'm a bit out of my element here.  I'd like to use the FastBlur that is part of WorldSuite2, but in an effect, not an AEGP.  Is there a way to convert an EffectWorld into an AEGP_WorldH to feed into FastBlur?

Bezier curve conversion between value graph and speed graph

$
0
0

Hello everyone,

 

I have a question about the formula for graph conversion between value graph and speed graph on Graph Editor. Especially, when those graphs are Bezier Curves.

 

On the value graph you can define the Bezier curve by moving the control points oht x and y axises, which position can be gotten as spacial tangent values by the AE SDK. On the other hand, on the speed graph you can define the curve by moving the control points only on x axis and these are defiend by these two values "speed" and "influence". (please refer the defenition of AEGP_KeyframeEase). I guess, the speed graph is differentail of value graph mathematically, and I would like to know how those two bezier curves are converted each other. especially, given two control points on speed graph, how do you get the two control points on value graph?

 

スクリーンショット-2013-12-19-1.21.14.jpg

 

The reason why I am trying to figure out this formula is that there is only Speed Graph for path animation on Graph editor. As you can see below, even if Value Graph is selected the editor shows us Speed graph, which is I guess because the unit of this variation is not a simple unit something like pixel or seconds.

スクリーンショット 2013-12-19 0.53.59.png

 

I know it is not a question about the functions of AE, but more like about mathematics. However, I would really appreciate if someone can shed some light on here or refer me some good website that I can research.

 

Thanks!

Reading XY pixel from another layer

$
0
0

Hi gang;

 

I am still very new to the SDK but making good progress.

 

I have closely studied all the examples included in the CS6 SDK (yes, I am using the older one) and I was looking at the 'Checkout' example to see how to read image data from another layer.

 

However, they seem to use the iteration suite for this.

 

What happens if I want to sample pixels from an xy coordinate and use the PF_Pixel *sampleIntegral32(PF_EffectWorld &def, int x, int y) function as I've been doing?

 

Can someone kindly explain how one might go about this?

 

Thanks to all!

-Rich

AEGP_ExecuteScript crashes AE

$
0
0

Hi All

 

I'm wanting to create a shape layer and am doing it via scripting. I've tested my script works in AE, however when I run it via AEGP_ExecuteScript, I get err 13 and AE crashes. I'm doing the script execution on a text layer, through a button param in UserChangedParam. Any ideas?

 

Here's my code (mostly stolen from these forums):

 

PF_Boolean canScript = false;

ERR(suites.UtilitySuite6()->AEGP_IsScriptingAvailable(&canScript));

if(canScript)
{
    ERR(suites.UtilitySuite6()->AEGP_ExecuteScript(NULL, script.c_str(), true, NULL, NULL));
}

 

Thanks.

Input to output (pixel by pixel) problems

$
0
0

I'm at the start of creating a simple plugin. My aim is to put everything from input to output but pixel by pixel. I'm using a CCU example for that, but this causes problems.

 

Here's my code:

    PF_EffectWorld *inputP = &params[0]->u.ld;

    PF_Pixel8 *inputPix = (PF_Pixel8 *)inputP->data;

    PF_Pixel8 *outPix = (PF_Pixel8 *)output->data;

   

    for (int i=0; i<output->height; i++)

    {

        for (int j=0; j<output->width; j++)   

        {

            *outPix++ = *inputPix++;

        }

    }

 

My original footage looks like this:

01.png

 

And after using my code it looks like this:

02.png

 

After adding the bold line everything works (why do I have to use that line?):

for (int i=0; i<output->height; i++)

    {

        for (int j=0; j<output->width; j++)   

        {

            *outPix++ = *inputPix++;

        }

       

        for(int k=0;k<4;k++) inputPix++;

    }

 

But when I'm trying to use the plugin again on the same footage it looks like this:

03.png

 

Am I missing something? What causes that? When I use the callback funcion everything works fine, but I have to do that using the above way 'cause I have to have access to every pixel of the footage.

Thanks in advance, David


Sequence_data different in PF_Cmd_RENDER and PF_Cmd_USER_CHANGED_PARAM

$
0
0

Hi all!

 

I have a really anoying issue with in_data->sequence_data and After Effects CC 2015.

I'm storing data in Sequence_data.

The problem is: I don't get the same data in Render and UserChangedParams...

 

The exact same code works fine with After Effects CS5.5. First, I thought it might be because of the new flattening calls, but I have the same issue even when I first apply my FX and change one parameter value (I don't receive any other call).

 

Did anyone run into a similar issue? Any solution?

 

Cheers,

François

Extending Extendscript with C

$
0
0

I need to expose some C code to ExtendScript and I'm stuck.

 

The After Effects Scripting Guide doesn't say much about that topic, but the JavaScript Tools Guide does (both are downloadable from the After Effects Developer Center). The latter isn't specific to After Effects.

 

So it's no surprise that symbols referred to by that latter document such as kTypeInteger or TaggedData are not defined in a header belonging to the After Effects SDK.

 

I would suspect there to be another SDK, an ExtendScript SDK - but I can't find it. (EDIT: The second document indeed refers to an "Adobe ExtendScript SDK", but where is it!?)

 

Does somebody know?

 

My ultimate goal is to enable functionality for After Effects scripts that can't be done with scripting alone - such as accessing the clipboard and other things.

After Effect SDK: Update layer Mask

$
0
0

Hi,

 

Is there a way to update layer's mask via SDK functions/suites?

 

 

Best regards,

Yuri

What exactly should we put in the Render function?

$
0
0

Should we put the plugin's main functionality in the two 8bit and 16bit functions, and pass them to the render function, or should we add functionality to the Render function as well? If so, what sort of functionality goes into the Render function, and what sort of functionality goes into the xbit functions? Thanks for your response.

After Effects error:could not convert Unicode characters. (23:46)

$
0
0

Hey guys,

     I'm trying to change the output path for a render queue item.

     But I always get this error "After Effects error:could not convert Unicode characters. (23:46)".

     Here's my code

    

     A_char outPath[256] = "D:/test.mp4";

     ERR(suites.OutputModuleSuite4()->AEGP_SetOutputFilePath(0, 0, outPath));

 

     What I'm doing wrong? Help me please! Thank you very much!!!!!

Viewing all 73444 articles
Browse latest View live


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