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

AEGP_LayerH from a PF_Param_LAYER?

$
0
0

After defining a layer parameter with PF_ADD_LAYER, how do I get a handle to the layer?  It's simple to get this from an expression, but I don't see where to get it from a plugin.

 

Even if I PF_CHECKOUT_PARAM explicitly, there doesn't seem to be any way to get from PF_ParamDef to AEGP_LayerH.

 

If it matters, this is during PF_Cmd_USER_CHANGED_PARAM.  I can get pixel data with PF_CHECKOUT_PARAM, but I need the layer handle to look at markers on the selected layer.  It seems like there the selected layer index should be in paramDef.uu.id, but it's always 0.


How to create an after effects plugin using c++?

$
0
0

I've gotten to the point of downloading the after effects sdk. Although I am still lost and other than here, there are very little places where they give you proper information, if any at all, on how to develop after effects plugins using c++.

Architecture advice for Effect and AEGP communication

$
0
0

Happy monday!

 

In my current plugin project I need to use an "helper" AEGP for tasks my main effect plugin cannot accomplish (delayed tasks via AEGP idle hook, project modifications that will crash if performed inside the Effect logic, etc.)

 

I'm trying to figure out an elegant and robust architecture design for this cross-communication. 

Heres the way I see it:

Effect passes info along to AEGP via custom suite data.

AEGP reads the data at idle, and performs some required task.

The success/fail of this work and the resulting products are communicated back to the Effect via AEGP_EffectCallGeneric.

 

My question is basically surrounding the data/info handoff.  What kind of objects should I be passing back and forth?  Is it considered poor design to simply pass along a pointer to the sequence or custom arb data to the AEGP via the custom suite?  And vice versa when the GP sends EffectCallGeneric to the effect and passes a pointer, it could just be the same pointer that the effect originally sent the AEGP using the custom suite. 


Aside from undo/redo, is there an advantage to using arb parameter data over sequence data for this task?


It seems to me that AEGP plugins are loaded once and only once in the session, so if multiple instances of my effect plugin are used in the project, and they are all calling the AEGP there is the potential for a race condition if the custom suite data is used to pass along information.  Is this an accurate assessment of AEGPs? A simple example of this would be that the custom data suite has a variable that stores which effect plugin is calling the AEGP.  If another instance of the effect starts talking to the AEGP, it would overwrite the suite var telling the AEGP which effect instance is calling it, thereby making the AEGP perform the work of one effect instance but sending the results to different instance.

 

Even if the AEGP is extremely simple and just performs small atomic operations each time the custom suite data tells it to, how do I prevent n+1 Effect instances from colliding when using the AEGP worker?  Am I missing some key part of the Effect->AEGP communication that prevents this race condition situation?


This is the first time I've tried my hand at writing inter-process communication where I have the option to exchange actual in-memory objects. I'm hoping someone with more experience with this sort of problem can give some pointers(hah) or at least a few cautionary words about designs to avoid.

 

Thanks, sorry for such an open ended question, but this is the place to talk to the pros

-Andy

Can sdk do image file validation?

$
0
0

Hi, I'm importing image files from my plugin. Well, sometimes the image maybe broken, but the plugin can import it safely, without any warning. When I try to render my compsition (which has the broken image in it), then after effects pops up a warning to tell me there's a broken image.

So, is there any way to check whether the image is broken before importing it or before rendering it?

Query regarding Adobe After Affects Plugins

$
0
0

We are working on Adobe After affect plugin where plugin should detect missing fonts in the opened After Affect document. Can someone please let us know on the following:

1) Is there any Window event provided by Adobe After Affects SDK, by which plugin detect the opened document.

2) Is there any API in After Affects SDK by which one can get the following information:

                i) Document full path, Fonts used in Document.

                ii) Fonts available in the Adobe After Effect application / application's font manager.

 

Does Adobe Affects SDK allow plugins to be made on that level?

 

Memory management issues

$
0
0

Hi All.I have a question regarding dynamic allocation in the SDK.I write a plugin which uses some code which allocates memory on  a heap with malloc.It crashes right after that.And inspecting the pointers to the AE data which I need to memcpy into that memory I see their are all reset.I have seen different examples where only SDK specific routines are used to allocate/deallocate the memory.Does it mean that C/C++ standard methods to work with memory cannot be used within the plugins?

Correct functions for memory allocation

$
0
0

Hi guys!

Just a quick question about memory handling:

I see that even in the latest SDK, there are different methods/functions used for requesting a block of memory from the host:

For one there is        

    (*in_data->utils->host_new_handle)((SIZE))

also defined in the macro PF_NEW_HANDLE(SIZE)

 

And then there is

    suites.HandleSuite1()->host_new_handle(SIZE);

 

Both methods are used in the examples. Are they basically the same or is one or the other recommended?

 

Thanks!

How to get AEGP_EffectRefH within the custom effect?

$
0
0

Hi,

    I want to get the AEGP_EffectRefH of the custom effect applied. This is what I'm trying to do:

 

In global setup of custom effect:

 

AEGP_GlobalRefcon globalRef    =    NULL;

 

const A_char*        pluginName    =    "ADBE Custom Effect";
   
AEGP_SuiteHandler    suites(in_data->pica_basicP);
   
suites.UtilitySuite5()->AEGP_RegisterWithAEGP(globalRef, pluginName, &S_Plugin_ID );

 

After getting the plugin ID, I do this in a function to get the AEGP_EffectRefH:

 

I call this function when the custom effect is added:

 

void function()

{

     AEGP_EffectRefH        effect_refH        =    NULL;
           
     AEGP_SuiteHandler    suites(in_data->pica_basicP);           
           
     ERR(suites.PFInterfaceSuite1()->AEGP_GetNewEffectForEffect(S_Plugin_ID, in_data->effect_ref, &effect_refH));

}

 

But the effect_refH returned is NULL. AE pops up a dialog saying

 

After Effects error: internal verification failure, sorry! {child not found in parent}

 

(29 :: 0)

 

What am I doing wrong?

 

Thanks,

Dheeraj


.shape4ae Track Data

$
0
0

Hey everyone,

 

Since this is kind of an unusual Question that doesn't fit in any category I'm not sure if this is the right place to post it, but I figured that the SDK Developer Community is the one that can come up with an answer for my problem most probably.

 

I'm a student of Computer Vision and currently working on a Project where I need some tracking data. Since our University has some licenses of Mocha for AE I want to try to import the data from the exported .shape4ae files.

I have currently a hard time figuring out how After Effects handles Transformations. In the .shape4ae File, there are basically two things to be found.

First of all the keyframed data of the shape of the object (e.g. the points for the xspline shape) and secondly and what is more interesting to me the information about how this shape is transformed for every frame.

There are 8 categories of data for every frame:

Translation X, Translation Y, Scale, Rotation, Shear X, Shear Y, Perspective X, Perspective Y

I wonder now how all this data for a single frame can be put in a 3x3 homogenous transformation matrix as can be found here

http://doc.trolltech.com/4.6/qtransform.html

 

It doesn't seem to be straight forward, especially the shearing. For the first frame in the sequence the values are set to perform no transform at all, so:

Translation X = 0

Translation Y = 0

Scale = 1

Rotation = 0

Shear X = 0

Shear Y = 1

Perspective X = 0

Perspective Y = 0

 

The fact that Shear Y is set to 1 makes no sense to me right now. The value should be set to 0 if this would be the value responsible for vertical shearing in a transformation matrix.

I hope that someone here can explain to me how these values are applied to create a transformation frome one point to another in after effects.

If it helps I can post a .shape4ae file in here.

 

Thanks a lot in advance!

After Effects and OpenCV

$
0
0

Hi,

 

I have been trying for days to get OpenCV to work with After Effects.

The code compiles, but this simple line of code (or any other line of OpenCV code) makes the program crash straight away :

 

cv::Mat(rows, cols, CV_8UC4, data);

 

(where rows and cols are integers and data is a void*)

 

The code is in a function and I'm not even calling that function yet.

 

This is the full function:

 

cv::Mat GetMat(int rows, int cols, void * data)

{

     return cv::Mat(rows, cols, CV_8UC4, data);

}

 

Has anyone got an idea?

 

Thanks.

Does Adobe Pixel Bender work with AE CS6/Premiere Pro CS6

$
0
0

Hello All,

 

I want to create a GPU accelerated video processing plugin for After Effects/Premiere.

 

I just came across Adobe "Pixel Bender" here:

 

http://www.adobe.com/devnet/pixelbender.html

 

It seems to Pixel Bender allows you to code for the GPU in a GLSL-like programming language.

 

Can I use Pixel Bender in an After Effects/Premiere Pro CS6 plugin?

 

If not, how do I go about using the GPU in an AE/Premiere plugin?

 

Thank you very much for any Help,

 

                                                                Sumo B.

Migration from base SDK to VS2012 does not build.

$
0
0

So after some battling with Visual Studio 2012 trying to build my custom plugin, I decided to do a fresh download of the SDK and try to build the example projects with VS2012.  None of them build after VS does a "Migration" to 2012.  All of the projects in the solution file fail to build with the same error.  Here is the output from the build process for Paramarama:

 

  Compiling the PiPL  Microsoft (R) C/C++ Optimizing Compiler Version 17.00.60610.1 for x64  Copyright (C) Microsoft Corporation.  All rights reserved.  ParamaramaPiPL.r  Microsoft (R) C/C++ Optimizing Compiler Version 17.00.60610.1 for x64  Copyright (C) Microsoft Corporation.  All rights reserved.  ParamaramaPiPL.rrc  AEGP_SuiteHandler.cpp  Paramarama.cpp  Paramarama_Strings.cpp  Generating Code...  MissingSuiteError.cpp
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(1137,5): warning MSB8012: TargetPath(C:\Dev\Adobe After Effects CS6 Win SDK\Examples\Effect\Paramarama\Win\x64\Debug\Paramarama.dll) does not match the Linker's OutputFile property value (C:\Paramarama.aex). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(1138,5): warning MSB8012: TargetExt(.dll) does not match the Linker's OutputFile property value (.aex). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
LINK : fatal error LNK1104: cannot open file '\Paramarama.aex'

 

So, I checked some of the property pages for the project.  Here are some screenshots:

 

vs2012-aesdk-props-general.png

vs2012-aesdk-props-general-linker.png

 

I'm curious as to why the target extension is set to `.dll`, but the Output File is .aex.  Shouldn't the target extension be .aex?  Also, what should the `Configuration Type` be set to since a .aex file is not necessarily a .dll (although maybe I'm wrong here)?  Is an .aex a .dll? 

 

And one final question:  What does the %(Link.OutputFile) refer to in the error I get upon building.

 

Thanks,
Arie

After Effects + OpenGL

$
0
0

I know that this subject was already touched upon here a couple of years ago but I want to refresh it.

I'm interested in implementing OpenGL in After Effects' plugin. Is is possible yet? If yes - how?

This is my simple example code I would like to use in After Effects plugin:

 

int size = 500;

glColor4f(1, 0, 0, 1);

glBegin(GL_POLYGON);

     glVertex2f(-size, -size);

     glVertex2f(-size, size);

     glVertex2f(size, size);

     glVertex2f(size, -size);

glEnd();

 

Any help would be appreciated.

After Effects returns different frames (different pixel data) for the same current_time when checking out a layer frame

$
0
0

I noticed a strange behavior on part of After Effects: If a plug-in checks out the frame from a layer for a specific current_time, time_scale and time_step using checkout_layer_pixels(), After Effects does not always provide the same frame after you clear the image cache. For some values of current_time, After Effects will then return pixels with an offset of one or more frames. Also I can only reproduce this by using avi and wmv files as video footage. My guess is, that After Effects' underlying frame decoder is not properly seeking through the video stream.

 

Does anyone experience this behavior as well? Is there any workaround? Could it be related to video codecs installed on my system?

 

If you want to reproduce this, you need to write a small effect plug-in that calculates a CRC of the checked out pixel data for each PF_Cmd_SMART_RENDER request and stores it for all frames as  a map of <current_time - CRC> pairs. Then perform the following tests:

  1. Create a composition with a single layer using an .avi file or .wmv file as video footage. For example, the Wildlife.wmv sample video that comes shipped with Windows 7 triggers the frame content mismatch.
  2. Seek through all frames of the layer to calculate and store the CRC values for each frame.
  3. Clear the image cache.
  4. Again, seek through all frames of the layer to calculate CRC values. In this iteration, After Effects will return CRCs that are different from the CRCs calculated in step 2 for an equal current_time. This frame content mismatch does not occur for all frames, usually just for a sub-range. Usually it seems that frame content is shifted by one or more frames. Also if you repeat steps 3 and 4, the sub-range of frame content mismatches will change.

 

Results:

After Effects returns different frame content (different pixel data) for the same current_time when checking out a layer frame.

 

Expected results:

After Effects always returns the same frame content (equal pixel data) for the same current_time when checking out a layer frame.

if any way to make a plugin using codeblocks

$
0
0

if any way to make a plugin using codeblocks?

how can i compile a cpp projects to a aex plugin?


AEGP_GetItemID returns overflowed id value

$
0
0

I try to get item id using AEGP_GetItemID but it leads overflow that I get id's in negative value.
I think AEGP_GetItemID's item_idPL should be 64bit Integer but in AE SDK it defined as A_long (which is 32bit Integer)

How can I solve this problem?

Buffer over run

$
0
0

This is the scenario:

Running on windows 7 64 bit.

using AE CC with SDK CC.

I write a class in c++ which intermittently crashes.

So far I have been able to bypass the error.

But recently the class causes crashes all the time, and i decided to take it head on.

I keep on getting a buffer over run error message.

Here are three variations of the class:

class CompositionRaw {

public:
AEGP_CompH compH;
AEGP_ItemH itemH;
AEGP_LayerH layerH;
/* A whole bunch of methods */
}

 

 

class Composition {
public:
AEGP_CompH compH;
AEGP_ItemH itemH;
AEGP_LayerH layerH;
bool someBool;
/* A whole bunch of methods */
}

 

 

#pragma pack(push)
#pragma pack(1)
class CompositionPacked {
public:
AEGP_CompH compH;
AEGP_ItemH itemH;
AEGP_LayerH layerH;
bool someBool;
/* A whole bunch of methods */
}
#pragma pack(pop)

 

The first variation "CompositionRaw" is impeccable, and causes no crash.

The second variation "Composition" crashes all the time.

I mean if the object instance of the class is a local variable, then as soon as the it is out of scope, I get the crash.

If I allocate memory on the heap using the new operator and then deleting it also causes the same error.

Thirdly, allocating memory using the MemorySuite, and then locking/unlocking and eventually freeing the handle, causes the same error.

Please diregard the fact that everything is public and I could have used a struct. This - I promise you - is not the issue.

So I don't know why, but I tried this on a whim and packed the class with the third option "CompositionPacked"

And this runs impeccably too.

Does anyone know what the problem could be?

malloc in a AEIO plugin

$
0
0

Hi all,

 

I'm a beginner AE developer.

 

Im writing an AEIO plugin,

And I had some introduction to the AE Memory allocation usage:

i.e  either don't use new/malloc at all.. or use the Memory suite to create memory Handles managed by AE.

Is this correct? Is this because malloc is not thread safe ?

 

If so , How can I handle 3rd party mallocs?

i.e , In my AEIO plugin I'm loading a 3rd party library , and It behaves weirdly...

 

And I know that its trying to malloc some memory.

Is there a way to "assist" that 3rd party malloc to not be destroyed ? for example , Can I tell the OS to load the 3rd party atomically?

 

Am I getting whats going here or am I barking up the wrong tree ? :-)

 

Also, Im getting a message : " <BEEp_InitSoundPB> <0> Vid rate ratios min, max: 1, 1 "

 

Thanks!

After Effects error: invalid filter (25::3)

$
0
0

Someone reported this error when using my plug-in on a Mac. It works fine on my Mac and on many others, but reports this error on his system. My globalsetup code gets called and works fine, but AE reports this error.

Any ideas?

What generates a "HardwareBlitpipe Disengaged" error?

$
0
0

Hi Again,

 

So, I think some of my code in the plugin I am developing is causing this error upon quitting AE.  I get an error that reads "HardwareBlitpipe Disengaged".  Has anybody received this error upon quitting AE while developing a plugin?  If I open a project that does NOT contain any layers with my plugin effect applied, I do not get that error upon quitting AE.  However, if I open a project that does have layers with my effect applied, I receive the error upon quitting AE.  Clearly, there is something up with my plugin's code.

 

I've read about some folks in the regular AE forums getting that error because of something related to either their graphics hardware driver, or some plugin they installed.  In my case, I never received the error until I started developing my plugin and testing it in AE6.  So, I sense there is something I'm doing wrong in my code.

 

Any ideas for troubleshooting?  Is there a particular selector AE calls to plugin effects upon closing the project and / or quitting the app?  I'd like to put breakpoints in there, but not sure where to put them.

 

Thank you for your time and help!

 

--Arie

Viewing all 73444 articles
Browse latest View live


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