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

Strange AngleParam value

$
0
0

Anyone know if there's some special way to handle an AngleParam?

 

Currently I'm having to divide the value by some ridiculous number (about 3753600) to make it usable as degrees.

 

Here's the function I'm feeding it into (as "rot"):

 

static PF_PixelFloat rotateY(PF_FpLong rot, PF_PixelFloat inVec){

  PF_FpLong tmpX = inVec.red;

  PF_FpLong tmpZ = inVec.blue;

 

 

  inVec.red = tmpX*cosf(rot) + tmpZ*sinf(rot);

  inVec.blue = tmpZ*cosf(rot) - tmpX*sinf(rot);

  return inVec;

}

 

I figured it would just be a matter of converting degrees to radians, but apparently not.


About Dialog message length

$
0
0

Does anybody know if it is possible to extend the message length beyond PF_MAX_EFFECT_MSG_LEN (255 characters) or provide another way to provide about information?

 

I am using a number of third party libraries in my plugin which require crediting as part of their licence conditions and they will not all fit in. Unless I can expand this dialog or find another way to provide the credit then I may not be able to deliver this project :-(

AEGP: Time remap value handling.

$
0
0
When we access AEGP_LayerStream_TIME_REMAP in one of our plugins we get handed back an A_FpLong, but many of the things we need it for need to be calculated as A_Time values.

It is of course possible to do the conversion ourselves, by taking the framerate, duration, and (everything else?) into account, but this feels dodgy and error prone.

Is there some nice built-in that we're missing to do this conversion correctly?

Thanks,
-Harold

Custom Panel UI

$
0
0
I'm developing for AE CS3 on Windows.

Is it possible to create my own panel UI through the C++ interface?

I've found how to do it with the ScriptUI system, which is pretty slick, but the functionality I'm working on is a bit big, hairy, and scary to think of doing all in JavaScript.

Is the panel UI creation stuff only exposed to JavaScript and not to C++?

Thanks in advance for your insight.

Effects Plug ins and Sample Image expression

$
0
0

Hello guys,

I have a small problem with the sample Image expression and effects affinity.

I build an effect similar to the autolevels effect. It scales up the gray levels of a picture. Really simple effect.

Then I try to get the color at some point of my layer.

So i add a Point effect, a color effect from expression control.

Then I put an expression to update my color parameter :

sampleImage(effect(Point));

 

this does work sometimes and not other times. I move the point and the value becomes incorrect... emptying the cache sometimes clear the problem but not all the time.

I have some random values sometimes too.

If I precomp my layer, then no problem, I get the right result.

 

It seems there is a synchonization problem between my effect and the expression evaluation. It seems to be evaluated before my effect computation is finished. Maybe i m not sending the right out flags or something like this?

I tried with the standard autolevels and the color is correctly updated....


If someone has any ideas that could help me.

 

thank you for your help in advance.

AEGP_GetProjectPath in CS5, MemHandle to char

$
0
0

Hey guys, I'm trying to port a plug-in from windows ( cs4 ) to mac (cs5), and surprisingly it's been pretty smooth, I have however run into a couple of issues.

 

/* CS4 - Windows code */

          A_char astrFullpath[AEGP_MAX_PATH_SIZE];


          ERR(suites.PROJ_SUITE()->AEGP_GetProjectPath(ahProjectH, astrFullpath));

 

... so I know now we have to create a MemHandle, which will give us the Unicode string.. like so

 

/* CS5 - mac code */

 

          AEGP_MemHandle path;     

     
            ERR(suites.PROJ_SUITE()->AEGP_GetProjectPath(ahProjectH, &path));         

 

.... my question is, how do I create a A_char out of my path MemHandle?

 

I think the MemHandle is a UTF16Char, but I need it to be a char*....

 

I hope I'm not overlooking something really simple, programming is just a hobby of mine!

 

Thanks in advance!

Newbie SmartFX Plugin Help

$
0
0

Hi,

 

I'm starting out with the SDK in an attempt to convert my Pixel Bender plugins to native so they'll run faster and work in CS6. It's important that they work in 32-bit (as I guess all new plugins should anyway for max compatability) so I'm dispensing with the old-style and going straight for SmartFX.

 

At the moment all I want to do is get the input and fill it with a colour depending on the bit depth, just so I can learn how things happen and I'll work the rest out later. I can compile and build the plugin OK but when I apply it to a layer, the layer just turns black, with no RGB or A info. I'm guessing that I'm doing something wrong during the Pre-Render call, in that I'm not setting the result rectangles correctly, but as I've based it on the supplied SmartyPants example plugin, it should work ok.

 

Here's the PreRender and SmartRender code:

 

// PreRender

static PF_Err PreRender(

          PF_InData                                        *in_data,

          PF_OutData                                        *out_data,

          PF_PreRenderExtra                    *extra)

{

          PF_Err err = PF_Err_NONE;

  PF_RenderRequest req = extra->input->output_request;

          PF_CheckoutResult in_result;

 

  // Check out input

          ERR(extra->cb->checkout_layer(          in_data->effect_ref,

                                                                                                MY_INPUT,     // Defined as 0

                                                                                                MY_INPUT,

                                                                                                &req,

                                                                                                in_data->current_time,

                                                                                                in_data->time_step,

                                                                                                in_data->time_scale,

                                                                                                &in_result));

 

  // Set the result rectangles

          UnionLRect(&in_result.result_rect,                     &extra->output->result_rect);

          UnionLRect(&in_result.max_result_rect,           &extra->output->max_result_rect);

 

          return err;

}

 

 

// ActuallyRender...

static PF_Err ActuallyRender(

          PF_InData                    *in_data,

          PF_EffectWorld           *input,

          PF_OutData                    *out_data,

          PF_EffectWorld          *output)

{

          PF_Err                                        err           = PF_Err_NONE,

                                                            err2           = PF_Err_NONE;

          PF_Point                              origin;

          PF_Rect                                        src_rect, areaR;

          PF_PixelFormat                    format          =          PF_PixelFormat_INVALID;

          PF_WorldSuite2                    *wsP          =          NULL;

 

 

          PF_PixelFloat                    red_float = {0.0, 0.0, 1.0, 1.0};

          PF_Pixel16                              green_deep = {0, 32767, 0, 32767};

          PF_Pixel8                              blue_norm = {255, 0, 0, 255};

 

          AEGP_SuiteHandler suites(in_data->pica_basicP);

 

          src_rect.left           = -in_data->output_origin_x;

          src_rect.top           = -in_data->output_origin_y;

          src_rect.bottom = src_rect.top + output->height;

          src_rect.right           = src_rect.left + output->width;

 

 

          ERR(AEFX_AcquireSuite(          in_data,

                                        out_data,

                                        kPFWorldSuite,

                                        kPFWorldSuiteVersion2,

                                                                                                            "Couldn't load suite.",

                                        (void**)&wsP));

 

  if (!in_data->sequence_data) {

              PF_COPY(input, output, &src_rect, NULL);

              err = PF_Err_INTERNAL_STRUCT_DAMAGED;

          }

 

 

          if (!err){

                         ERR(wsP->PF_GetPixelFormat(input, &format));

                         switch (format) {

                                        case PF_PixelFormat_ARGB128:

 

                                                       ERR(suites.FillMatteSuite2()->fill_float(in_data->effect_ref,

                                                                                                                                                            &red_float,

                                                                                                                                                            NULL,

                                                                                                                                                            input));

                                                       break;

 

                                        case PF_PixelFormat_ARGB64:

 

                                                       ERR(suites.FillMatteSuite2()->fill16(in_data->effect_ref,

                                                                                                                                                            &green_deep,

                                                                                                                                                            NULL,

                                                                                                                                                            input));

                  break;

 

                                        case PF_PixelFormat_ARGB32:

                                                        ERR(suites.FillMatteSuite2()->fill(in_data->effect_ref,

                                                                                                                                                            &blue_norm,

                                                                                                                                                            NULL,

                                                                                                                                                            input));

                                                       break;

 

 

                                        default:

                                                       err = PF_Err_BAD_CALLBACK_PARAM;

                                                       break;

                              }

                              err = PF_COPY(input, output, &src_rect, NULL);

          }

          ERR2(AEFX_ReleaseSuite(          in_data,

                                                                           out_data,

                                                                           kPFWorldSuite,

                                                                           kPFWorldSuiteVersion2,

                                                                           "Couldn't release suite."));

          return err;

}

 

// SmartRender

static PF_Err SmartRender(

          PF_InData                                        *in_data,

          PF_OutData                                        *out_data,

          PF_SmartRenderExtra                    *extra)

{

          PF_Err                              err                    = PF_Err_NONE,

                                                  err2           = PF_Err_NONE;

 

          PF_EffectWorld          *input_worldP          = NULL,

                                                  *output_worldP  = NULL;

 

  // checkout input & output buffers.

          ERR((extra->cb->checkout_layer_pixels(          in_data->effect_ref, QPMM_INPUT, &input_worldP)));

          ERR(extra->cb->checkout_output(          in_data->effect_ref, &output_worldP));

 

          ERR(ActuallyRender(          in_data,

                                                                 input_worldP,

                                                                 out_data,

                                                                 output_worldP));

 

          return err;

}

 

Please forgive my coding - it's been 15 years since I did any C++, and I was never much good at it!

 

Any help pointing me in the right direction will be much appreciated.

 

Thanks,

 

Christian

Migration from base SDK to VS2012 does not build.

$
0
0

So after some battling with Visual Studio 2012 trying to build my custom plugin, I decided to do a fresh download of the SDK and try to build the example projects with VS2012.  None of them build after VS does a "Migration" to 2012.  All of the projects in the solution file fail to build with the same error.  Here is the output from the build process for Paramarama:

 

  Compiling the PiPL  Microsoft (R) C/C++ Optimizing Compiler Version 17.00.60610.1 for x64  Copyright (C) Microsoft Corporation.  All rights reserved.  ParamaramaPiPL.r  Microsoft (R) C/C++ Optimizing Compiler Version 17.00.60610.1 for x64  Copyright (C) Microsoft Corporation.  All rights reserved.  ParamaramaPiPL.rrc  AEGP_SuiteHandler.cpp  Paramarama.cpp  Paramarama_Strings.cpp  Generating Code...  MissingSuiteError.cpp
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(1137,5): warning MSB8012: TargetPath(C:\Dev\Adobe After Effects CS6 Win SDK\Examples\Effect\Paramarama\Win\x64\Debug\Paramarama.dll) does not match the Linker's OutputFile property value (C:\Paramarama.aex). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(1138,5): warning MSB8012: TargetExt(.dll) does not match the Linker's OutputFile property value (.aex). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
LINK : fatal error LNK1104: cannot open file '\Paramarama.aex'

 

So, I checked some of the property pages for the project.  Here are some screenshots:

 

vs2012-aesdk-props-general.png

vs2012-aesdk-props-general-linker.png

 

I'm curious as to why the target extension is set to `.dll`, but the Output File is .aex.  Shouldn't the target extension be .aex?  Also, what should the `Configuration Type` be set to since a .aex file is not necessarily a .dll (although maybe I'm wrong here)?  Is an .aex a .dll? 

 

And one final question:  What does the %(Link.OutputFile) refer to in the error I get upon building.

 

Thanks,
Arie


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

How to edit AF files without open After Effects application

$
0
0

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.

Smart Plugin Memory Leak

$
0
0

Hi

I am just writing my first smart plugin - to date I have just written regular plugins. My first test was pretty simple, it just had a single slider going from 0 to 1, and it filled the whole output with black, white or the appropriate shade of grey.

 

However after scrubbing the slider backwards and forwards a few times everything locked up. Opening task manager (which took some effort) showed that AE had eaten all my memory. Running AE in the debugger I found thatcalling fill consumed about 8 MB of memory and then between returning from my smart render event and the call to free my pre_render_data AE had consumed about another 8 MB of memory. Each move of the slider resulted in another 15 MB or so being consumed and with the breakpoints removed sliding slowly from one end to the other consumed a few hundred MB.

 

I then changed my plugin so that it totally ignored both smart render and smart prerender events. It literally did nothing but return PF_Err_NONE. Still AE racked up memory usage. Still I am getting 10 or 15 MB of memory leakage for each render event.

 

Has anyone ever seen this type of behaviour before? Is there something I need to do in a smart plugin that I haven't needed to do before that might be causing this problem? If needed I can post my sample code. I am using Visual Studio 2012 on Windows 8.1 with AE CC.

 

Phil

Accessing Bundled Resources

$
0
0

I have a text file that I have copied into my Contents/Resources subfolder of my plugin using an XCode build phase.

 

How do I access the file???

 

To get the file path to my subfolder I'm calling:


wchar_t data[1024];

PF_GET_PLATFORM_DATA(PF_PlatData_RES_FILE_PATH_W, reinterpret_cast<void *>(data));


...which I'm assuming is correct since the SDK guide tells me to use the new "wide" calls to PF_GET_PLATFORM_DATA. However I get a crash when attempting to convert the wchar_t to something I can actually use. If I use any other type, such as A_UTF16Char, all I get is a single / (forward slash) character.


Any tips, or examples?


Many thanks!


Christian


Offset Red value

$
0
0

hi all.

I am new to the after effect SDK, basically i develop Game in Unreal engine and Unity. but any way i cannot understand some functionality in the After effect SDK.

 

1. Is there any Flow chart that explains the flow of control in the plugin.

 

2. i want to offset and rotate the Red value based on a point. i cannot figure it out. can any one help me how to solve this .

What determines the padding on rowbytes?

$
0
0

Hi. Sometimes rowbytes include a few extra bytes of data per line and sometimes they don't. Is there a reason why they may or may not include padding, and what determines the amount of padding? Thanks.

AEIO_OutputFrame

$
0
0
Hi.

Im trying to write a plugin that supports a new file format that im working on.

i am trying to build the plugin based on the FBIO tutorial and i understand that most of my magic happens in the AEIO_OutputFrame function.

My problem is that i do not know how to get a hold of the file handle to write to. i know how to compress and organize my data but not how to write it to file. The output file is already open when the function gets called to there must be a preferred way of writing to the file with proper AE error handling.

thanks,

niklas

After Effects + OpenGL

$
0
0

I know that this subject was already touched upon here a couple of years ago but I want to refresh it.

I'm interested in implementing OpenGL in After Effects' plugin. Is is possible yet? If yes - how?

This is my simple example code I would like to use in After Effects plugin:

 

int size = 500;

glColor4f(1, 0, 0, 1);

glBegin(GL_POLYGON);

     glVertex2f(-size, -size);

     glVertex2f(-size, size);

     glVertex2f(size, size);

     glVertex2f(size, -size);

glEnd();

 

Any help would be appreciated.

Trouble getting the SDK examples working "invalid filter 25::3"

$
0
0

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:

 

 

  1. Install Visual Studio Express 2012 for Windows Desktop.
  2. Install the Windows 7.1 SDK.
  3. Install Visual C++ Express 2010.
  4. 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 !

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

Users receiving error: Couldn't find main entry point for myPlugin.plugin (48::72)

$
0
0

Hello all,

 

I've recently released a plugin into the wild and a few (1/20) people have been receiving this error.

 

A cursory search on that code doesn't really give me a lot of helpful information about what, if anything, could be going on in my code to generate it.

 

Maybe it has nothing to do with my code, and rather is a system configuration thing, but I'd like to know that for sure.

 

I've got one guy with this system:

OS - 10.6.8

AFX CS5

AFX CS3 + CS4 are also installed on the system


and another:


OS X 10.7.5 Mac Pro 2.66 ghz quad core
14 GB RAM
AE version CC (12.2)

 

Any ideas..?

AEIO_InitOutputSpec

$
0
0

I am trying to write an output plugin based on the FBIO example and I am confused about how to set the proper output options.  When the sample code initializes the output spec it uses a pseudo file header and sets the size of the options handle to the size of this pseudo file header structure.  Are the fields of this header also a definition of what is necessary for a proper output spec?  Do I set them only by using the AEGPIOOutSuit4 functions?  The sample code also seems to treat this information as options which are just for this output format and stored separately from the spec in a "disk-safe copy of your options data."

 

I gather AEIO plugins distinguish between "user data" to be embedded in the file (what I would call the file header) and "options" which are information about the file, such as dimensions, compression, etc.  If these are options which can be set when a specific file is written, surely they are also embedded in the file header so that it can be read properly.

 

I'm obviously not getting something and would appreciate any pointers as to what to read or where to look at more sample code.

 

Thanks.

Viewing all 73444 articles
Browse latest View live


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