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

2018 SDK Download


Clash With Another AEGP

$
0
0

I recently had a ticket filed for my new plugin Bang where the user got the following errors when he started AE, just after installing the plugin:

 

After Effects error: internal verification failure, sorry! {Idle Hook already registered for this

plugin} ( 5027 :: 52 )

 

After Effects: AEGP Plugin AEGP Internal: Error initialising qpBangUtil! ( 5027 :: 12 )

 

The first error generated by AE, the second an error returned by my AEGP.

 

The upshot was that he couldn't use Bang as it relies on the IdleHook of the AEGP to intercept a new instance of the plugin, which then adds the remaining module plugins to the layer.

 

It took some investigation, mostly on his part, to discover that there was a conflict with Roybyte's Comp Screenshot plugin, itself an AEGP. When he removed the Comp Screenshot aex from his Plugins folder Bang worked normally with no startup errors.

 

I thought it could stem from us both using the same value in the PiPL (16000), which I didn't think/know to change. However I've tried changing this value (and the subsequent plugins within the PiPL and I still get the errors on startup.


To be clear I'm talking about the following value:

 

// BANG UTILS AEGP

resource 'PiPL' (16000) {

{ /* array properties: 7 elements */

/* [1] */

Kind {

AEGP

},

...

 

AFAIK there is nothing in the documentation about how these numbers should be set, or even if they should be changed.

 

I also thought it could be the AEGP_PluginID value used to register the idle hook amongst other things. It's set to 0L in my code, which seems to be the only value that works (other values, or using the passed aegp_plugin_id from the EntryPoint return the error

 

After Effects error: internal verification failure, sorry! {Plugin ID is invalid}

( 5027 :: 52 )

 

on startup.

 

I'm sure it's something obvious, but I don't know what!

 

Any ideas please?

 

Thanks, Christian

Update parameter UI from another thread

$
0
0

I'm developing a plugin for Premiere Pro that requires pre-processing. The workflow will be somewhat the same to Video Effects -> Distort -> Warp Stabilizer plugin. E.g. I need to pre-process a set/all of the frames before the effect can be applied. My idea is to run a separate thread and to checkout and process all the frames I need. As soon as the process can be long I would like to output the progress the same way like it is done in Warp Stabilizer. To achieve this I call PF_UpdateParamUI within this worker thread to update the name of parameter and control the state of Analyze/Cancel buttons.

While PF_UpdateParamUI  seems to work, but unfortunately the UI of controls are not updated until I drag the slider in timeline so that the plugin gets the PF_Cmd_UPDATE_PARAMS_UI command.

 

Is there anyway I can force refreshing of UI? Is the only way to achieve the task is to have a custom control? But the Warp Stabilizer looks to use standard controls.Probably the entire approach is wrong and there is another better way to request the host for frames?

How to compile .rc file?

$
0
0

Hi everyone.

 

I'm trying to change a version of my plugin in the .r file, but it does not recompile the resource file - the version number stays the same.

 

I tried copying custom build settings from other project to the .r file, but it doesn't seem to work at all. The .rc file stays the same despite the changes in .r file. If I remove the resource file from the project it is not linked, and if I remove it from the project directory, it says that it can't find the file, and does not compile it.

 

Can anyone help me?

Get mouse position during Custom UI Draw event?

$
0
0

I am building a Custom UI for one of my plugin effect.

I want to get the mouse position during the Custom UI Draw event (PF_Event_DRAW), but cannot manage to get it.

 

From what I understand, it seems we can only get the mouse position during the events PF_Event_DRAG, PF_Event_DO_CLICK, and PF_Event_ADJUST_CURSOR.

 

I tried to use PFAppSuite4::PF_GetMouse() too, but this resulted in the error message "After Effects error: internal verification failure, sorry! {PF_GetMouse can only be called during valid events.}".

 

Therefore I want to store the mouse position during PF_Event_ADJUST_CURSOR, and use it later during PF_Event_DRAW.

Where can I store those values in a "clean" way (ensuring there will not be conflicts if two instances of the same effect are running, etc)?

 

Or is there an easier method to get the mouse position during a Custom UI Draw event?

Why would rowbytes be negative and 4 times larger?

$
0
0

When receiving input and output worlds in Premiere (registered with pixel format of PrPixelFormat_BGRA_4444_32f), I keep getting the world that has the rowbytes equal to -30720 (for a typical 1920x1080 clip), while the new worlds, created using:

 

world_suiteP->PF_NewWorld(in_data->effect_ref, output->width, output->height, true, PF_PixelFormat_ARGB128, &moved_in));

 

Has the rowbytes equal to 7680, suggesting an 8-bit world, not 32-bit one. Interestingly, if I use PF_PixelFormat_BGRA32 the rowbytes value is the same.

 

Any thoughts on this discrepancy and suggestions on how to resolve it?

Plugin Cache Problem

$
0
0

Playing with my plugin settings is increasing memory footprint to the skies, easy reaches up to 4-5 GB in a matter of minute.

How can I stop AE from saving cached image for each param change I do?

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

Image Buffer Pixel Array?

$
0
0

I have a little problem which I am unable to figure out. I need the image buffer with only pixels but not any padding. Currently I am using the following code.

 

int num = (int)(output->width*output->

height*sizeof(PF_Pixel8));

 

    unsigned char * data;
    data = new unsigned char[num] ;
                       
    for(int y = 0; y < output->height; y++)
     {

 

        memcpy(&data[y*output->width*sizeof(PF_Pixel8)], (char *)&params[LAYER_INPUT]->u.ld.data+params[LAYER_INPUT]->u.ld.rowbytes*y, output->width*sizeof(PF_Pixel8));
       
}
   

 

To test whether its working or not, I have the following snippet         
    for(int y = 0; y < output->height; y++)
    {

 

        memcpy((char *)output->data+output->rowbytes*y,&data[y*output->width*sizeof(PF_Pixel8)] , output->width*sizeof(PF_Pixel8));
        
     }
   
   
    delete [] data;

 

But, then image is all glitched and jaggy when I test it. What did I do wrong?

Pre-effect full resolution render

$
0
0

Hello everyone,

I m trying to achieve an effect that recognize regions separated by outlines.

For that I need to rerender in full resolution since the outline gets broken when downsampling.

Part of the answer has already been found thanks to Mr Shachar Carmi in a previous post.http://forums.adobe.com/people/shachar%20carmi

http://forums.adobe.com/thread/659547?tstart=90

I can render full resolution and achive downsampling after. this can work...

But...

It gives me a rendering result with ALL effect applied. So the output of my effect will be wrong if my effect is not the last effect applied:

Layer

  Effect E1

  Effect E2

  Effect myeffect

correct output= E1,E2, my effect

 

but if:

Layer

  Effect E1

  Effect myeffect

  Effect E2

  Effect E3

 

Correct output= E1,my effect,E2,  E3

but with full renderingin my effect, I wuold get:

Wrong output= E1,E2, my effect, E2, E3,E2, E3

 

I think they may be some workaround:

1) Whe full rendering, render with full resolution, WITHOUT effect applied. I look for a parameter enabling that in rendering suite... but could not find it...

2) add a dummy layer parameter with the layer itself in. the layer will have no effect applied. I need just then a way to checkout the layer parameter WITHOUT downsampling. I also look fot that kind of option in checkout function, but could not find it....

3) add a layer parameter and ask the user to specify the original layer. Ask the user to NOT apply any effects on that layer. Render the given layer full resolution and downsample it manually.

 

the solution 3 will work for sure (i hope), but it add some setup of the composition I would love to avoid id possible. Does anyone know a way to make solution 1) or 2) work?

 

Thank you in advance.

 

Best Regards

Error on exit: Leaked effect refs

$
0
0

Hello,

I have error message "After Effects: AEGP Plugin    Updater: Leaked effect refs (5027::12)"

when exit AfterEffects with saved project. The error appears only if there are two or more instanses of my effect. One instance is ok.

After effects ends it's work correctly. Except this annoying message.

What does it mean? Does anybody know how to fix it?

dp_info.jpg

Importer and AEGP

$
0
0

Hi!

I have built an importer with Premiere SDK.

When using the importer in After Effects, is it possible to access the AEGP suites?

I have tried but no luck.

 

Thanks

/ce

Possible to call / load an external DLL in GlobalSetup()?

$
0
0

Hi Again

 

So, I'm needing to use a DLL provided to me by a third party.  I need to call a function from it in GlobalSetup().  I've linked the DLL (x64) correctly as Visual Studio is building the .aex just fine.  However, when I go to debug and apply the effect to a solid, for exampe, AE tells me:

 

After Effects error: plugin "testplug.aex" could not be loaded (126).

(48 :: 46)

 

Then, I click 'OK', and when I apply the effect again it gives me the following error:

 

After Effects error: invalid filter

(25 :: 3)

 

From my experience this usually means that After Effects cannot find some kind of DLL, but I might be wrong.   When this error comes up, I do see the following in Visual Studio's debug output:

 

First-chance exception at 0x00007FF8BB0D871C in AfterFX.exe: Microsoft C++ exception: long at memory location 0x000000000083AE78.

First-chance exception at 0x00007FF8BB0D871C in AfterFX.exe: Microsoft C++ exception: long at memory location 0x000000000083AFAC.

First-chance exception at 0x00007FF8BB0D871C in AfterFX.exe: Microsoft C++ exception: long at memory location 0x000000000083B610.

 

I doubt that means anything, but just thought I would share that info in case it does.

 

I've pinned down the problem to the first line of code that calls a function from the third-party DLL.  When I comment out that line, everything is okay, but when I uncomment it, I get the errors above.  So, my question is if there is anything I can further to do debug the DLL issue.  The DLL was just shipped with an SDK, so I don't have access to the source.

 

If there is any insight you all can offer, I would be most appreciative.

 

Thanks and best,
Arie

string.append() crash

$
0
0

Hi!

 

I have a popup parameter representing the effects stack.

I update it during PF_Cmd_UPDATE_PARAMS_UI.

 

I update it with a std::string set to "(none)", then for each effect, I append "|" + the effect's name.

 

It usually works fine but I sometimes get a crash.

I check all possible AE errors with if (err = PF_ABORT(in_data)) {} and return without problems.

But when it comes to appending the std::string, I crash.

 

So here's my question: how can I check if it throws an error when it's not a PF_Err function?

 

I tried this way, but still crashes:

 

try{

  names.append(effect_nameAC);

  }catch( std::bad_alloc& ba){

  err = PF_Err_OUT_OF_MEMORY;//also tried with PF_Err_INVALID_INDEX

  ERR2(suites.StreamSuite4()->AEGP_DisposeStream( stream));

  ERR2(suites.StreamSuite4()->AEGP_DisposeStream( parStream));

  ERR2(suites.EffectSuite3()->AEGP_DisposeEffect( fxH));

  ERR2(suites.EffectSuite3()->AEGP_DisposeEffect( effect_refH));

  return err;

  }

 

Thanx,

François

Identifying a specific effect instance via AEGP_EffectCallGeneric() / PF_Cmd_COMPLETELY_GENERAL

$
0
0

Hi,

 

The objective is to identify and select a certain effect instance among all instanciated effects. I'm using the following code segment to iterate and scan all the effects currently applied:

 

    // Data structure used for identification    typedef struct    {        uint64_t uniqueID;        bool isKeyEffect;    }    t_struct;    ...    AEGP_ItemH itemH2 = 0;    AEGP_CompH compH = 0;    err = suites.ItemSuite8()->AEGP_GetActiveItem(&itemH2);    if(itemH2 == 0)        return err;    err = suites.CompSuite9()->AEGP_GetCompFromItem(itemH2, &compH);    if(compH == 0)        return err;    AEGP_Collection2H collectionH = 0;    AEGP_LayerH layerH = 0;    A_long numLayers = 0;    t_struct key =    {        getEffectID(),        false    };    bool found = false;        if(AEGP_GetCompNumLayers(compH, &numLayers) == PF_Err_NONE)    {        // Scan comp layers        for(A_long i = 0; i<numLayers; i++)        {            suites.LayerSuite7()->AEGP_GetCompLayerByIndex(compH, i, &layerH);                        AEGP_EffectRefH layerEffH;            A_Time t = {};            A_long numEffects;            if(suites.EffectSuite3()->AEGP_GetLayerNumEffects(layerH, &numEffects) == PF_Err_NONE)            {                  // Scan all instanciated effects                for(A_long j = 0; j<numEffects; j++)                {                    suites.EffectSuite3()->AEGP_GetLayerEffectByIndex(0, layerH, j, &layerEffH);                    AEGP_InstalledEffectKey keyH;                    suites.EffectSuite3()->AEGP_GetInstalledKeyFromLayerEffect(layerEffH, &keyH);                    //// This one is the problem: It never triggers any PF_Cmd_COMPLETELY_GENERAL event.                    //// It returns PF_Err_NONE, however.                    err = suites.EffectSuite3()->AEGP_EffectCallGeneric(0, layerEffH, &t, PF_Cmd_COMPLETELY_GENERAL, (void*) &key);                    ////                    if(key.isKeyEffect)                    {                         // Select effect                         ...                         found = true;                    }                    suites.EffectSuite1()->AEGP_DisposeEffect(layerEffH);                                        if(found)                        break;                }            }        }    }

 

getEffectID() returns a unique 64 bits identifier generated when my effect is instanciated.

 

Now in my event handler I try to do the following to identify my "key" instance:

 

     switch(cmd)     {            case PF_Cmd_COMPLETELY_GENERAL:                {                    // Identify effect                      t_struct *ptr = (t_struct*) extra;                    ptr->isKeyEffect = (ptr->uniqueID == getEffectID());                }                break;            ...     }

 

The problem is that on Mac AEGP_EffectCallGeneric() doesn't trigger any PF_Cmd_COMPLETELY_GENERAL event, while it does on Windows. Any hint on what I am doing wrong here?

 

Thanks!

 

Best,

Reimund


Reload plugin after building...

$
0
0

Would like to enquire about "SLICK DEBUGGING TRICKS" in After Effects SDK Guide (in pdf) for AE CS5 (version 10). Perhaps somebody is successful following the steps!?

I see a few problems as follows:

 

1) AE application keeps a file lock on Filter plugins (or plug-ins)

 

even if one could overwrite an effect plugin when AE process is running...

 

2) Purge All (in menu Purge -> All or Ctrl - Alt - key '/' on the numpad) does not reload the plugin; in fact this is being called in the following order:

    PF_Cmd_FRAME_SETUP,
    PF_Cmd_RENDER,
    PF_Cmd_FRAME_SETDOWN,

no request for PF_Cmd_GLOBAL_SETUP or PF_Cmd_GLOBAL_SETDOWN is made. also this thread already mentions it: http://forums.adobe.com/click.jspa?searchID=3907456&objectType=2&objectID=1798812

 

 

3) VS does not allow Edit & Continue or x64, and CS5 seems to be x64 only - how could you make use of this functionality? or documentation does not seem to be updated completely for SDK for CS5?

 

Greetings

 

mike

AEGP communicate with CEP/ScriptUI?

$
0
0

I am building a "Properties Panel" plugin, which would be a panel that displays property info about the selected layer, also enabling the user to adjust these values directly from the panel.

 

I've been reading here in the forums and it seems the recommended method of doing anything with panels is the CEP/ScriptUI route. However, I will need AEGP functionality, so how do I get the AEGP and the CEP/ScriptUI to talk to one another?

 

For example, I will need the AEGP to listen for layer selection events, which is not possible with CEP/ScriptUI. Upon layer selection, the panel should populate with UI elements corresponding to layer properties (much like the Effects Control Panel, but for layer properties).

 

I know AEGPs can execute scripts, but can they can actually pass information back and forth (or even in just one direction)?

 

Any advice at all would be greatly appreciated.

 

Thanks,

Tom

Build with opencv ?

$
0
0

Hi all !

 

Trying to experiment with opencv. it's working fine but I can't succeed to compile it with the static libraries, it's still requiring the dylib files, which is not very useful for distribution. Can't find the answer on the interwebs   (I'm on Mac BTW. Haven't tried on Windows yet)

 

So I'm wondering if anyone here knows how to either:

 

A- Compile a plugin with opencv embeded in it (no need for the opencv dynamic libs)

or

B- How do you properly distribute a plugin that needs external libs ?

 

Thanks !

Gab

Arbitrary Parameter Management and Hi-Definition support

$
0
0

Hey there,

 

I am using the AE/PPRO SDKs for custom filter development and I am facing the following issues:

 

I created a custom UI with highly customized, "self-drawn" slider parameters, using arbitrary data parameters to store their values. That is all working fine - but seems to be incredibly heavy lifting for my machine. Handling the Drag-Event within the custom UI, I check if the drag appears on the slider, set the value of an arbParam and mark:

 

params[ECW_UI_COLOR]->uu.change_flags     |= PF_ChangeFlag_CHANGED_VALUE;

 

-> leading to redrawing of the interface. What seems to be really heavy tho appears to be the arbitrary parameter update, which I don't really understand.

I also checked the ColorGrid example implementation and observed an analogue behaviour, though not as bad because it doesn't have my crazy drag events. ;-)

 

My first question now is:

 

Is there any alternative for me, to store and update temporary/session-like data (like the actual value of my custom slider) other than directly into arbParams? (then I could store only the last slider value on Mouse_Exit into arb for example..)

 

---

 

I am also using the DrawImage function from the SurfaceSuite and don't understand how the HIDPI AND RETINA DISPLAY SUPPORT should work.

 

I am using NewImageFromBuffer and DrawImage to load and position a png onto the surface - which is working nicely - but don't understand the documentation for the Transform function to scale my image down on hi-res screens. My questions are:

 

- What is const DRAWBOT_MatrixF32 * in_matrixP supposed to be / How would it be used and what are the value within the matrix for?

- Documentation says To support HiDPI and Retina Displays, you can use offscreen images that are twice the size, and then use the Transform function to scale the image down in half before drawing it. How would I use the transform function on the image when Transform gets the surface_ref??

 

I think a very simple example would save my life since I've tried almost everything I could imagine..

 

Help would highly be appreciated and please excuse my probably bad explanation, I'm pretty new in this whole After Effects SDK world. ;-)

 

Thanks in advance and greetings from Hamburg, Germany!

 

Marcel

Question regarding Importer

$
0
0

Hi !

 

I'd like to build an Importer so I can import custom files into After Effects. I'll call this plugin ImporterA

This will allow users to place my custom file as a layer in a comp, and reference this layer from a Layer selector in another plugin of mine, which i'll call PluginB.

 

I want PluginB to be able to read the data from the imported ImporterA file, so my question is:

 

When PluginB selects an ImporterA layer, does it:

1- receive the path to the actual file so it can open it and retrive its data, or

2- ImporterA is the one opening the file and passing its content, or part of it, to PluginB ?

 

Ideally, i'd like if option 2 was possible, but in the end, both would work.

In the case of option 2, does ImporterA reads the file content every frame or it gets "cached" once imported and then just passed along when asked ?

 

Also, bonus question: I read Adobe is pushing for Premiere SDK when it comes to building Importers, just want to make sure is it best to use AE's AEGP SDK or Premiere SDK Importer in that case ?

 

Thanks !

Gab

Viewing all 73444 articles
Browse latest View live


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