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

Release configuration in SDK XCode examples

$
0
0

Hello,

 

All XCode projects from SDK examples have only one build configuration - Debug. What is the reason? How to add Release configuration properly? Do we need this configuration or it's ok to use Debug for production plugin? I even didn't find "_DEBUG" preprocessor macro in the Debug configuration properties...

 

 

Thanks!


TextLayer Subscript

$
0
0

Hey Folks.

 

I have a TextLayer with the text "This is a Subscript". Only the word "Subscript" is in subscript. I need to access the Text in this TextLayer and verify that the word is in subscript. I can access the TextLayer and its properties, just not sure how to single out the word "Subscript" and check if the subscript is true. Anyone know how to do this?

PF_Rect, Extent_Hint, Origin Coordinates and Layer Dimension

$
0
0

Hello guys. Can anyone assist me with a bit of explanation about how the PF_Rect and all the dimension variables work in the the after effects SDK. Before I was using on the 8 bit and 16 bit API and didn't need to really understand this. all I knew was there was in_data->width/height and out_data->width/height.

However I have started using the SmartFX API and now I can't get anything on the screen.

 

My preRender function is the same as the SmartyPants example and in my smartRender function all I am attempting to do is use the PF_COPY(or PF_FILL for that matter) macro to fill the output with something(anything). I am using the world suite to check the format of the layer and only applying an effects if its 8bpc just to get some result even on the 8 bpc. No matter what I do the layer with my effects stays black. I've played with the UnionLRect funciton(even using my on custom values).

 

so basically my problem comes with understand what all the parameters are in the in_data and out_data.

OutData has a width,height and origin variables.

InData has a width, height, output_origin_x/y, pre_effect_source_origin_x/y and extent_hint.

output(PF_EffectWorld) has (yet again) origin_x/y and (offcourse) width, height and an extend_hint.

 

Is there something more I should be doing to tell after effects what area I want rendered?

 

In the SmartyPants Example they use this process to get a PF_Rect that is then used on the PF_COPY macro

     src_rect.left = -in_data->output_origin_x;

     src_rect.top = -in_data->output_origin_y;

     src_rect.bottom = src_rect.top + output->height;

     src_rect.right = src_rect.left + output->width;

 

-Why is there a negative sign for in_data->origin_x?

-Why are we initializing src_rect.left using information from in_data but taking src_rect.right from output.

 

this src_rect(PF_RECT) is only used for the PF_COPY macro.

 

For the iterate function things are done differently. these is how the iterate function looks in SmartyPants.

suites.IterateFloatSuite1()->iterate_origin(

     in_data,                   (PF_InData*)

     0,                             (A_long progress_base)         

     output->height,     (A_long progress_final)

     input,                      (PF_EffectWorld*)

     &areaR,                  (PF_Rect*)

     &origin,                  (PF_Point*)

     (void*)(&idp),           (void*)

     InvertPixelFloat,      ("the iterator function")

     output));                  (PF_EffectWorld)

 

-"AreaR" is another PF_Rect that is generated like this.

     areaR.top =

     areaR.left = 0;

     areaR.right = 1;

     areaR.bottom = output->height;

Don't quite understand why the rectangle would be 1 x height instead of width x height. I'm sure it has something to do with the progress_base and progress_final(which is output->height)

 

-"origin" is generated like this.

     origin.h = in_data->output_origin_x;

     origin.v = in_data->output_origin_y;

 

Why is output->origin_x/y not used to initialize the origin variable but instead the in_data->output_origin_x/y that is used in the iterate function? How are they different?

 

I feel like there clear reason why this is structured like this, I'm just not seeing the picture quite clearly right now.

 

 

 

EDIT:

I managed to fix some mistakes and made the iterate function work. So I can manipulate the pixels individually but I'm still confused about the layer dimensions, and PF_Rects.

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

Run a script from AEGP as soon as project is loaded

$
0
0

Hi,

I have a very specific and maybe a little bit weird intention. I want a script to be executed inside aegp plugin as soon as project loaded. I tried registering an idlehook function and placing AEGP_ExecuteScript function into it. But this function get called too early, as soon after effects starts, but before project loads.

I also tried cheating and using this function from Project suite   suites.ProjSuite6()->AEGP_GetNumProjects(&num_projPL) == 1   to check whether a project is loaded or not and then call ExecuteScript function. But it didn't work.

Is there any way to get this job done, maybe  an aegp function which will let know if project has been loaded or not?

 

Thanks!!

GLator copy won't coexist with GLator

$
0
0

After Effects 2018 (plug-in SDK), Visual Studio C++ 2017, Windows 7 (x64)

 

Attempting to make my own GLator versions, I first copied GLator to GLatorExp (changing all occurrences of "GLator" to "GLatorExp", and "successfully" compiled and deployed both original and copy.  Both appear on the Effects menu, and both plug-ins work perfectly.  However when I add either one after adding its "twin" to the workspace, I get "After Effects error: invalid filter (25::3)".  So it appears that I can only run one shader plug-in at a time. Yet I can add several instances of either GLator or its "twin" without issue.  I assume there is an issue with identity.  Yet I renamed the source files and shaders, and edited the names in all of the source files including the .r.   I haven't yet tried any of the other example plug-ins to see whether they suffer a similar issue, but I compiled and loaded all without issue.

What am I missing?

Is it necessary to call PF_CHECKOUT_PARAM() on a layer param?

$
0
0

In non-smartfx I just get the layer via params[MY_LAYER_PARAM]->u.ld; I don't use PF_CHECKOUT_PARAM. Is this bad or is it ok?

 

In smartFX I do the checkout for every param before sending to actually render.

Rendering Sound from an AEGP

$
0
0

I'm using AE 2018 on a Mac. I have an AEGP and I'm trying to render the sound of the active composition. I'm using AEGP_RenderNewItemSoundData of the render suite but it always return a A_Err_GENERIC error when I try to get the samples. i've tried different suites, different comps and different settings but I'm always running into this.

The SDK mentions that there was a bug in 13.5 when calling this method from the UI thread (which I am) but that it's been fixed since. If I'm not mistaken I can't get to the AE render threads from an AEGP so I don't really see another method of rendering sound. Am I missing something? Am I doing something wrong? I'd appreciate any help!


Buffer expansion offset issue

$
0
0

Hi. I'm modifying a textbox plugin and using smartfx. To simplify things I make the output the size of the entire buffer in preRender:

 

UnionLRect(&req.rect, &extra->output->result_rect);

UnionLRect(&req.rect, &extra->output->max_result_rect);

 

This works well, the problem comes if I apply a buffer-expanding effect afterwards such as blur or drop shadow. This offsets the textbox effect for some reason.

 

Correct:

Screenshot 2018-08-23 15.24.52.png

Incorrect as a blur has been applied after the textbox, and has offset it for some reason:

Screenshot 2018-08-23 15.25.01.png

Any ideas for a different method to have the output the size of the comp without this offset issue? Thanks.

Scroll Events in Custom ECW UI

$
0
0

Hello there,

 

I am using the AfterEffects SDK for creating color grading effects, using the custom UI support with DrawBot and the EffectSuite.

 

I am focussing on an intuitive and convenient user experience and would really need the ability to catch the event if the user is scrolling within my custom ecw frame.

Is it possible to extend the exposed events (like click, drag, mouse move) to also expose scroll events (and also enable re-drawing after)

 

Maybe you could give a little forecast on whether this is realistically to be expected within the next releases of the SDKs or I just have to live with it as it is…

I would really highly appreciate if you find some time to answer and look forward to it, since my whole UX depends on this very question.

 

All the best from Hamburg, Germany.

 

Marcel

Plugin cache

$
0
0

Hello all;

 

Like most people here, I am very new to the AE SDK and right now I'm playing with it.

 

I can successfully compile the CS6 example plugins and run them from within AE CS6. I'm working with the skeleton template. But one strange effect that is happening is that each time I adjust my plugin's slider and the preview updates, I get random flickering frames of the previous plugins I've compiled and tested. I know, that doesn't make much sense but it's difficult to explain.

 

It's as if there are old remnants of the previous plugins I've compiled and tested in memory even though I've restarted AE.

 

Flushing the AE cache doesn't help. The only thing that seems to help is to add another effect on top of mine, such as a box blur, and that seems to 'refresh' my plugin and output the correct results, from the latest compile.

 

Does anyone know what is going on?

 

On another note, is there a better way to test the plugins then restarting AE each and every time?

 

Thanks,

-Richard

How to create a AE plugin which converts fps -> milliseconds?

$
0
0

Hi Community,

 

I'm new here and interested in creating a After Effects plugin which displays me fps to milliseconds.

 

Reason:

Reason why I want something like that is because I'm doing a lot UI animation and interactions and constantly get asked by developers in milliseconds. Ideally I'm looking for a plugin which has some script UI panel so I can place it in my AE workplace. I already created an expression version which is a temporary solution but I would prefer to have it as its own panel.

 

Question:

I'm new to creating a After Effects panel and so far I can't find any tutorials how to do it. I know the basics of javascript / and will hack my way around if thats possible but I'm not by any means a developer.

 

Where can I get started and if you have seen something similar even better.

 

Thank a lot in advance,

Heiko

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.

Immediately apply changes to AE from a plugin

$
0
0

Hello,

 

This is probably going to be difficult to explain, but here it goes.

I'm working on a plugin that has it's own UI. I want this UI to be open by a button, stay open and not block any functionality of After Effects. Then, I want to make changes to AE using my plugin's UI. Seems simple enough but...

 

There are a lot of ways to create a non blocking UI, and I decided to do it from the GeneralCallback. This was due to the fact that I need the AeData *aeData in order to make changes to the layer my plugin is working on. I make sure the GenericCallback is called from the IdleHook by using the following code:

A_Time currentTime;

suites.LayerSuite6()->AEGP_GetLayerCurrentTime(activeLayer, AEGP_LTimeMode_LayerTime, &currentTime);

suites.EffectSuite3()->AEGP_EffectCallGeneric(gpid, effectRef, &currentTime, PF_Cmd_COMPLETELY_GENERAL, nullptr);

The problem is that by using this method, changes made by my plugin are only applied when the IdleHook function is called (and consequently GeneralCallback), and this creates a bit of a lag between the the time I change something in the UI and the time it actually get changed in After Effects.

 

My plugin supports events, and I can immediately call a function upon change, but this way I can't actually make any changes to AE because I have no access to a AeData *aeData. Any other methods to change AE simply got discarded probably due to the fact that AE now has different threads for render and UI and those are synchronized periodically and not on demand.

 

So basically, using IdleHook I cannot make changes on demand, where should I create my UI, so I could apply these changes immediately after I change them, much like if an AE parameter it was?

Orientation keyframing

$
0
0

I'm working on an AEGP that needs to combine the keyframes from After Effect's Orientation and Rotation streams together. Examining values returned by the SDK, I'm seeing two strange results:

 

1) DynamicStreamSuite4::AEGP_GetStreamValueDimensionality() tells me the Orientation stream has 1 value dimension. StreamSuite5::AEGP_GetStreamType() tells me the type is 3D Spatial. But every other stream of 3D Spatial type has 3 value dimensions. What's different about Orientation that makes its 3D value count as 1-dimensional?

 

2) When I look at values from KeyframeSuite3::AEGP_GetNewKeyframeSpatialTangents(), each keyframe's tangents (both in & out) has val.three_d with a component (y or z) = 2.121995790471e-314#DEN (which, while not an error looks highly suspicious). Why are these components coming out to denormalized double-precision values?

 

Thanks,

Marc


PlexPanels Error

$
0
0

One of my users has reported a strange bug with my plugin. It's the only report I've had (and since it's a paid plugin I'd expect more of these reports if they occurred) and it's rather a difficult one to diagnose.

 

Basically upon applying my plugin, or loading a project containing it, then selecting the layer AE is displaying the error: 

plex_panels_error.JPG

...then freezing with the beachball and then crashing.

 

The part about selecting the layer above is important, since it's helped narrow the crash down to the UI thread. I'm assuming, since we've run a few tests that it's all to do with the custom UI in a couple of my module effects.

Interestingly this doesn't happen if he uses the plugin in AE CC2014, but does in every version after that. Was that the last version that didn't split the UI/render threads?

 

Also of note is that both his MacBook Pro and Mac Pro are using Nvidia GPUs. Now, my plugin makes no use of the GPU, apart from the custom UI, however that is 100% Drawbot.

 

Has anyone here ever had any experience with this issue? I've no idea what PlexPanels are either (Google reaps little-to-no reward here, and I'm not accessing anything known as PlexPanels in my code). Maybe someone from the Plabt might be able to shed some light on it?

 

I cannot recreate this issue on my own MacBook Air (Intel GPU).

 

Thanks, Christian

 

Here are his hardware/software stats:

MacBook Pro with 16 GB RAM running OSX 10.12.6 and the latest version of Ae CC 2018.

MacPro5,1 running 10.13.5 with a Titan X GPU and 128 GB RAM and the latest Ae CC 2018 (15.1.2)

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.

call CEP from plugin

$
0
0

Hi,

 

I've a double question about the cep thread communication from a plugin, I didn't find answer in previous threads.

 

firstly , is there a solution to embbed some CEP in a plugin ?

 

secondly, I made an experiment using AEGP_ExecuteScript(). the plugin call it when a button is pressed. (in UserchangedParam thread)

 

I tried to use some json inside the script. The json lib is present in cep but not in classical extendscript. And it works. If the json file has an error, the after effect script debuger show  the CEP script with the error. (I don't use external library in script side).

 

but sometimes  I randomly  get a script error  : AE  doesn't know the JSON class functions. It seems in this case that  it  does'n't access to the CEP lib but only the classical extendscript...

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?

Can't load plugins in the MediaCore folder

$
0
0

So, my After Effects is installed in "E:\Adobe\After Effects CS6",so the MediaCore folder's path is "E:\Adobe\Common\Plug-ins\CS6\MediaCore".

I just started to learn the SDK yesterday. When I was playing with the samples in the SDK, I set the output folder to the MediaCore folder, After Effects won't load the plugins in this folder. I have to copy the plugins to the plugin folder in After Effects support files folder.

If I set the output folder to the plugin folder of After Effects, After Effects keeps crash.

What should I do?

I'm using Windows 7 Ultimate sp1 64 bit, After Effects CS6 and Visual Studio 2010 Ultimate.

Viewing all 73444 articles
Browse latest View live


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