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

Reading and writing pixels at X,Y

$
0
0

Hi all;

 

Very new to the SDK but making great progress.

 

I see that using the following function, we can write pixels at a coordinate (as opposed to iterating through every pixel):

 

PF_Pixel *sampleIntegral32(PF_EffectWorld &def, int x, int y){

return (PF_Pixel*)((char*)def.data +

(y * def.rowbytes) +

(x * sizeof(PF_Pixel)));

}

 

And then we call it using:

 

PF_Pixel *myPixel = sampleIntegral32(*output,x,y);

myPixel->red      = 255;

myPixel->green  = 255;

myPixel->blue     = 255;

myPixel->alpha   = 255;

 

But how does one read a pixel at X,Y?

 

Thanks,

-Richard


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?

Can we expect a Vulkan/Metal example in the next iteration of the SDK?

$
0
0

I have no clue how to set up Vulkan for AE, and since Apple doesn't support it anymore, it's something to be desired. So what do you devs think? A Vulkan/Metal sample for 2020?

Multiple effects in a single plugin possible?

$
0
0

howdy-

 

is it possible to build an AE "effect plugin" that acts as a host/shell for another image filter format?  specifically, i'm not sure how to structure the AE plugin such that a single compiled plugin, when loaded by AE, can make an arbitrary number of other effects available.  i'm aware that a single plugin can contain multiple effects- but because the AE plugin would basically be acting as a host/shell for plugins of this third-party format, i don't know at compile-time how many effects the plugin will be making available to AE (this depends on the third-party plugins the user has installed on their system).

 

is this sort of one-compiled-plugin-presents-many-effects-determined-at-runtime arrangement possible with the AE SDK?  i've read through the SDK and looked at the sample projects, and i haven't seen anything that suggests that this is doable (actually, everything i read makes me think that it's probably not possible), but i figured i'd ask in case i'm overlooking something...

 

 

cheers

: : ray

Is there a way for an GP plugin to check if an Effect's parameter is disabled?

$
0
0

Me again!

 

Does anyone know of a way for a GP plugin to check if an applied effect's parameter is disabled?

I've been banging my head on this one for a couple days with no luck.

It looks like this used to be possible via AEGP_GetDynamicStreamFlags  but the SDK docs specifically states that it no longer works as of CS5:

AEGP_DynStreamFlag_DISABLED A read-only flag. Indicates whether the AEGP_StreamRefH is grayed out in the UI. Note that as of CS5, this flag will not be returned if a parameter is disabled. Instead, check PF_PUI_DISABLEDin ui_flags.

 

I can't seem to figure out a way to get access to ui_flags from an GP plugin.  The only time I've seen it available in the SDK sample projects is from within an Effect.

Is there a way to get an instance of ui_flags outside of the effect itself?

 

I also tried using Javascript to do the work, but the call always returns true regardless of the parameter's state:

app.project.item(1).layer(1).property('Effects').property(1).property(1).enabled;

 

 

Any suggestions?

 

thanks!

-Andy

PF_PUI_DISABLED does not disable slider on setup

$
0
0

Newbie question, which I hope have a simpel answer :-)

 

When I setup my slider I cannot disable it by default in ParamsSetup:

 

PF_ADD_FLOAT_SLIDERX( "Custom Aspect Ratio",

1, // min

5, // max

1, // slider min

5, // slider max

1, // default

PF_Precision_HUNDREDTHS,

PF_PUI_DISABLED, //this does nothing, it is still visible

CUSTOM_ASPECT_DISK_ID);

 

The PF_PUI_DISABLED flag does not disable it, while the other parameters do what they are expected to. I can enable/disable it on events in ParamChange:

 

AEGP_SuiteHandler suites(in_data->pica_basicP); //Call helper suites (should this be done outside the if-else?)

//Get selected format

FORMAT format = (FORMAT)(params[FIRST_STRETCHFORMAT]->u.pd.value-1);

PF_ParamDef aspectParam = *(params[FIRST_CUSTOM_ASPECT]);

if(format == FORMAT::CUSTOM)

     aspectParam.ui_flags &= ~PF_PUI_DISABLED;

else

     aspectParam.ui_flags |= PF_PUI_DISABLED;

ERR(suites.ParamUtilsSuite3()->PF_UpdateParamUI(in_data->effect_ref, FIRST_CUSTOM_ASPECT, &aspectParam));

 

I somehow get the feeling, that the disable flag should be set some other way initially rather than in the slider definition.

 

 

Help is greatly appreciated :-)

 

 

 

 

 

Problem with Debugging

$
0
0

Alright, I'm using Visual Studio 2017, and I attach to AE's process. No matter what I do, the breakpoint does not seem to be working. I attach to the process because if I try and launch the debugger, it'll say "plugin.aex is not a valid Win32 application". I don't know why it's trying to open the plugin instead of the application.... I give it the right path, yet it tries to open the plugin. I don't understand. Anyways, when I attach the process, and run the plugin, it doesn't trace the variables, and even if I set the breakpoint on about(), it won't break the process. What's wrong?

How to disable some params when a checkbox is checked?

$
0
0

Hi All,

 

I'm trying to disable a set of parameters in the effect I'm building when another parameter—a checkbox—is checked.  Then, when the checkbox is unchecked, I'd like those same parameters to be enabled.  Is this possible by using AEGP_SetDynamicStreamFlag and AEGP_GetDynamicStreamFlag?  If so, how would I go about doing that?

 

Thanks!


—Arie


Testing plugins in After Effects

$
0
0

Hello gang;

 

Currently, I compile a plugin from VS and it gets output into the Program Files/Adobe/Common/Plug-Ins/CS6/MediaCore/ folder. This is then loaded when I launch After Effects.

 

But I have to relaunch AE everytime I recompile to test it. Is there no easier method than this? Is it not possible to have AE always open, but somehow flush the plugin memory or something along those lines? I cannot recompile and overwrite the plugin in the MediaCore folder as long as AE is open since the file is locked, thereby forcing me to quit, recompile, and restart AE.

 

Thanks,

-Rich

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

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

Update params on first application of effect

$
0
0

Tldr; how can I update my parameters when the plugin is first applied to a layer?

 

Hi. I allocate some global data inside global setup, but because the params haven’t been initiated I can’t do it here. So I do it during update_params_UI.  This is the code I use, but it doesn’t update the parameter for some reason:

 

params[EM_TOPLEFT]->u.td.x_value = FLOAT2FIX(globP->x0);

params[EM_TOPLEFT]->uu.change_flags = PF_ChangeFlag_CHANGED_VALUE;

 

I call that exact same code on a supervised button during PF_Cmd_USER_CHANGED_PARAM and it works so I’m not sure why it’s not working when called from update params UI. I don’t want the users to have to press the button manually each time the effect is applied to a new layer. Thanks!

Parameter groups and Debug to Release

$
0
0

Hello,

 

I have created a plugin and I am facing two issues right now. Firstly, my UI is a bit cluttered. I read all the SDK but couldn't find enough information on how to create Parameter Groups.  Secondly, can anyone tell me how to convert the plugin from Debug to Release in Xcode and on Windows? Also everytime I change the Outflags, AE throws an error saying that theere is a mismatch with PiPL. How is that PiPL number calculated? Is that just a hex number?

 

Thank you very much in advance.

Draft quality input layer

$
0
0

Hi guys,

Im building a plugin using region recognition of flat colors. Then I m building up region list by color and gathering it in clusters.

My problem is when using "Best quality" setting, After Effects generate some kind of anti aliased lines that I really dont want to have in my input (it make the number of region considerably bigger). It seems that this anti aliasing process occurs BEFORE the effect computation.

I would like to get an input layer without  the anti aliased lines (i.e in draft mode).

I can render it with aegp suites but it s really slow. I would love to be able to specify when checking out layers the pixels I want and their quality.

Does anyone know how to do it?

Thanks in advance.

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


AEGP_RegisterListener in AE SDK 2017.1

$
0
0

Hi! I'm using AEGP_RegisterListener (in AEGP_RenderQueueMonitorSuite1) to register callbacks for a render in my AE plugin, but none of the functions I provide are getting called. My goal is to display an update dialog with a progress bar that updates during the render.

 

When searching for solutions, I found mention of "boilerplate" code that people added to get access to the Render Queue Monitor Suite, but I didn't have to do this to be able to call AEGP_RegisterListener. Is that boilerplate still required, and if so, how would I do it in 14.2 SDK?

 

Here's some relevant lines from my code (not the entire functions!):

 

// Structure to provide callback functions. These functions are defined in my code.

const AEGP_RQM_FunctionBlock1 g_renderFunctionBlock =

    { NBAERenderJobStarted,

      NBAERenderJobEnded,

      NBAERenderJobItemStarted,

      NBAERenderJobItemUpdated,

      NBAERenderJobItemEnded,

      NBAERenderJobItemReportLog };

 

err = SUITE_RENDERQUEUEMONITOR->AEGP_RegisterListener(PLUGIN->id(), (AEGP_RQM_Refcon)this, &g_renderFunctionBlock);

 

SUITE_RENDERQUEUE->AEGP_AddCompToRenderQueue(compH, path.c_str());

SUITE_RENDERQUEUE->AEGP_SetRenderQueueState(AEGP_RenderQueueState_RENDERING);

 

err = SUITE_RENDERQUEUEMONITOR->AEGP_DeregisterListener(PLUGIN->id(), (AEGP_RQM_Refcon)this);

 

The composition is rendering correctly. 'err' is 0 after RegisterListener and DeregisterListener. But I put breakpoints and prints in all the callback functions and none of them are hitting or printing.

 

What am I missing? I expected that during the blocking render (AEGP_SetRenderQueueState) the callbacks would execute, and from NBAERenderJobItemUpdated I would be able to increment the dialog's progress bar.

Disabling/Hiding an Arb Param

$
0
0

I have an arbitrary parameter with a custom UI. Depending on the value of another parameter I want to disable or enable it.

 

If I disable it (default) I get an "Unsupported parameter type" error whenever I add the effect, or click back into a comp containing it. Disabling the parameter also hides it rather than greying it out.

 

I've got round it by explicitly hiding it in UpdateParameterUI rather than disabling it, which solves the error problem. However when I unhide it the parameter is collapsed and I can't find a way to automatically expand the twirly.

 

I've tried explicitly turning off the PF_ParamFlag_COLLAPSE_TWIRLY flag, like so after showing the parameter in UpdateParameterUI:

 

if(params[PARAM_CHOICE]->u.pd.value != QPB_CHOICES_NONE) {

    params[PARAM_MY_UI]->flags&= ~PF_ParamFlag_COLLAPSE_TWIRLY;

}

 

...but that doesn't work.

 

Any ideas? I may just have to leave the param showing AND active all the time but I'd rather not do that if at all possible.

 

Thanks!

New GLator

$
0
0

Hi. I'm testing out the new GLator and the plugin it produces is 17mb, or 16.6mb with aggressive optimisation on. I'm guessing this might have something to do with it using glbinding. Is there a way to make the build smaller or should all openGL plugins be this size? Thanks.

CreatePanelHook called twice???!

$
0
0

Hi All,

 

I've noticed very strange behavior of the CreatePanelHook call.

 

 

Right after testing my plugin with AE CC 2015 I encountered into an extremely strange behavior with AE CC 2014.

 

When I open my panel from the menu, the "CreatePanelHook" function called twice. However, if the panel was already open in the previous execution of After Effects, the "CreatePanelHook" called only once.

 

Any ideas why that can happen? How can I avoid that??

 

Best regards,

Yuri

Does anyone successful connection SDK with Cairo? (2D Drawing)

$
0
0

Hey, guys!

 

I create plugin with SDK and OpenGL, but my tasks is modest with 2D graphics. OpenGL is too huge for this.

 

In case with OpenGL I can use this scheme:

1. Create framebuffer object

2. Create OGL Context

3. Set OGL Context in Render macros

4. Draw with OGL

5. Copy data from framebuffer object to world (with memcpy)

6. Destroy framebuffer and switch to AE context


But in case with Cairo I can't use similar scheme. Or don't know how to do it right. Because with Cairo I don't know method like sizeof(GL_RGBA) to do right buffer calculations with memcpy.

 

How can I create connection with Adobe SDK and Cairo (cairographics.org)? Or maybe anyone has solved similar tasks with connection another graphics library?


Thank you!

With warm,

Mike.

Viewing all 73444 articles
Browse latest View live


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