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

Any way to click a button on an effect?

$
0
0

Hi there.

 

I'm trying to figure out a way to simulate a user pressing a button on an effect.  I've seen others asking about this w/o success:

http://forums.creativecow.net/thread/227/23289

http://forums.adobe.com/message/5289079#5289079

 

Seems like this is not possible to do with an script.  I'm wondering if it could be done via a compiled plugin.  I'm no stranger to writing code, but before I jump down the rabbit hole of making a custom ae plugin (AEGP plugin?) I'd like to know if its even possible.  It seems like it might be done via OS specific libraries, but I was hoping I could do it directly with the AE SDK and avoid special case code for each OS.

 

 

Thanks in advance for your help!

-Andy


Showing and Hiding Param Groups (Topics) Problem

$
0
0

My rather complex scopes plugin has quite a few parameters, which I've grouped using topics to keep things neat. The user can choose which scopes to turn on-or-off using a checkbox for each. Turning a checkbox on shows the group of parameters; turning it off hides the group of parameters. I use code like this in a function called from PF_Cmd_USER_CHANGED_PARAM andPF_Cmd_UPDATE_PARAMS_UI:

 

AEGP_StreamRefH                    wfm_streamH                              = NULL;

A_Boolean                              hide_wfmB                              = !params[QPGA_SCOPE_OPTION_WFM]->u.bd.value;     // Set hide_wfmB to the inverse of the checkbox value

AEGP_EffectRefH                    meH                                                  = NULL;

AEGP_SuiteHandler          suites(in_data->pica_basicP);

 

ERR(suites.PFInterfaceSuite1()->AEGP_GetNewEffectForEffect(NULL, in_data->effect_ref, &meH));

 

// Example - Waveform monitor only, but in the code for real there's one of these for each of the five scope groups

ERR(suites.StreamSuite2()->AEGP_GetNewEffectStreamByIndex(NULL, meH, QPGA_WFM_TOPIC_START,           &wfm_streamH));

// etc...

 

// Toggle visibility of parameters

ERR(suites.DynamicStreamSuite2()->AEGP_SetDynamicStreamFlag(wfm_streamH, AEGP_DynStreamFlag_HIDDEN, FALSE, hide_wfmB));

// etc...

 

if (meH){

                    ERR2(suites.EffectSuite2()->AEGP_DisposeEffect(meH));

}

if (wfm_streamH){

                    ERR2(suites.StreamSuite2()->AEGP_DisposeStream(wfm_streamH));

}

// etc...

 

This works fine whenever the checkbox is toggled, however the problem arises if I save my effect instance as an effect preset. When I apply the preset to a new layer, for example, I get all of the parameters in the hidden groups showing up minus their group topics, when they should be hidden away. These two images show what the controls should look like, and what they do look like:

Desired result:

qpga_params_correct.jpg

 

Actual result if applying via an effect preset:

qpga_params_incorrect.jpg

The params between the red lines are those from the other four groups that shouldn't be displayed.

 

I hope this makes sense. My hunch is that I need to turn on-or-off *every* parameter within a group. This will require a lot of stream ref handles though and seems a bit inelegant/inefficient!

 

One thing I'm not doing is using sequence data - I did try this as it was part of the example project (Supervisor, I think), but it didn't affect the outcome. I figured sequence data was a red herring here anyway.

 

Thanks in advance!

 

Christian

Get a font's file name from the font's postscript name (on Windows)

$
0
0

I am trying to obtain the the font file name when the only information I have is the font's 'postscript' name. (Emphasis: the font's name is postscript and not the font).
For example I have the following postscript name: TimesNewRomanPSMT.
The real name that is saved in the registry is: Times New Roman (TrueType).
Is there any way of obtaining that name from the given postscript name?

 

Currently I am coding this for Windows, but it should be compatible, or at least have alternative code for MacOS

Project files crash after adding new parameters to an effect plugin

$
0
0

Hi There,

 

As I was developing an effect, I built projects to test things out.  Now, however, I added a new parameter to an effect and when I open the projects that contain the old build of the same effect, I get the following three error messages:

 

1.  After Effects warning: effect control conversion required in effect "Test Plugin".  Some effect controls will be reset.  To avoid silently resetting these same effect controsl on all subsequently loaded projects, save this project and then quit & re-launch After Effects. (25 :: 0)

 

2.  After Effects error: missing data in file. (33 :: 4)

 

3.  After Effects warning: your project file is apparently damaged (skipped sections: 3).  Please save using a different name.  (26 :: 0)

 

Why does this happen, and what can I do, if anything, to avoid this from happening.

 

Thanks for your time and help!

 

--Arie

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?

How to change default/dephault value of PF_ParamDefs after PF_Cmd_PARAMS_SETUP?

$
0
0

Hi,

 

I'm using the After Effects SDK with AE Transition Extensions to create transition effects for Premiere Pro.

 

I need a PF_Param_POINT which defaults to the center coordinates of the current sequence. The problem is that PF_Cmd_PARAMS_SETUP is only called once at startup and without any sequence information, so i can't set default/dephault values based on sequence resolution. I tried to change the default values during PF_Cmd_USER_CHANGED_PARAM and also set PF_ParamDef.uu.change_flags to PF_ChangeFlag_CHANGED_VALUE, but it didn't seem be accepted.

 

Am I missing something? Or does somebody know a better solution?

 

Regards,

Philipp

Premiere Pro never sends PF_Cmd_SEQUENCE_SETDOWN when project is closed?

$
0
0

(Posting in AE SDK because the PPro forum said to post questions about here if it's a plugin using the AE SDK).


I'm working on a video filter plugin written with the AE SDK which is supported on both AE and PPro. Testing with PPro CC, Mac OS 10.9.

 

We need to know when our plugin is no longer being used in the GUI. A basic case is, the user chooses New Project and the project that was using our plugin is closed.


AE sends us a PF_Cmd_SEQUENCE_SETDOWN when this happens, but the same plugin in Premiere Pro never sends that. In fact, Premiere Pro never sends any command to our EntryPoint function when the document is closed or a new document is created.

 

Has anyone else seen this, and is there a way to make it work, or (as a workaround) some reliable way to know the state of the plugin usage in Premiere Pro?

 

TIA,

Christopher

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.


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!

Unexpected Match Name Searchecd For in Group (29:0)

$
0
0
I get this error:
Unexpected Match Name Searchecd For in Group (29:0)

when I call this Method:
ERR(suites.StreamSuite2()->AEGP_GetStreamName(streamH, TRUE, stream_nameZ))

that call is in this function:
static A_Err ProcessStream(
AEGP_StreamRefH streamH,
A_char *stream_nameZ)
{
A_Err err = A_Err_NONE;
ERR(suites.StreamSuite2()->AEGP_GetStreamName(streamH, TRUE, stream_nameZ));
}

it is being called from this function

static A_Err recursiveCrawl(...)
{
A_Char stream_nameAC[AEGP_MAX_ITEM_NAME_SIZE] = {'\0'};

/*...*/
ERR(suites.StreamSuite2()->AEGP_GetNewLayerStream(S_my_id, layerH, AEGP_LayerStream_SOURCE_TEXT, &streamH));
ProcessStream(streamH, stream_nameAC, out);

}

Any thoughts? I am running through the whole project and getting all of the text layers and writing them out to XML. So recursiveCrawl has a for loop, it's getting the number of layers, etc etc etc... I have 7 itmes in 3 comps and I can varify that in processStream (I wrote out 7 items to my file) but when I attempt to che the stream name so I can get the value of the text, I get this error:Unexpected Match Name Searchecd For in Group (29:0)

After Effects error:creating resource file on Windows

$
0
0

Hi

 

I have a problem with a set of plugins we are developing. We have about 20 different plugins. But after I apply the 10th plugin, it gives the following error on Windows only (CS6):

 

After Effects error:creating resource file "....aex" ( 3 :: 0 )

 

I can have as many instances of the same plugin but once I have a total of 10 different then this error always comes up

 

One thing that is being enabled in the plugin is this flag:

PF_OutFlag_KEEP_RESOURCE_OPEN

 

Is this the culprit?

 

Thanks in advance

DonJ

Thread Safety Using iterate_generic()

$
0
0

Hello again!

 

I was getting some very weird render results in my plugin when using the release version of the code on Windows. The debug version worked fine, so it was puzzling and difficult to nail down exactly where the problems might be occurring with the release version.

 

It turns out that the problem occurs rendering the scopes using iterate_generic().

 

My refcon has six PF_EffectWorld pointers - one for the sample world, and one each for the five scopes. I call iterate_generic() with n threads, where n = input->height. The function used by iterate_generic() just does row processing, sampling each pixel in the row indicated by the thread ID, and using the values to determine which pixel in each scope world gets drawn, and what colour, etc.

 

Once I ran the function explicitly (i.e. bypassing iterate_generic), adding an outer loop (for the y value) the plugin rendered correctly (and I must add, without too much, if any, decrease in performance which struck me as weird). So, something in my iterate function isn't thread safe. Any tips on writing functions for the iterate suite? The SDK guide states that functions must be re-entrant, which I'm not entirely confident about. Anyone use mutex to prevent multiple writes to the same memory (this invalidates re-entrancy, though, right?)?

 

Worst comes to the worst I'll have to live with the single threaded, inner-outer loop method, for the Windows version at least. But the aparrent lack of performance increase when using iterate_generic() makes me think that something is wrong internally.

 

Thanks,

 

Christian

Hidden knob still shows background image

$
0
0

Hi guys,

angle controls seem to have strange behavior when hidden and when the effect is saved as Fx preset, or simply deleted and then re-created by undoing the deletion.

I tried to reproduce it in as simple a way as possible:

 

- add the following case in the switch of the EntryPointFunc of the example Effect/Paramarama of the SDK:

 

 

case PF_Cmd_UPDATE_PARAMS_UI:          {                    AEGP_SuiteHandler suites(in_data->pica_basicP);                    A_Err err = A_Err_NONE, err2 = A_Err_NONE;                    AEGP_EffectRefH effectH          = NULL;                    ERR(suites.PFInterfaceSuite1()->AEGP_GetNewEffectForEffect(0, in_data->effect_ref, &effectH));                    if (effectH)                    {                              AEGP_StreamRefH streamH          = 0;                              ERR(suites.StreamSuite2()->AEGP_GetNewEffectStreamByIndex(0, effectH, ANGLE_DISK_ID, &streamH));                              if (streamH)                              {                                        ERR(suites.DynamicStreamSuite2()->AEGP_SetDynamicStreamFlag(streamH, AEGP_DynStreamFlag_HIDDEN, FALSE, true));                                        //Release the handle                                        ERR2(suites.StreamSuite2()->AEGP_DisposeStream(streamH));                              }                              ERR2(suites.EffectSuite2()->AEGP_DisposeEffect(effectH));                    }          }          break;

 

- build and apply Paramarama to a solid, the angle control won't be visible:

 

param1.JPG

- then delete the effect

- Undo the operation, I get this:

 

param2.JPG

 

This only seems to happen in this case or when the effect is saved as Animation Preset.

 

Am I doing something wrong in the code that hides the control? I wrote this quickly and it's not the actual code I had issues with, but the same issue occurs so that's the most important. I read another thread on the forum wher controls would re-appear in such situations, but the issue was different and related to parameter groups.

 

Thanks

How to prevent parameter value saving (for a trial/demo plugin)

$
0
0

Hi guys,

I need to make a demo/trial version of a commercial plugin with the requirement that the plugin can be loaded normally and all parameters are accessible, but when the project is saved and later re-loaded, all parameters should reset to their default values. Do you have any approach to this?

I tried modifying the params[] array in SequenceSetup/SequenceResetup, but that did not seem to work.

What is the best function to hook into to do this?

 

Thanks,

Mike

How to collapse a folder in the project bin?

$
0
0

Hi there.

 

I'm trying to figure out how to collapse/expand a folder in the project bin.

I whipped up a AEGP that listens and reports any/all command IDs, but when I collapse/expand the folder, I'm not getting any command ids.

I've noticed there are many events that don't send any sort of command ID.

 

Any ideas, or do you happen to know the command code that I could issue to collapse/expand a folder?

I have not yet investigated if the javascript API offers a means to collapse/expand folders.

Looking at the SDK, a folder is just another AEGP_ItemH.  Is there an attribute on it that I can set to toggle the collapse/expand? I was under the impression that AEGP_ItemH are opaque objects, but I'm still pretty new to this SDK (and well, C programming) so I wasn't sure how to go about inspecting the object.

 

thanks!!

-Andy


How to pass data between CPU-side and GPU-side of an AE Transition Extension Plugin

$
0
0

Hi,

 

I'm developing a Premiere Pro Transition Plugin using the GPU and AE Transition Extensions.

But right now I'm struggling to pass data between the CPU-side of the plugin to the GPU-side (e.g. data allocated and set during PF_Cmd_SEQUENCE_SETUP).

 

In the GPUFilter I tried to use GetProperty( kVideoSegmentProperty_Transition_TransitionOpaqueData ), but always received an suiteError_IDNotValid error.

 

I also tried to call

prSuiteError suiteError = mVideoSegmentSuite->GetNodeProperty(instanceID, kVideoSegmentProperty_Transition_TransitionOpaqueData, &buffer);

directly with instanceID == kVideoSegmentProperty_Transition_RuntimeInstanceID, but received the same error.

 

Then I tried to use the PrSDKOpaqueEffectDataSuite. A call to AcquireOpaqueEffectData() with instanceID seemed to work without error, but I always received a null pointer as the passed OpaqueEffectDataType.

 

I also tried to use an ArbitraryData parameter from the PF_Cmd_PARAMS_SETUP, but the memory pointer i received via GetParam() didn't seem to be valid anyhow.

 

Do you have any idea what I might be doing wrong, or what would be the correct way to pass data?

 

Regards,

Philipp Stelzer

After Effects SDK 6 Skeleton Example Pixel load

$
0
0

Hello,

i'm new here and i'm new with the sdk 6 for AE.

I tryed a lot of code to get all pixel from a frame.

 

I want create a tonemaping plugin. I have a drago tonemapper base on C and i tryed to use the skeleton example from the sdk.

My question is.

 

How can i store all the pixel from a frame?

 

I tryed something like this:

 

scene = (SCENE*) malloc(sizeOf(SCENE)*width*height);

 

scene is a struct with three floats, r g b.

 

This dosen't work for me

 

So and then is saw ATLAS:

http://www.3dcg.net/software/atlas/

 

It's a tonemapping plugin for AE. So i tryed to understand how it works.

Next problem was, that i can not compile the atlas source code without errors.

So i tryed to copy line by line.

 

 

Now i can compile it without a error but AE crashed. And i don't know why.

 

 

Can some body help me?

I need only a fast and easy way to storage the pixel to use it for the drago tonmapping code. I use visual studio.

 

 

Thank's a lot and sorry for my bad english

greetz drewiss

RenderQueueMonitorSuite1

$
0
0

I was looking through the After Effects SDK documentation and saw RenderQueueMonitorSuite1 which looked like what I needed to listen for when a renderqueue is done.

Is the RenderQueueMonitorSuite1 implemented? I tried hooking into the render job ended callback with no success

AEGP_RQM_FunctionBlock1 fb = AEGP_RQM_FunctionBlock1();

fb.AEGP_RQM_RenderJobEnded = [](AEGP_RQM_BasicData *basic_dataP, AEGP_RQM_SessionId jobid) -> A_Err {

    A_Err err = A_Err_NONE;

    trace("Render complete");

    return err;

};

 

suites.RenderQueueMonitorSuite1()->AEGP_RegisterListener(S_my_id, NULL, &fb);

 

I have to mention I added the boilerplate lines

 

 

AEGP_RenderQueueMonitorSuite1 *rg_montior_suite_1P;

 

AEGP_SUITE_ACCESS_BOILERPLATE(RenderQueueMonitorSuite, 1, AEGP_, rg_montior_suite_1P, kAEGPRenderQueueMonitorSuite, kAEGPMemorySuiteVersion1);

 

AEGP_SUITE_ACCESS_BOILERPLATE(RenderQueueMonitorSuite, 1, AEGP_, rg_montior_suite_1P, kAEGPRenderQueueMonitorSuite, kAEGPMemorySuiteVersion1);

 

If it's not implemented, how can I know when a render is finished? Thanks!

i have started to try to write a plug-in,but i am in trouble

$
0
0

After a long time study,i start to write a plug-ins.I try to write the plug in this website [removed by moderator]

But,i am in trouble now.There are many different place ,because this plug was written in 1999.

If someone can correct the code for me,so that i can compare to learn.Or someone has finsh this piug can show me the code to compare mine.

This link is the unfinished plug(in the skeleton)

What tools should I use to create a UI for an AEGP plugin for CS6 on a Mac

$
0
0

I see that for CC the suggested UI tool is HTML5, but what should be used for developing a plugin that must also run in CS6 on a Mac?

Viewing all 73444 articles
Browse latest View live


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