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

How to set Layer Parameter values?

$
0
0

I've set up a PF_Param_LAYER and everything works fine so far, however, how do I actually set its value from within the sdk? The reason I need to do this is because within my plugin interface I have a button that will create a number of secondary layers for the user, which the plugin will then refer to via layer parameters. However, I don't want the users to have to manually set these after their creation, but rather just preset them with the correct (newly created) layers.

 

Looking at the parameters u.ld variables, I can't really find anything that could be set to something like a layer handle, id or whatever? So the question is: how do you actually set a layer parameter to a specific layer?


Select multiple layers in the PF_Param_LAYER parameter

$
0
0

I'm using the PF_Param_LAYER parameter in an effect plugin. I want to allow the user to select multiple layers in the dropdown. Is this possible?

Trouble with Audio plugin / PF_OutFlag_I_USE_AUDIO when source layer is precomposed

$
0
0

Wondering if anyone knows what is going on here -

 

I have written a plugin that sets PF_OutFlag_I_USE_AUDIO.  Using a layer param to select a source layer, I am successfully able to check out the source layer's audio and process it to create a visual effect based on the audio data.  I use PF_CHECKOUT_LAYER_AUDIO() and  PF_GET_AUDIO_DATA().  As I scrub the playhead or preview frames, my effect runs and renders as expected.

 

However, if the source layer is audio-only, and I precompose it, i run into trouble.  If the precomp contains no visual information that requires rendering, it seems I no longer receive, PF_Cmd_RENDER and my effect does not process.  As I preview frames or scrub the playhead, it does not update.

 

However, if I add a layer to the precomp that contains visual data that requires rendering, my effect in the parent comp does render.  For example, I can add a video footage layer to the precomp, or I can add a solid to the precomp, and put some visual effect on it with keyframes at either end of the timeline that would require frames to be rendered.  Even if I turn off the precomp's video visibility switch (the eyeball) in the parent comp, I get render updates as I should!  But if I turn off the video visibility switch for the added video layer inside the precomp, I do not.

 

This seems like buggy behavior, but when I test a built in audio-processing visual effect, like Generate > Audio Waveform, it works just fine with precomposed audio in a precomp with no video layers.  So that suggests there is something I am doing wrong or a flag I am missing.

 

Any help will be greatly appreciated!

PF_ABORT and PF_Cmd_USER_CHANGED_PARAM

$
0
0

Hi,

 

I'm baking some keyframes during PF_Cmd_USER_CHANGED_PARAM.

When the workArea duration is long, the process can take a while, and I'd like the user to be able to abort the process.

 

I've tried with PF_ABORT and/or PF_PROGRESS, but didn't get any result...

 

here's the bake function:

 

static PF_Err

Bake (

  PF_InData *in_data,

  PF_OutData *out_data,

  PF_ParamDef *params[],

  bool localKey,

  int vIndex)

{

      //BAKE my keys

     return err;

}

 

and how I call it during PF_Cmd_USER_CHANGED_PARAM:

 

err = Bake( in_data, out_data, params, true, vIndex); // I also tried this way ERR(Bake( in_data, out_data, params, true, vIndex));

 

Any idea will be welcome!

 

Cheers,

François

iterate_origin question

$
0
0

I've duplicated the shifter project. I'm in the smartRender function.

I'm getting an error, which... is not even remotely straightforward.

 

on these calls (exactly the same code in the original project), where it says: ShiftImage8, error.

it's  complaining: Use of undeclared identifier 'ShiftImage8'

the identifier is supposed to be a reference to a function, I get that. it's used by the iteration, repeatedly calls "SiftImage8" with new data. I get that.

the problem is: it. does. not. compile. Gives an error.  and there. is. no. indication. of. the. issue.

 

ERR(suites.Iterate8Suite1()->iterate_origin( in_data,

                                             0,

                                             output_worldP->height,

                                             input_worldP,

                                             &output_worldP->extent_hint,

                                             &origin,

                                             (void*)(infoP),

                                             ShiftImage8,

                                             output_worldP));

 

the only other information is :

the error points to a file called: AE_macros.h

specifically:

#ifndef ERR

  #define ERR(FUNC) do { if (!err) { err = (FUNC); } } while (0)

#endif

 

 

need help, AE SDK is not very clear on what it's doing.

ECP does not update parameter display names - expected behaviour?

$
0
0

I have what seems to be a bug, in which renamed UI parameters revert to their original names in the ECP.

 

This occurs after the layer to which the plugin is applied is deselected, another layer is selected, and then the plugin layer is again selected.

 

The parameters have the correct names in the Timeline panel, and I can get the correct display names using AEGP_GetStreamName, even when the displayed name in the ECP is wrong. Since this is the case, I can easily set them on each PF_Cmd_UPDATE_PARAMS_UI using AEGP_SetStreamName with their existing display names. But this seems inefficient, and I wonder if I'm doing something else wrong, or this could be expected behaviour, that the plugin is supposed to manage.

What is Zanzibar trying to say?

$
0
0

I am getting this error.

 

ProcessFromRenderThread ZANZIBAR-1: synchronization integrity correction: database timestamp mismatch: proj=167, sanity=200

 

If I understand correctly, and from other clues, a render thread may have started before the plugin's other processes had finished.

 

Is there a way to ask it to wait?

Weird paramdef.u.ad values?

$
0
0

Look at these values:

 

Imgur: The magic of the Internet

 

What's wrong? There's nothing wrong with other parameter values, and there's nothing wrong with the checkout. The angle is 81, but AE gives this weird value. What's wrong?


AEGP_RegisterIdleHook & effect plugin

$
0
0

Is it possible to use AEGP_RegisterIdleHook in an effect plugin?

 

What I would like is some way to ensure that sequence data and the UI are synced, in particular in the case of an undo (i.e. by comparing a hidden parameter with sequence data).

 

All of the examples for AEGP_RegisterIdleHook I have seen seem to be for AEGPs, and are called in EntryPointFunc.

 

I've managed to set up an idle hook function from globalSetup -- it seeming to be a nonsense to set it up in EffectMain. But I can't work out how to do anything with it, i.e. to send in_data->sequenceData or *params[], to compare them. AEGP_RegisterIdleHook doesn't seem to want to let me pass arguments to idelHookfunction(), the creation of which is also quite restrictive. Is there a way around these restrictions?

 

 

Reading Pixels From Other Layers

$
0
0

Hi all;

 

I've been struggling with this and decided to clean up the old thread and outline my steps more clearly. I'm still trying to understand the basic procedure for reading pixel data from other layers, but without using the iteration suite.

 

Let me walk you through what I'm doing.

 

First I set up my layer selection controller (and the appropriate vars in the .h file):

 

AEFX_CLR_STRUCT(def);

PF_ADD_LAYER("Source", 0, SOURCE);

 

Then in my render function I check out the layer using the following:

 

PF_ParamDef check;

AEFX_CLR_STRUCT(check);

 

 

ERR(PF_CHECKOUT_PARAM(  in_data,
SOURCE,
in_data->current_time,
in_data->time_step,
in_data->time_scale,

&check));

 

Then supposedly here, I should be able to get the specified layer's pixel info using check.u.ld but this is where I'm stuck. I don't know how to do this. How do I get the red channel, green channel, blue channel and alpha channels? A lot of my confusion stems from the fact that I don't fully understand the logic of effect worlds.

 

And finally, when I'm done all this, I check in the layer:

 

ERR2(PF_CHECKIN_PARAM(in_data,

&check));

 

 

I am not using the iteration suite so I have been using this function listed in the SDK documentation to read and write pixel info in my current layer:

 

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

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

(y * def.rowbytes) +

(x * sizeof(PF_Pixel)));

}

 

Any help so that I can get this working would be highly appreciated and apologies in advance for what I'm sure is a very basic question but I am still learning... go easy on me.

 

Thanks,

-Rich

After effect SDK and PHP

$
0
0

Hello,

 

I'm a newbie in After effect.

I would like to know if it's possible to generate a video with the after effect SDK after sending parameters by a PHP script ?

 

Thank you very much.

Exceptions on Render... Is it me, or AE?

$
0
0

I keep get intermittent, non-fatal exception errors such as the following, always at the same address -- 0x00007FFD19AFA388.

 

Exception thrown at 0x00007FFD19AFA388 in AfterFX.exe: Microsoft C++ exception: int at memory location 0x000000C6B36FBCD8.

Exception thrown at 0x00007FFD19AFA388 in AfterFX.exe: Microsoft C++ exception: int at memory location 0x000000C6B36FD3D4.

 

Though they are non-fatal, after they occur, they somehow prevent AE from drawing interactively, at any resolution.

 

They seem to happen between PF_Cmd_USER_CHANGED_PARAM and PF_Cmd_RENDER. So I've not been able to identify the point in my code that could be causing the problem by writing outputs. And I've not been able to get any sense out of VS's debugger.

 

I must be doing something wrong, but I've run out of hypotheses to test. Can I have done something to cause a problem to emerge between the two calls?

Layer Params in Effects

$
0
0
Hi,<br /><br />I don't (want to) know whether I'm too stupid to understand or it's Visual Studio's fault, but I can't seem to get my effect, which uses two layer parameters, to work. <br /><br />I want to compute my output image by taking the single pixel values for red, green and so on and multiplying them by my own rule (additional factors). <br /><br />My problem is, I don't really know how to start the iterate function and how and where to handle the pixel data from both my chosen layers. At the moment, my code looks like this:<br /><br />AllInfo          ai; //which is a struct containing 2 PF_LayerDefs<br /><br />ai.layerleftLD     = params[2]->u.ld;<br />ai.layerrightLD = params[3]->u.ld;<br /><br />ERR(suites.Iterate8Suite1()->iterate(in_data,<br />           0,<br />           (output->extent_hint.bottom - output->extent_hint.top),<br />           &params[0]->u.ld, //Why can't I just put &params[2]->u.ld here, which is equally a PF_LayerDef?<br />           NULL,<br />           (long)&ai, <br />           MyPixelFunc,<br />           output));<br /><br />In MyPixelFunc, I'm trying to access the two layers (just an example):<br /><br />register AllInfo* aiP = reinterpret_cast<AllInfo*>(refcon);<br />outP->red     = aiP->layerleftLD.data->red;<br /><br />And yes, I DO know this could be terribly wrong. After Effects tells me everytime. I can see myself that the problem is that for example params[2]->u.ld contains no data (width and height are 0). What I don't know is WHY. Please help me, I'm still a newbie...<br /><br />Note: would be nice if one of the samples in the next SDK would USE its layer parameter instead of only showing it in the EW... or haven't I seen this one?

Layer parameter - copy choice

$
0
0

If I had two PF_Param_LAYER parameters and a button, and wanted to copy the choice in the first PF_Param_LAYER to the second when I clicked the button, how could this be done?

 

(I'm not worried about how to make the button work -- I've figured that out.) There seems to be no equivalent to PF_Param_POPUP's 'value' property, to get then set.

 

I've tried rolling my own layer parameter, but I got unstuck when trying to get the pixels from the layer (and some other problems when changing/adding/deleting layers).

How to detect if user selected None in a layer parameter

$
0
0

Sorry if this should be obvious -

 

could anyone advise on what is the proper method to detect whether the user has selected "None" in the dropdown for a layer param of a plugin?

 

thanks


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.

How to Render in AEGP with AE 2015??!!

$
0
0

Hi All,

 

There is a change in AE 2015 where two separate threads where presented: UI thread and Rendering thread.

 

Here is my issue:

 

Let's take a Panelator project as example.

- I've a window with a button.

- The click on this button is recognized as part of an idle hook function

- This idle hook function called within the UI thread.

 

The question is:

  - If I would like to render as a response to "Click Me" button. How can I do it? 

     Whenever the button action performs any lengthy operation the AE hangs.

 

 

Right now, I perform a rendering as a response to the click, but it's not a correct way to work in AE 2015.

 

So, what is the right way to do it in AE?

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 convert after effect plugin to premiere pro plugin?

$
0
0

Hello, everyone!.

 

I hope everyone is well.

I'd like to convert a after effect plugin to premiere plugin. Is it possible and easy?

If so, how can I convert simply it?

 

Thanks.

Igor.

Memory Allocation: PF_HandleSuite1 vs AEGP_MemHandle

$
0
0

Hello, I have just started reading the After Effects SDK Manual and I've noticed that they only spent around a page on the PF_HandleSuite1 (I actually can't find anywhere else where it talks about it). So I want to understand How I am supposed to allocate memory. If for example parameter's value and create and array based on that value, I need to allocate some memory for it; first off should creating it with the new and delete keyword be O.K. (I know after effects doesn't want us to necessarily do this but other than that?).

 

basically what's the difference between the HandleSuite and MemHandle Suite. what should I be using and when?

Viewing all 73444 articles
Browse latest View live


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