Is it possible to detect when the user performs undo or redo actions so I can update my UI accordingly?
Detect Undo/Redo
Which command is called when plug-in is removed from a layer?
Hello,
When we apply an effect to a layer PF_Cmd_SEQUENCE_SETUP is called, like this which command is called when the plug-in is removed?
[
Here remove means
1. select the plug-in in Effect Control Window, and then press "Delete" button. Or
2. select the plug-in in Effect Control Window and select "Remove all" from Effects menu.
]
Callback when a layer/effect is deleted or when undo/redo is performed.
Hi,
I need to get callback when I delete an effect or layer. Also I need to know when undo or redo is performed. Are there any methods for which I can register?
I checked this thread : http://forums.adobe.com/message/2809657#2809657
It's mentioned that AEGP_RegisterCommandHook() has to be used and we need to monitor the AEGP_Command received. When an effect is deleted I'm receiving a command. Do I need to hard code and check for this command? Is there any other way of checking for the AEGP_Command?
Thanks,
Dheeraj.
Draft quality input layer
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.
PF_ADD_BUTTON bug concerning undo/redo stack
I just found a weird behaviour:
I have 5 Sliders and a Button in my plugin - when I clik on a Button parameter all the sliders change their values. When I want to go back to the previous state and choose Undo, only one slider changes its value to the previous state. I need to choose the Undo option 5 times to go back properly (I even tried the Undo Group, but it didn't work).
So I replaced a PF_ADD_BUTTON with a PF_ADD_CHECKBOX, then clicked on a Checkbox to change all the sliders, then I choose the Undo option and all the sliders went back to their previous values with one click.
Why doesn't it work for a Button parameter? Is it a known issue?
СС2015 - Modal dialog is waiting for response.
Distributing AE plugin sources under GPL license?
Hi guys,
today I have a special question for you:
What if a plugin uses some third-party libraries that come with GPL license?
Can I then just distribute the final plugin non-commercially also under GPL with full sources?
I think not, as Adobe apparently explicitly forbids open source components in their AE SDK (http://www.adobe.com/devnet/aftereffects/sdk/cc2017/eula.html) :
"6. Open Source Software.
Developer is not licensed to (and Developer agrees not to) integrate or use the SDK, other than third-party software described in Section 14.6, with any Open Source Software in a manner that requires disclosure, distribution or licensing of all or any part of the SDK in source code form, for the purpose of making derivative works, or at no charge. For the purposes of this Section 6, “Open Source Software” shall mean software licensed under the GNU General Public License, GNU Affero General Public License (AGPL), the GNU Lesser General Public License or any other license terms that could require, or condition Developer’s use, modification or distribution of such software on, the disclosure, distribution or licensing of any other software in source code form, for the purpose of making derivative works, or at no charge. Any violation of the foregoing provision shall immediately terminate all of Developer’s licenses and other rights to the SDK granted under this Agreement."
But then again, there are quite a lot of free AE plugins out there that come with sources and are licensed under GPL or similar, e.g.:
http://www.andrewdavidson.com/aeflame/
Also, an AE plugin for the popular OpenColorIO (proprietary license by Sony) exists that also does not seem to conflict with the Adobe SDK: http://opencolorio.org/License.html
And there are also commercial plugins that interface libraries like FFMPEG under GPL/GPL, like this: http://aescripts.com/aempeg/
Can anyone from Adobe shed any light on this or does any other developer have any experience already in that regard?
Custom UI on Premiere problems.
1) How do I get the ECP background colour, so I can clear a section to it?
PF_AppGetColor() succeeds but doesn't actually return a colour for any of the colour types. (if Premiere at least cleared to the panel colour I'd be fine, but it clears to black - why?).
2) How can I draw a custom UI without a topic? (many of Premiere's effects do this). PF_PUI_TOPIC doesn't seem to be supported.
3) How can I dynamically resize my UI's rectangle, to scale it as the user adjusts the ECP width (like many of Premiere's effects do)?
How to default a parameter's twirly to be open?
Hello all,
I've read in the SDK documentation that one can set a parameter or a parameter group's twirly to default to either opened or closed.
I've seen this paramete flag: PF_ParamFlag_COLLAPSE_TWIRLY
Which seems to be great if you want it to default to closed but I'm not sure how to do the opposite.
What am I missing?
cheers,
-Gareth
Building my first AE plugin using the example checkout - layer unvisible
Hi,
I am trying to learn how to build after effects CS6 plugin using Microsoft visual studio.
I managed to make a test plug using the "checkout" example from the SDK but whenever i apply it to a layer (solid or anything)
My layer which i applied it makes the solid disappear (attached JPG)
This is the code i used to compile.
#include "Checkout.h"
static PF_Err
GlobalSetup (
PF_InData *in_data,
PF_OutData *out_data,
PF_ParamDef *params[],
PF_LayerDef *output )
{
PF_Err err = PF_Err_NONE;
DuckSuite1* dsP = NULL;
if (AEFX_AcquireSuite( in_data,
out_data,
kDuckSuite1,
kDuckSuiteVersion1,
"Couldn't load suite.",
(void**)&dsP)) {
PF_STRCPY(out_data->return_msg, "plugin loaded successfully");
} else {
if (dsP) {
dsP->Quack(2);
ERR(AEFX_ReleaseSuite( in_data,
out_data,
kDuckSuite1,
kDuckSuiteVersion1,
"Couldn't release suite."));
}
}
// We do very little here.
out_data->my_version = PF_VERSION( MAJOR_VERSION,
MINOR_VERSION,
BUG_VERSION,
STAGE_VERSION,
BUILD_VERSION);
out_data->out_flags = PF_OutFlag_WIDE_TIME_INPUT |
PF_OutFlag_I_DO_DIALOG;
out_data->out_flags |= PF_OutFlag_PIX_INDEPENDENT |
PF_OutFlag_USE_OUTPUT_EXTENT;
out_data->out_flags2 = PF_OutFlag2_PARAM_GROUP_START_COLLAPSED_FLAG |
PF_OutFlag2_SUPPORTS_SMART_RENDER |
PF_OutFlag2_FLOAT_COLOR_AWARE |
PF_OutFlag2_SUPPORTS_QUERY_DYNAMIC_FLAGS;
return err;
}
/*static PF_Err
PreRender(
PF_InData *in_data,
PF_OutData *out_data,
PF_PreRenderExtra *extra)
{
/*PF_Err err = PF_Err_NONE;
PF_ParamDef channel_param;
PF_RenderRequest req = extra->input->output_request;
PF_CheckoutResult in_result;
AEFX_CLR_STRUCT(channel_param);
// In order to know whether we care about alpha
// or not, we check out our channel pull-down
// (the old-fashioned way); if it's set to alpha,
// we care. -bbb 10/4/05.
/*ERR(PF_CHECKOUT_PARAM( in_data,
SMARTY_CHANNEL,
in_data->current_time,
in_data->time_step,
in_data->time_scale,
&channel_param));
if (channel_param.u.pd.value == Channel_ALPHA){
req.channel_mask |= PF_ChannelMask_ALPHA;
}
req.preserve_rgb_of_zero_alpha = TRUE; // Hey, we care.
ERR(extra->cb->checkout_layer( in_data->effect_ref,
SMARTY_INPUT,
SMARTY_INPUT,
&req,
in_data->current_time,
in_data->time_step,
in_data->time_scale,
&in_result));
UnionLRect(&in_result.result_rect, &extra->output->result_rect);
UnionLRect(&in_result.max_result_rect, &extra->output->max_result_rect);
// Notice something missing, namely the PF_CHECKIN_PARAM to balance
// the old-fashioned PF_CHECKOUT_PARAM, above?
// For SmartFX, AE automagically checks in any params checked out
// during PF_Cmd_SMART_PRE_RENDER, new or old-fashioned.
//return err;
return 0;
}*/
static PF_Err
ParamsSetup (
PF_InData *in_data,
PF_OutData *out_data,
PF_ParamDef *params[],
PF_LayerDef *output )
{
PF_Err err = PF_Err_NONE;
PF_ParamDef def;
PF_EffectUISuite1 *effect_ui_suiteP = NULL;
AEFX_CLR_STRUCT(def);
PF_ADD_SLIDER( NAME,
CHECK_FRAME_MIN,
CHECK_FRAME_MAX,
CHECK_FRAME_MIN,
CHECK_FRAME_MAX,
CHECK_FRAME_DFLT,
CHECK_FRAME_DISK_ID);
AEFX_CLR_STRUCT(def);
//define the add layer dropdown menu name
PF_ADD_LAYER("Layer to checkout",
PF_LayerDefault_MYSELF,
CHECK_LAYER_DISK_ID);
out_data->num_params = CHECK_NUM_PARAMS;
// Premiere Pro/Elements does not support this suite
if (in_data->appl_id != 'PrMr')
{
ERR(AEFX_AcquireSuite( in_data,
out_data,
kPFEffectUISuite,
kPFEffectUISuiteVersion1,
NULL,
(void**)&effect_ui_suiteP));
ERR(effect_ui_suiteP->PF_SetOptionsButtonName(in_data->effect_ref, "Test Button"));
(void)AEFX_ReleaseSuite(in_data,
out_data,
kPFEffectUISuite,
kPFEffectUISuiteVersion1,
NULL);
}
return err;
}
static PF_Err
Render(
PF_InData *in_data,
PF_OutData *out_data,
PF_ParamDef *params[],
PF_LayerDef *output )
{
PF_Err err = PF_Err_NONE,
err2 = PF_Err_NONE;
int32_t num_channelsL = 0;
PF_Rect halfsies = {0,0,0,0};
PF_ParamDef checkout;
PF_ChannelSuite1 *csP = NULL;
PF_ChannelDesc desc;
PF_ChannelRef ref;
PF_ChannelChunk chunk;
PF_Boolean found_depthPB;
AEFX_CLR_STRUCT(checkout);
// Premiere Pro/Elements does not support this suite
if (in_data->appl_id != 'PrMr')
{
ERR(AEFX_AcquireSuite( in_data,
out_data,
kPFChannelSuite1,
kPFChannelSuiteVersion1,
"Couldn't load suite.",
(void**)&csP));
ERR(csP->PF_GetLayerChannelCount( in_data->effect_ref,
0,
&num_channelsL));
if(num_channelsL) {
ERR(csP->PF_GetLayerChannelTypedRefAndDesc( in_data->effect_ref,
0,
PF_ChannelType_DEPTH,
&found_depthPB,
&ref,
&desc));
ERR(csP->PF_CheckoutLayerChannel( in_data->effect_ref,
&ref,
in_data->current_time,
in_data->time_step,
in_data->time_scale,
desc.data_type,
&chunk));
// do interesting 3d stuff here;
ERR(csP->PF_CheckinLayerChannel(in_data->effect_ref,
&ref,
&chunk));
}
ERR2(AEFX_ReleaseSuite( in_data,
out_data,
kPFChannelSuite1,
kPFChannelSuiteVersion1,
"Couldn't release suite."));
}
// set the checked-out rect to be the top half of the layer
halfsies.top = halfsies.left = 0;
halfsies.right = (short)output->width;
halfsies.bottom = (short)(output->height / 2);
ERR(PF_CHECKOUT_PARAM( in_data,
CHECK_LAYER,
(in_data->current_time + params[CHECK_FRAME]->u.sd.value * in_data->time_step),
in_data->time_step,
in_data->time_scale,
&checkout));
if (!err) {
if (checkout.u.ld.data) {
ERR(PF_COPY(&checkout.u.ld,
output,
NULL,
&halfsies));
} else {
// no layer? Zero-alpha black.
ERR(PF_FILL(NULL, &halfsies, output));
}
if (!err) {
halfsies.top = halfsies.bottom; //reset rect, copy.
halfsies.bottom = (short)output->height;
ERR(PF_COPY(¶ms[CHECK_INPUT]->u.ld,
output,
NULL,
&halfsies));
}
}
ERR2(PF_CHECKIN_PARAM(in_data, &checkout)); // ALWAYS check in,
// even if invalid param.
return err;
}
static PF_Err
About (
PF_InData *in_data,
PF_OutData *out_data,
PF_ParamDef *params[],
PF_LayerDef *output )
{
PF_SPRINTF(out_data->return_msg,"Name: %s, Description: %s ", NAME, DESCRIPTION);
/*PF_SPRINTF( out_data->return_msg,
"%s, v%d.%d\r%s",
NAME,
MAJOR_VERSION,
MINOR_VERSION,
DESCRIPTION);*/
return PF_Err_NONE;
}
static PF_Err
PopDialog (
PF_InData *in_data,
PF_OutData *out_data,
PF_ParamDef *params[],
PF_LayerDef *output )
{
PF_Err err = PF_Err_NONE;
PF_SPRINTF( out_data->return_msg,
"Dudy Bin Message1");
out_data->out_flags |= PF_OutFlag_DISPLAY_ERROR_MESSAGE;
return err;
}
DllExport
PF_Err
EntryPointFunc (
PF_Cmd cmd,
PF_InData *in_data,
PF_OutData *out_data,
PF_ParamDef *params[],
PF_LayerDef *output,
void *extra)
{
PF_Err err = PF_Err_NONE;
switch (cmd) {
case PF_Cmd_ABOUT:
err = About(in_data,out_data,params,output);
break;
case PF_Cmd_GLOBAL_SETUP:
err = GlobalSetup(in_data,out_data,params,output);
break;
case PF_Cmd_PARAMS_SETUP:
err = ParamsSetup(in_data,out_data,params,output);
break;
case PF_Cmd_RENDER:
err = Render(in_data,out_data,params,output);
break;
case PF_Cmd_DO_DIALOG:
err = PopDialog(in_data,out_data,params,output);
break;
default:
break;
}
return err;
}
Thanks,
Dudy.
プラグイン(TRAPCODE SUITE)が、正常に動作しない
AE5.0のプラグインの試用版をダウンロード、インストールしましたが、particularなどの機能を使用しようとすると
エラーが発生します。
After Effects: effect cannot change non-dynamic flag bits during PF_Cmd_QUERY_DYNAMIC_FLAGS( 25 、 228 )
色々と調べましたが、ほとんど情報がありませんでした。
また、マニュアルらしきものから以下の記述を発見しました。
解決法が分かる方いらっしゃいますでしょうか。
よろしくお願いします。
Table 6: PF_OutFlags2
Flag |
Indicates |
PF_OutFlag2_SUPPORTS_QUERY_DYNA MIC_FLAGS |
The effect responds to PF_Cmd_QUERY_DYNAMIC_FLAGS. Must be set in the PiPL and during PF_Cmd_GLOBAL_SETUP. |
PiPLs
Plug-In Property Lists, or PiPLs, are resources which indicate the behavior of a plug-in. These resources are a legacy originated by Adobe Photoshop, and
have been largely supplanted within After Effects by PF_Cmd_GLOBAL_SETUP. However, the behaviors indicated during global setup must agree with those in the PiPL.
For MacOS development, you can use Mathemaesthetic’s Resorcerer (and the PiPL resource template provided in the SDK) to edit PiPLs; ResEdit cannot visually edit a PiPL resource. Use DeRez to make a .r file from your PiPL resource to use the same .r file for both MacOS and Windows (as the SDK does). The PiPL format is defined in AE_General.r; use this as your prefix file in your CodeWarrior project’s Settings > Rez dialog.
After Effects error: Time argument is out of range.
i've written a keyframer plugin.the AE often prompt a dialog(which shows "After Effects error: Time argument is out of range.") when the plugin deletes some keyframes and inserts lots of keyframe.i checked out the time argument and found the time is valid.on what condition the AE will promt the dialog?
thanks advance
How to use GPU in plugin?
Hi, everyone!.
I hope everyone is going well.
I have developed a small plugin like Resizer. But i am afraid it is to slow to use.
How can I use GPU in this plugin?
If you know about that, would you explain about that in detail?
Regards,
Igor.
Grouping Parameters Into Folders
Plugin cache
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
New GLator 16bpc oddity
Hi. The 2017 GLator multiplies 16bpc by 1.99999 before doing processing then divides it by the same at the end. I'm confused why it does this, as 8bpc doesn't require any conversion. Thanks.
What is the full name of PF?
Hello,
I am very new to the Ae SDK, and forgive my curiosity, there are lots of parameters and classes handled by plugins have the prefix ’PF_’(e.x. PF_Pixel,PF_Handle).
So... what is actually a ‘PF’ mean? Is it a shortened form of a term?
How to pass data between CPU-side and GPU-side of an AE Transition Extension Plugin
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
AEGP_DoCommand(2415), aka Play, doesn't do anything
Are there limitations as to when the Play command can be issued?
I am issuing it in the idle hook, and it does nothing whatsoever.
Other commands (and by other I mean RAM preview) work.
Thanks.
How to disable some params when a checkbox is checked?
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