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

Pipltool question

$
0
0

Hi,

I am trying to develop a plugin and I use the CS4 sdk and After Effects CS4 9.00.346 (I know it is old, but the trial version of CS6 did not start, and chatting with the help desk was really painful and unsucessfull)

 

My .r file is taken from the Skeleton example and includes the "AE_EffectVers.h" Header.

The pipltool.exe fails with the following error: "Line #6 Undefined Symbol AEFX_API_SUBVERS, line 6" in AE_EffectVers.h.

This line looks like this:

#define AEFX_API_SUBVERS      ' '

 

Did anyone stumble across this error and can provide a solution, please?


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!

Using Qt in a AEGP plugin. QWidget can't get after effects as parent window

$
0
0

Hey guys,

     I'm trying to use the qt framework to create a user interface for my AEGP plugin. And I'm running into some problems.

     First, I tried to pass the main HWND into a QWidget, but the QWidget can't seem to recognize it as a parent window. My code looks like this,

    

A_Err err = A_Err_NONE;
AEGP_SuiteHandler suites(basicSuiteP);
HWND handle;
ERR(suites.UtilitySuite5()->AEGP_GetMainHWND(&handle));
qt tt(handle);
tt.show();

qt is a child class inherit from QDialog with a custom constructor

qt::qt(HWND hWand) :QDialog()
{  create((WId)hWand);  setModal(true);
}

The qt window did show up, but it can't block user's interaction with after effects' main window. When a QDialog pops up, it will block user's interaction with its parent window until it's closed. But it doesn't seem to work with after effects.

 

And, I'm wondering, is it possible to add a QWidget to after effects' native panel? For now, my qt window is floating as a separate window. can I  just add my qt widgets into a after effects panel so it can dock into after effects' main window?

No rerendring in Smart Effect

$
0
0

I use PreRender - SmartRender in the Effect to support 32-bit depth color, and the effect should process whole image at once. The problem is that AAE asks my Effect to rerender the result every time i do zooming or moving of an image with mouse in AAE.

 

This discourages me because one render takes a lot of time. Please, answer, is there any way to supress rerenders in Smart effect?

 

Thank you.

Issue with applying plugin in non-English version of AE on non-English version of Windows

$
0
0

Hi There,

 

I am encountering an issue related to my plugin and differing language versions of AE.  When I apply my plugin to a layer within a project opened in an English version of AE, everything behaves as expected.  However, when I apply the same plugin, in the same manner, on a non-English version of AE, I get an error message.  I am dealing with this debug process on Windows 8 in Spanish.  Here is the error I am receiving from the the Spanish version of CS6 on Windows8 (Spanish):

 

"After Effects error: no se pudo cargar el plugin "Debug.aex" (126).

 

( 48 :: 46 )

 

That basically says that the plugin could not be applied.  Is there any reason why I might get this error in the Spanish version and not receive it in the English version?  Do I need to setup VS2012 to build in release mode for it to work?  Am I missing something?

 

Thanks,

Arie

User interface for AEGP

$
0
0

Hi,

 

after using Scriptui and Extended Script for a while, I was planning to dive into the SDK now to speed up certain things that feel a bit sluggish using the scripting language. However - and I may be missing the obvious here - I am at a bit of a loss where user interfaces are concerned. How would I go about creating a panel with user inputs (similar to a ScriptUI panel) in combination with an AEGP? Am I right that the only way would be to create the UI using the ExecuteScript command and javascript? If so, how do the two of them communicate with each other? (can I catch events from the ScriptUI?).

 

Thanks

Michael

Tracking mask path vertices?

$
0
0

Hi all

 

I've tried many ways to track vertex coordinates of a path(beign it mask or shape path). And the only solution i've found until now was making scripts, which works well, but is not ideal, since running a script everytime a modification is done on the path is not workflow-friendly, specially when making 2D shape animation, where you are always making tiny adjustments on the path and RAM-previewing it like 10 times in 2 minutes, to feel the flow of the motion.

 

The other way, that was almost perfect for me, was trying to take the vertices data through expressions, but when you get the shape object from the expression, example: thisComp.layer("some-solid").mask("my mask").maskPath.value ...... the value inside after effects becomes an empty [object Object], and in Extendscript Tool, that same object is a [object Shape] with all the information in it. I guess Adobe took off that particular object from expression for perfomance reasons, but i'm not sure.

 

So, i became aware of things like PathDataSuite and PF_PathVertex from the SDK, which is exaclty what i was looking for, but i was wondering how would be the best way to ouput that data through Effects, to be accessible by expressions, and then, inside After Effects, with expressions, i decide what to do with the path data given by the plugin. But, looking at all the other existing plugins, i realized that the only properties that are accessible by expressions, are things like point, rotation, sliders, dropdown menus, etc....

 

My question is: How can i output path data through an Effect's property, reachable by expressions. Could be something similar to "Source Text" property, with a string in array format, like [ verticesArray , inTangentsArray ,outTangentsArray ].

 

Example of 1 segment: [ [ [0,0] , [10,0] ] , [ [-10,-10] , [10,10] ] , [ [10,10] , [-9,0] ] ]

 

And then, on the position property of a null, i could write the expression: effect("My Effect")("Path data")[0][0]; to get the first vertex position data, and then, doesn't matter where i put that vertex, the null will always follow it's position(relatively).

 

Finally, in the SDK i was looking for something like PF_ADD_PARAM that could act as if it was PF_ADD_TEXT If you know what i mean.

 

Any ideas?

 

P.S. if you made it through here, thank you for reading all this.

Guest Register: Who are you, and what do you develop?

$
0
0
It was high time for there to be an Adobe-served forum for After Effects plug-in developers. All current and aspiring AE developers are welcome.

Keep it cordial, play nice with the other kids, and have fun.

I'll start: I'm Bruce Bullis. I've been supporting the AE API since 1998. I create and maintain (among other things) the After Effects SDK, and enjoy serving as midwife for AE plug-ins.

Visual Studio 2010 with After Effects SDK?

$
0
0

The documentation explicitly references Visual Studio 2008 .NET (version 9.0) SP1 for Windows 7 (64).

 

Is Visual Studio 2010 supported as well?

Why doesn't the Skeleton plugin template from the Adobe After Effects CC 2015 Mac SDK appear in After Effects CC 2015?

$
0
0

OS version: OS X Yosemite 10.10.3

Xcode version: 6.4

After Effects version: CC 2015.0.1

 

1. I open the Xcode project file for the Skeleton template

 

Skeleton_step1.png

 

 

2. I navigate to the Issue navigator and perform the recommended changes

 

Skeleton_step2.png

 

 

3. I click back over to the Project navigator and there are no longer any warnings

 

Skeletons_step3.png

 

 

4. I build the project and the build succeeds. I had already updated my build location to: /Library/Application Support/Adobe/Common/Plug-ins/7.0/MediaCore/. A directory called Skeleton-fiokjkceczcbexeqzioqilgkckhb appears at that location.

 

Skeletons_step4.png

 

 

5. I load Adobe After Effects CC 2015 and do a search for the plugin in the Effects & Plugins pane. Nothing!

 

Skeleton_step5.png

 

 

Have I overlooked something? Is there some random glitch? I really need some answers here as I have several plugins to develop as part of a major project, but I cannot even get the Skeleton template plugin to work. Yikes! Any and all help is greatly appreciated.

Looking for an AE plugin developer to help execute an idea for a plugin I have

$
0
0

While working in AE, I noticed in one instance that an expression didn't work as I expected it to do, and the workaround was a bit too complicated to be easily used. I recently got an idea for a simple control-like plugin that would help solving the issue for me and everyone else. Downloaded the SDK, because I have some experience in programming C#, but now I am overwhelmed because a lot of things there goes over my head, also it's in C++, a language I haven't programmed in before.

 

I am hereby looking for plugin developer that can assist me execute the idea. I have not decided the business model for this plugin, but it will either be distributed as freeware or sold for a low price. I do not know if someone has already executed my idea, but since I can't find what I am looking for I want this plugin to be a reality anyway.

 

If you are interested in teaming up and discussing this idea, hit me on saddex136@gmail.com.

Dynamic Memory Allocation For Array of Objects

$
0
0

So I'm reaching my wits-end with this problem, and am hoping someone on here can see what I'm doing wrong.

 

Basically I have a collection class, let's call it Collection. In there I want a dynamic array of my item class, which for the sake of argument we'll call Item. An instance of Collection is then used within Global Data to be used later on.

 

The collection of items is populated by a member function in Collection, from an external text file. There could be any number of items, which is why I want it to be dynamically allocated.

 

In order to make the memory allocation self-sufficient, I'm also storing in Collection a pointer to the SPBasicSuite, a pointer to PF_HandleSuite1 and a PF_Handle for the memory handle.

 

class Item {
private:    int foo;    char bar[32];    Thing things[5]; // Fixed array of Thing class, defined elsewhere
}

class Collection {
private:
    Item *item_array;     // It's this I want to populate    int num_items;    SPBasicSuite *bsuite;    PF_HandleSuite1 *hsP;    PF_Handle memH;
public:    PF_Err AquireHandleSuite(PF_InData *);    void AllocateCollectionMemory();   void LoadFromDefFile(char *path);
}

PF_Err Collection::AquireHandleSuite(PF_InData *in_data) {
    PF_Err  err = PF_Err_NONE;      bsuite = in_data->pica_basicP;       if(bsuite) {        (*bsuite->AcquireSuite)((char*)kPFHandleSuite, kPFHandleSuiteVersion1, (const void**)&hsP);        if(!hsP) {            err = PF_Err_BAD_CALLBACK_PARAM;        }     } else {            err = PF_Err_BAD_CALLBACK_PARAM;     }     return err;
}


void Collection::AllocateCollectionMemory() {
    memH = hsP->host_new_handle(sizeof(Item) * num_items);    void *memP = hsP->host_lock_handle(memH);    // Use placement new to allocate the array    item_array = new(memP) Item[num_items];
}

 

So during Global Setup I'm locking my handle to Global Data:

 

out_data->global_data = suites.HandleSuite1()->host_new_handle(sizeof(GlobalData));
GlobalData *global_dataP = static_cast<GlobalData *>(suites.HandleSuite1()->host_lock_handle(out_data->global_data));

Which all works fine, then I use:

 

ERR(global_dataP->my_collection.AquireHandleSuite(in_data));


to create the pointers to the PICA basic suite and HandleSuite1 (by the way these are used in the destructor to unlock the memory and dispose of the handle).


Then I call:


 

global_dataP->my_collection.LoadFromDefFile(path);

 


to populate the array. First I get num_items and then I call AllocateCollectionMemory() to do the allocation. All seems good. However it's here where things start to go wrong. It seems that the first element in the array of item gets written OK but the second and upward elements don't. There's no crash as it loops through, seemingly populating nothing but I do get strange behaviours later on when I try and access the array, even immediately after I've populated it within the LoadFromDefFile() method (just testing setting and reading an integer value).


The odd thing is, I'm using "placement new" during Smart Render with a different class, declared in the same way (Wotsit *wotsits) to allocate an array and it works fine. It must be something to do with storing the PICA and HandleSuite pointers but how else would you do it? I've also tried:


Collection test_collection;
ERR(test_collection.AquireHandleSuite(in_data));
test_collection.LoadFromDefFile(path);


i.e. not in Global Data to see if that was the problem, but, alas it had exactly the same results.


Thanks!

setting position of point of interest

$
0
0

can't find this in sdk-- "point of interest" doesn't turn up anything useful and skimming through "POI" also gives nothing.

 

i want to add keyframes for my point of interest's position. i don't see position of POI as one of the streams I can get for a keyframe but surely that exists? is it considered a separate layer/object from the camera it's attached to?

 

thanks!

Getting pixel from layer other than parameter layer

$
0
0

i want to get pixels from layer other than my source layer and parameter layers (all layer in my composition)

I read some post here, and i tried to apply the explained method.

My problem is that i get a error:

After Effects Error: zero denominator in ration multiply (17:17)

from the

suites.RenderSuite()->AEGP_RenderAndCheckoutFrame(renderOptions, NULL, NULL, &frameReceipt);

If anyone has any ideas....

 

 

     suites.PFInterfaceSuite()->AEGP_GetEffectLayer(in_data->effect_ref, &currentLayer);
      suites.LayerSuite()->AEGP_GetLayerParentComp(currentLayer, &compPH);
      suites.CompSuite()->AEGP_GetItemFromComp(compPH, &itemPH);
      suites.LayerSuite()->AEGP_GetCompNumLayers(compPH, &nbLayers);
      A_Time currentTime;
      suites.LayerSuite()->AEGP_GetLayerCurrentTime(currentLayer, AEGP_LTimeMode_CompTime, &currentTime);

 

        //stores the layers;
        PF_EffectWorld layersWorld[20];//for test, i m sur there i s less than 20 layers.
        for (int i =0; i<nbLayers; i++){
            //Get the AEGP_LayerH of the Layer you want.
            suites.LayerSuite()->AEGP_GetCompLayerByIndex(compPH, i, &currentLayer);
            suites.LayerSuite()->AEGP_GetLayerName(currentLayer, layerName1, layerName2);
            //Get this layer's AEGP_ItemH.
            suites.LayerSuite()->AEGP_GetLayerSourceItem(currentLayer, &currentLayerItem);
            //Get a new AEGP_RenderOptionsH for this item.
            AEGP_RenderOptionsH renderOptions;
            suites.RenderOptionsSuite()->AEGP_NewFromItem(gpid, currentLayerItem, &renderOptions);
            //Set the RenderOptions' time to current time
            suites.RenderOptionsSuite()->AEGP_SetTime(renderOptions, currentTime);
            //Create a new PF_EffectWorld.
            A_long width, height;
            suites.ItemSuite()->AEGP_GetItemDimensions(currentLayerItem,&width, &height);
            //suites.PFWorldSuite()->new_world(in_data->effect_ref, width, height,PF_NewWorldFlag_NONE, &newWorld);
            //RenderAndCheckoutFrame... GetReceiptWorld...  FillOutPFEffectWorld
            AEGP_FrameReceiptH frameReceipt;
            suites.RenderSuite()->AEGP_RenderAndCheckoutFrame(renderOptions, NULL, NULL, &frameReceipt);
            AEGP_WorldH aegpWorld;
            suites.RenderSuite()->AEGP_GetReceiptWorld(frameReceipt,&aegpWorld);
            suites.AEGPWorldSuite()->AEGP_FillOutPFEffectWorld(aegpWorld, &(layersWorld[i]));
            //check in
            suites.RenderSuite()->AEGP_CheckinFrame(frameReceipt);
            //clean up
            suites.RenderOptionsSuite()->AEGP_Dispose(renderOptions);
        }

Get selected mask

$
0
0

Hi.

 

My plug-in is AEGPs.

There are some masks on a layer, and I'd like to get the mask selected in timeline window.

 

I can get exist masks with below code.

But I don't know which mask is selected.

Please, someone help me!

------------------------------------------------------------------------------------------ ----------------------------

AEGP_LayerH layerH = NULL;
ERR(suites.LayerSuite1()->AEGP_GetActiveLayer(&layerH));

ERR(suites.MaskSuite1()->AEGP_GetLayerNumMasks(layerH, &countMask));
for(int idx = 0; idx < countMask; idx++)
{
    AEGP_MaskRefH maskH = NULL;
    ERR(suites.MaskSuite1()->AEGP_GetLayerMaskByIndex(layerH, idx, &maskH));

}

------------------------------------------------------------------------------------------ ----------------------------

 

Thank you.


Getting 32-bit PF_EffectWorld from within 8-bit Proj

$
0
0

Is it possible to get the 32-bit PF_EffectWorld of a layer param while the output pixel format is not? I'd like to work with a plug that can use 32-bit layers but doesn't necessarily need to be from within a 32-bit project.

 

Thanks

How to get resize callbacks for a dockable plugin window?

$
0
0

Hi All,

          I'm going through Panelator plugin. It comes as a separate window. I want some callback when the window is getting resized or moved. What kind of event I need to register for gtting the callback. Any suggestions will help me a lot.

 

I tried using foillowing method, but I'm not getting the callback. I thought kEventClassWindow is related to window events.

 

static const EventTypeSpec  kDrawEventSpec[] = {kEventClassControl,  kEventControlDraw, kEventClassWindow };
   
OSErr    err = InstallEventHandler (GetControlEventTarget (i_refH),
                                        NewEventHandlerUPP (S_EventHandler),
                                        1,
                                        kDrawEventSpec,
                                        (void *) this,
                                        NULL);

 

Thanks,

Dheeraj.

Drag and drop support in plugin

$
0
0

Hello,

 

I was going through Panelator sample plugin code and saw that they are creating dockable panel using OS Controls. I was just trying to check if i can add code for handling any drag and drop on that panel. So i modified the code in that like this..

 

PanelatorUI_Plat::PanelatorUI_Plat(SPBasicSuite* spbP, AEGP_PanelH panelH,
                            AEGP_PlatformViewRef platformWindowRef,
                            AEGP_PanelFunctions1* outFunctionTable) : PanelatorUI( spbP, panelH, platformWindowRef, outFunctionTable)
{

 

    WindowRef hostWindow;
   
    hostWindow = (WindowRef) HIViewGetWindow(platformWindowRef);
   
    Boolean t = true;
    OSStatus status = SetAutomaticControlDragTrackingEnabledForWindow(hostWindow, t);
    static const EventTypeSpec  kDrawEventSpec[] = {    { kEventClassControl,  kEventControlDraw },
                                                        { kEventClassControl, kEventControlDragEnter },
                                                        { kEventClassControl, kEventControlDragWithin },
                                                        { kEventClassControl, kEventControlDragLeave },
                                                        { kEventClassControl, kEventControlDragReceive }
                                                    };
       OSErr    err = InstallEventHandler (GetControlEventTarget ( i_refH), // 6
                                        NewEventHandlerUPP (S_EventHandler),
                                        5,
                                        kDrawEventSpec,
                                        (void *) this,
                                        NULL);

 

}

 

and in the EventHandler func i'm checking if the eventKind is kEventControlDragEnter. My problem is what ever component i drag on the panel, it is not sending kEventControlDragEnter event to EventHandler func. Can please anyone tell me why it control doesn't come to EventHandler func.

How to use collection suite for selection?

$
0
0

Hi,

    I have created a collection of items I need to select. So what I need to do for selecting the collection which I created?

 

Code :

 

AEGP_Collection2H        collectionH        = NULL;
AEGP_CollectionItemV2    collectionItem;
AEGP_StreamRefH            streamH;

 

ERR(suites.DynamicStreamSuite4()->AEGP_GetNewStreamRefForLayer(S_Plugin_ID, layerH, &streamH));
collectionItem.type                   = AEGP_CollectionItemType_LAYER;
collectionItem.u.layer.layerH    = layerH;
collectionItem.stream_refH      = streamH;


ERR(suites.CollectionSuite2()->AEGP_NewCollection(S_Plugin_ID, &collectionH));
ERR(suites.CollectionSuite2()->AEGP_CollectionPushBack(collectionH, &collectionItem));

 

Any suggestions?

 

Thanks,

Dheeraj

Duration of layers other than effect layer

$
0
0

Hi all,

 

I am using PF_CHECKOUT_PARAM to check out a user selected video layer in my AE effect. The user selects which frame to select using a slider exactly the same way the checkout effect example does in the sdk. What I would like to do is to set the slider range to the duration of the layer being checked out. Can this be done? Just to clarify, I want the duration of the layer being checked out. Not the duration of the layer to which the effect is being applied or the composition duration.

 

I think this may be possible using the various AEGP function suites. However I would like to avoid AEGP stuff to maintain compatibility with premier pro.

 

Thanks in advance,

Damien

Viewing all 73444 articles
Browse latest View live