hi,all,my plugin delete and insert keyframes in a stream,but sometimes it causes "After Effects error: Time argument is out of range.",i checked the time argument carefully and don't find the time is out of range.so what causes this?my plugin need good stability and need to eliminate AE's errors.who knows the reason?any suggestions would be appreciated.
After Effects error: Time argument is out of range. What causes this?
Build plugins with JetBrains CLion
Hi everyone!
Is someone using JetBrains's CLion IDE?
Or that everyone just use Visual Studio?
I try to use CLion, because I have better experience with other JetBrains IDE's. Just need a guidance to start developing with CLion(include headers, build, debug etc.).
P.S. I'm new to plugins and C/C++..
Thanks in advance!
Supersampling
Hey everyone,
I'm trying to implement something like RE:Map and I pretty much have it working close to perfect.
The issue no is that even using 16 bit UV pass edges stay jagged and I'd like to do some supersampling, but I have no clue on what the best way forward is.
The code was clean and readable until I started hacking away at giving supersampling a go. :/
This is the mess I've currently going. (Note this is my first time playing around with the SDK.)
static PF_Err RemapFunc16( void *refcon, A_long xL, A_long yL, PF_Pixel16 *in, PF_Pixel16 *out) { PF_Err err = PF_Err_NONE; double tmp_u, tmp_v; PF_Fixed sample_u, sample_v; RemapInfo *contextP = reinterpret_cast<RemapInfo*>(refcon); if (contextP) { // Define `in_data` (required for PF_SUBPIXEL_SAMPLE) PF_InData *in_data = contextP->in_data; AEGP_SuiteHandler suites(in_data->pica_basicP); if (contextP->supersamplingMode != 1) // Supersampling!? { int ss; if (contextP->supersamplingMode == 2) ss = 2; // 2x Supersampling! else if (contextP->supersamplingMode == 3) ss = 4; // 4x Supersampling! else if (contextP->supersamplingMode == 4) ss = 8; // 8x Supersampling! double divisor = 1 / ((double)ss + 2.0); int half = ss / 2; double src_u, src_v; int totalSamples = ss * ss; double sampleWeight = 1.0 / (double)totalSamples; A_u_short red = 0; A_u_short green = 0; A_u_short blue = 0; A_u_short alpha = 0; A_long xLF = ((A_long)xL << 16); A_long yLF = ((A_long)yL << 16); PF_Fixed sample_src_u, sample_src_v; //PF_Fixed sample_u, sample_v; for (int x = -half; x <= half; x++) { // Get supersampled u source src_u = (double)x * divisor; //src_u += xLF; sample_src_u = xLF + LONG2FIX(src_u); for (int y = -half; y <= half; y++) { // Get supersampled v source src_v = (double)y * divisor; //src_v += yLF; sample_src_v = yLF + LONG2FIX(src_v); // Set source point to `sourceLayer` contextP->samp_pb.src = contextP->sourceLayerData; // Sample src color suites.Sampling16Suite1()->subpixel_sample16(in_data->effect_ref, sample_src_u, sample_src_v, &contextP->samp_pb, out); // Get UV based on Red/Green from input pixel tmp_u = ((double)out->red / (double)PF_MAX_CHAN16); tmp_v = ((double)out->green / (double)PF_MAX_CHAN16); tmp_u *= (double)contextP->textureLayer->u.ld.width; tmp_v *= (double)contextP->textureLayer->u.ld.height; sample_u = LONG2FIX(tmp_u); sample_v = LONG2FIX(tmp_v); // Set source point to `textureLayer` contextP->samp_pb.src = &contextP->textureLayer->u.ld; // Sample from `map` at UV and set `out` pixel. suites.Sampling16Suite1()->subpixel_sample16(in_data->effect_ref, sample_u, sample_v, &contextP->samp_pb, out); /* red += (A_u_short)(out->red * sampleWeight); green += (A_u_short)(out->green * sampleWeight); blue += (A_u_short)(out->blue * sampleWeight); alpha += (A_u_short)(out->alpha * sampleWeight); */ } } //out->red = (A_u_short)red; //out->green = (A_u_short)green; //out->blue = (A_u_short)blue; //out->alpha = (A_u_short)alpha; } else { // No Supersampling! // Get UV based on Red/Green from input pixel tmp_u = ((double)in->red / (double)PF_MAX_CHAN16); tmp_v = ((double)in->green / (double)PF_MAX_CHAN16); tmp_u *= (double)contextP->textureLayer->u.ld.width; tmp_v *= (double)contextP->textureLayer->u.ld.height; sample_u = LONG2FIX(tmp_u); sample_v = LONG2FIX(tmp_v); // Set source point to `textureLayer` contextP->samp_pb.src = &contextP->textureLayer->u.ld; // Sample from `map` at UV and set `out` pixel. suites.Sampling16Suite1()->subpixel_sample16(in_data->effect_ref, sample_u, sample_v, &contextP->samp_pb, out); } if (contextP->preserveAlpha == TRUE) { out->alpha *= (in->alpha / PF_MAX_CHAN16); } } return err; }
Allocating Classes
I'm fiddling with After Effects memory allocation for C++ classes. The AE-SDK Guide recommends to use always After Effects memory functions. Especially when using classes one have to reimplement new and delete operators but there is no example how to do that. Memory allocation functions like host_new_handle() and AEGP_NewMemHandle() return only plain memory that isn't initialized by a constructor.
If anyone has a solution a code snippet would be nice.
Thanks in advance
Parameter (const A_char* inScriptZ) description in AEGP_ExecuteScript( ) function?
The prototype of AEGP_ExecuteScript() is
SPAPI A_Err (*AEGP_ExecuteScript)(AEGP_PluginID inPlugin_id, const A_char* inScriptZ,// in const A_Boolean platform_encodingB, AEGP_MemHandle* outResultPH0, AEGP_MemHandle* outErrorStringPH0);
What is the second parameter "const A_char* inScriptZ" describes?
Is it path of the script file or direct script only?
Thanks
Manjunath
Modal dialog in Premiere Pro (using AE SDK)
Hello all,
I have a plugin that does some long, intensive processing inside a single render call. I show my own progress bar in a modal dialog while this happens.
This is working fine in After Effects, but it's causing a crash in Premiere Pro. I get a few messages through the WndProc but then they just stop coming. I've attached some code below. Does anyone have any idea what might be going on there?
many thanks for any help,
Hugh
Here's the code that creates the dialog:
//assume host window is foregrounded
hostWindow = GetForegroundWindow();
// also tried HWND hwnd; PF_GET_PLATFORM_DATA(PF_PlatData_MAIN_WND, &hwnd);
hDlg = CreateDialog(theDLL, MAKEINTRESOURCE(IDD_PROGRESS), hostWindow, reinterpret_cast<DLGPROC>(DlgProc));
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)this);
CenterDialog();
ShowWindow(hDlg, SW_SHOW); UpdateWindow(hDlg);
SetForegroundWindow(hDlg); BringWindowToTop(hDlg);
hProgress = GetDlgItem(hDlg, IDC_PROGRESS1);
SendMessage(hProgress, PBM_SETRANGE, 0, MAKELPARAM(0, total));
How to get AEGP_EffectRefH within the custom effect?
Hi,
I want to get the AEGP_EffectRefH of the custom effect applied. This is what I'm trying to do:
In global setup of custom effect:
AEGP_GlobalRefcon globalRef = NULL;
const A_char* pluginName = "ADBE Custom Effect";
AEGP_SuiteHandler suites(in_data->pica_basicP);
suites.UtilitySuite5()->AEGP_RegisterWithAEGP(globalRef, pluginName, &S_Plugin_ID );
After getting the plugin ID, I do this in a function to get the AEGP_EffectRefH:
I call this function when the custom effect is added:
void function()
{
AEGP_EffectRefH effect_refH = NULL;
AEGP_SuiteHandler suites(in_data->pica_basicP);
ERR(suites.PFInterfaceSuite1()->AEGP_GetNewEffectForEffect(S_Plugin_ID, in_data->effect_ref, &effect_refH));
}
But the effect_refH returned is NULL. AE pops up a dialog saying
After Effects error: internal verification failure, sorry! {child not found in parent}
(29 :: 0)
What am I doing wrong?
Thanks,
Dheeraj
After Effects error : layer does not have a source.
Hi All,
I add a Text layer and then add my custom fill effect to it. Then I call AdvItemSuite1()->PF_ForceRerender(in_data, &(params[0]->u.ld)) from AEGP for all the layers. But only for Text layer, AE pops up a dialog displaying the following error :
After Effects error : layer does not have a source.
(26::335)
Why is this happening? What other call can I use to rerender all the layers?
Thanks & Regards,
Dheeraj
Not sure why I get parameter count mismatch with param group.
Hi Again,
So, for all you regulars out there, I'm sure you're getting tired of my questions. I'm in the thick of development with AE plugs, so I'll probably be here more often than you'd like!
I'm having trouble understanding why I'm getting a parameter count mismatch error when I group some parameters with PF_ADD_TOPIC().
Here is the enum I have in my .h file:
enum { MY_TOPIC_LAYER_START, MY_ENABLE_LAYER, MY_FORM, MY_TOPIC_LAYER_END, MY_NUM_PARAMS };
Here is the code I have in my ParamsSetup():
{ PF_Err err = PF_Err_NONE; PF_ParamDef def; AEFX_CLR_STRUCT(def); PF_ADD_TOPIC("Options", MY_TOPIC_LAYER_START); AEFX_CLR_STRUCT(def); PF_ADD_CHECKBOXX("Enable Layer", true, PF_ParamFlag_CANNOT_TIME_VARY, MY_ENABLE_LAYER); AEFX_CLR_STRUCT(def); PF_ADD_LAYER("Form Group", 0, MY_FORM); AEFX_CLR_STRUCT(def); PF_END_TOPIC(MY_TOPIC_LAYER_END); printf("\nMy Plugin has %d parameters",MY_NUM_PARAMS); out_data->num_params = MY_NUM_PARAMS; return err; }
So, why am I getting a parameter count mis-match error? What do I need to change?
Thanks!
AE SDK plugin project setup in XCode
I need to port some AE effects plugins to OSX and I have never used XCode before. Unsurprisingly,Adobe supplied no demo of project setup.Should it be a "bundle" or "C/C++ plugin" , or anything else?Not a single line on it.
I opened the example projects from the SDK.I see that the target files ,all of them have the ending ".plugin" and build properties which I can't find when creating custom builds.I am using XCode 4.5 .Anyone can explain the main steps to confgure plugins just like the SDK examples?
Thanks.
Trouble getting the SDK examples working "invalid filter 25::3"
Hey guys,
so here's the problem; I can't get the SDK examples working. I'm using Win7 and visual studio 2012 to compile the examples. No error messages after compiling but when I try and use the plugin in AE, it says, invalid filter 25::3.
Here's what I've done so far:
- Install Visual Studio Express 2012 for Windows Desktop.
- Install the Windows 7.1 SDK.
- Install Visual C++ Express 2010.
- Install Visual Studio 2010 SP1.
I've tried compiling in Visual studio 2012 and in 2010, both with the standard compiler and with the WIN 7.1 sdk but I keep getting the "invalid filter 25::3" error message
Any suggestions ?
Thanks !
Displaying custom UI elements in sequence panel in Premiere Pro
I see it's possible to display custom UI elements in the Comp panel and the ECW panel.
Both "CCU" and "Custom_ECW_UI" samples show how to do this.
But how about the sequence panel at the bottom right in Premiere Pro? Is there anyway I can display my custom UIs in this panel?
Reload plugins without restarting AE CC
Is is possible to reload effect plugins in After Effects CC without restarting the whole application?
I am developing a new effect and would like to be able to load a new build of the effect without have to constantly Quit and restart After Effects.
Why is fxfactory mac only?
I'm currently installing an osx on my pc, because of some plugins for after effects.
And i was thinking why is fxfactory mac only? Is there that big of a difference between a mac plugin and windows plugin?
martin.
How to approach multithreading
Hello. I have created a box blur plugin using the following guide:
http://elynxsdk.free.fr/ext-docs/Blur/Fast_box_blur.pdf
Unfortunately it only uses one thread. My question is, would it be easier to somehow modify the code that I have written to make it multithreaded, or would it be easier to remake the plugin using the convolve function defined in PF_WorldTransformSuite1?
The SDK mentions that using existing functions is good because they are already optimised for multithreading. Thank you.
How to interface with After effects from external application
I have a midi (Mackie compatible) controller (jog wheel, sliders, encoders, display’s), and I want to control Adobe after effects with it.
The way I see it:
[MIDI CONROLLER] <===> [MY PROGRAM] <===> [After effects]
So my program needs to communicate bidirectional with the midi controller and after effects.
My main programming experience is Delphi (pascal language), and would like to develop the program in it. But if this is not possible or another language is more suitable than I’m willing to develop it in another language. I’ve some experience with C, Javascript, Php, Phyton.
The [MIDI CONTROLLER] <===> [MY PROGRAM] communication won’t be a problem, I’ve done this before and there is enough information on the internet.
The problem is communication with After effects. I don’t know where to start and I would really appreciate it if someone could give me some pointers how to handle it. I won’t mind if I need to run a script inside after effects to communicate with my program, but I don’t want the script to talk directly to the midi controller. (In a later stage I want to make the program compatible to other applications as well.)
There are several programming options inside after effects. You have the basic expression scripting, but these only affects the scripted layers (design elements). You also have scripts, and maybe this can communicate with a secondary application outside after effects. And I believe there is some kind of api, but I really don’t know nothing about it. The information and sample’s on the internet is sparse about this topic.
What do I need:
I want to know and control thinks like:
- the current timecode
- the opacity of selected layer
- the rotation of selected layer
- the scale of selected layer
- Preview / slice layer / select layer etc.
And it would be great if I can get some interrupt if one of these changes.
In my search I found a new device that can control these parameters:
That’s exactly what I want to create, only instead of a closed controller, I want to use universal midi controllers. So it seems possible, I only need to know how they did it.
how to add dll file in plugin
Hi everybody,
I have a short question concerning the plug-in.
I created a plug-in using visual studio 2005 for Adobe effect cs4
but i want to add dll on that plugin so,how to add dll in that plugin
please help me!!!!
Thanks
How to edit AF files without open After Effects application
Hello, guys.
I am trying to edit aep files without opening After Effects application? ,by CMD command or SDK whatever...
My concern is that I open aep files without opening After Effects application.
and then run some jsx scripts then save and close the files. And after that, I render them out.
The whole process what I need is not to open the application.
Is there anyone knows this task?
Thanks.
AEIO_UserOptionsDialog
Hello,
I have AEIO project for windows, and I want to port it to macintosh
On windows, there was a function AEIO_FunctionBlock4::AEIO_UserOptionsDialog()
and I look for a similar code for macintosh ? what is the way to do it ? I did not find
in UI examples in the SDK
My code is like this:
BOOL DialogProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_INITDIALOG:
CheckDlgButton(hwndDlg, IDC_FLATTEN, (WPARAM)g_header.bFlattenIndexed);
CheckDlgButton(hwndDlg, IDC_LZW, (WPARAM)g_header.bLZW);
CheckDlgButton(hwndDlg, IDC_GEN_MIPMAPS, (WPARAM)g_header.bGenerateMipmaps);
CheckDlgButton(hwndDlg, IDC_SAVE_ORIGINAL, (WPARAM)g_header.bSaveOrig);
CheckDlgButton(hwndDlg, IDC_HIGH_QUALITY_DXT, (WPARAM)g_header.bHighQualityDXT);
CheckRadioButton(hwndDlg, IDC_FORMAT_RAW, IDC_FORMAT_DXT5, g_header.iFormat);
return TRUE;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDOK:
g_header.bFlattenIndexed = IsDlgButtonChecked(hwndDlg, IDC_FLATTEN);
g_header.bLZW = IsDlgButtonChecked(hwndDlg, IDC_LZW);
g_header.bGenerateMipmaps = IsDlgButtonChecked(hwndDlg, IDC_GEN_MIPMAPS);
g_header.bSaveOrig = IsDlgButtonChecked(hwndDlg, IDC_SAVE_ORIGINAL);
g_header.bHighQualityDXT = IsDlgButtonChecked(hwndDlg, IDC_HIGH_QUALITY_DXT);
if (IsDlgButtonChecked(hwndDlg, IDC_FORMAT_RAW))
g_header.iFormat = IDC_FORMAT_RAW;
else if (IsDlgButtonChecked(hwndDlg, IDC_FORMAT_DXT1))
g_header.iFormat = IDC_FORMAT_DXT1;
else
g_header.iFormat = IDC_FORMAT_DXT5;
EndDialog(hwndDlg, IDOK);
break;
case IDCANCEL:
EndDialog(hwndDlg, IDCANCEL);
break;
}
break;
default:
return FALSE;
}
return TRUE;
}
static A_Err
VBNIO_UserOptionsDialog(
AEIO_BasicData *basic_dataP,
AEIO_OutSpecH outH,
const PF_EffectWorld *sample0,
A_Boolean *user_interacted0)
{
A_Err err = A_Err_NONE;
VBNIO_FileHeader *headerP = NULL;
AEGP_SuiteHandler suites(basic_dataP->pica_basicP);
AEIO_Handle optionsH = NULL;
AEIO_Handle old_optionsH = NULL;
err = suites.IOOutSuite4()->AEGP_GetOutSpecOptionsHandle(outH, (void**)&optionsH);
if (err || !optionsH)
return err;
err = suites.MemorySuite1()->AEGP_LockMemHandle(optionsH, (void**)&headerP);
if (err || !headerP)
return err;
g_header = *headerP;
if (DialogBox(GetModuleHandle("VBNIO.aex"),
MAKEINTRESOURCE(IDD_VBN_DIALOG),
NULL,
(DLGPROC)DialogProc) == IDOK){
A_long width, height;
suites.IOOutSuite4()->AEGP_GetOutSpecDimensions(outH, &width, &height);
if ((g_header.iFormat == IDC_FORMAT_DXT1 || g_header.iFormat == IDC_FORMAT_DXT5) &&
(width % 4 != 0 || height % 4 != 0)){
basic_dataP->msg_func(0, "Width and Height should be multiples of 4. Not saving option changes.");
suites.MemorySuite1()->AEGP_UnlockMemHandle(optionsH);
return AEIO_Err_INCONSISTENT_PARAMETERS;
}
*headerP = g_header;
*user_interacted0 = TRUE;
}
suites.MemorySuite1()->AEGP_UnlockMemHandle(optionsH);
return err;
};
How to install AEX in Premiere Pro 2.0?
I copied my AEX (effect plugin) file into the following folder:
Adobe Premiere Pro 2.0\Plug-ins\en_US
and then started Premiere. But my plugin was nowhere to be found. Are there some installation steps required?
Thanks,
Neil