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

AEGP_ExecuteScript

$
0
0

Hello

 

I have a problem using script from sdk.

 

When in script editor I run this code, my project load with any problem

 

function openProject(filename) {

     if (app.project != NULL)

       app.project.close(CloseOptions.DO_NOT_SAVE_CHANGES);

     var myFile = File(filename);

     if (myFile.exists)

       app.open(myFile);

     else

       writeLn("no such file or directory!");

}

 

openProject("C:\\MonDossier\\bandeau défilant.aep");

But when my plugin call, this function, After Effect crash "an strange error with ae.blitpipe"

/* some includes here! */

#include <AEGP_SuiteHandler.h>

#include <AE_GeneralPlug.h>

 

 

#define OPEN_PROJECT "function openProject(filename) { \

if (app.project != NULL) \

          app.project.close(CloseOptions.DO_NOT_SAVE_CHANGES); \

var myFile = File(filename); \

if (myFile.exists) \

          app.open(myFile); \

else \

          writeLn(\"no such file or directory!\"); \

} \

openProject(\"%s\");"

 

 

std::string Do(SPBasicSuite* sp, AEGP_PluginID id)

{

          std::string lReturnedValue;

 

 

          try

          {

    A_Err err = A_Err_NONE;

    AEGP_SuiteHandler(sp);

    AEGP_MemHandle resultMemH = NULL, errorMemH = NULL;

    A_char *resultAC = NULL, *errorAC = NULL;

    A_char scriptAC[AEGP_MAX_MARKER_URL_SIZE] = {'\0'};

    A_bool encodingB = TRUE;          // my file to load may have non ascii char

 

 

    sprintf(scriptAC, OPEN_PROJECT, "C:\\\\MonDossier\\\\bandeau d\u00E9filant.aep");

    ERR(suites.UtilitySuite5()->AEGP_ExecuteScript(id, scriptAC, encodingB, &resultMemH, &errorMemH));

    bool lAnErrorOccured = (err == A_Err_NONE);

    ERR(suites.MemorySuite1()->AEGP_LockMemHandle(resultMemH, reinterpret_cast<void**>(&resultAC)));

    ERR(suites.MemorySuite1()->AEGP_LockMemHandle(errorMemH, reinterpret_cast<void**>(&errorAC)));

 

 

    lReturnedValue.assign(resultAC, strlen(resultAC));

    if (lAnErrorOccured)

    {

      lReturnedValue.append("ERROR: ");

      lReturnedValue.append(errorAC, strlen(errorAC));

    }

 

    ERR(suites.MemorySuite1()->AEGP_FreeMemHandle(resultMemH));

    ERR(suites.MemorySuite1()->AEGP_FreeMemHandle(errorMemH));

          }

          catch(...)

          {

    /* Do something here! */

          }

 

          return lReturnedValue;

}

 


How can I get the name of an applied effect instance?

$
0
0

We have an after effects plug-in (written using the SDK) and we'd like to get the name of an instance of an applied effect.For example, if my installed effect name is "FoofooBerry", and the customer applied two FoofooBerry effects, there would be one named "FoofooBerry" and one named "FoofooBerry 2".

 

In the documentation, it says:


     "To get an effect’s instance name (as renamed by the user), get the AEGP_StreamRef for the effect itself and call AEGP_GetStreamName."

That seems like what I want to do, but how one would "get the AEGP_StreamRef for the effect itself" eludes me.

 

I've tried iterating over all streams on the effect and inspecting them, but I don't see anything useful. Anyone know how to get the stream ref for an effect (not a stream on that effect)?

 

I've also asked the same question at StackOverflow, but unsurprisingly haven't had any luck (not a whole lot of AE experts over there).

 

Thanks.

IdleHook not called while animation is running

$
0
0

I was surprised, though it makes sense because it is, after all, named idle.

Is there no way to register a callback that gets called every frame, whether animation is running or not? You know, a standard update function.

If not, does it mean I have to use an OS-dependent event loop? (is this even possible? will AE behave properly if I get streams, keyframes, insert keyframes, etc., outside of its callbacks?)

Data exchange with IdleHook

$
0
0

Hi everyone!

 

I want to use IdleHook in the effect plugin and my question is about data exchange between plugin and IdleHook function. What are the best practices? How to pass some data structure to the IdleHook function and get another data back? How to use AEGP_IdleRefcon correctly?

 

For example I want to force rerender from the IdleHook and I have to change some parameter value. Another example - using AEGP_GetNewEffectForEffect function in the IdleHook. Is it possible?

 

Thanks!

After Effects error: crash occurred while invoking plug-in "Scripting"

$
0
0

Hello.

 

I am running a script by using AEGP_ExecuteScript in plugin.

But I am getting a error message when I close AE on my MAC.

 

 

It doesn't appear on my PC and there is only on my MAC.

 

How can I fix this issue?

 

Thanks.

Anthonie.

CCU iteration and pixel value

$
0
0

Hi,

 

Sorry for adding a new question in the forum but I didin't find the answer. I'm working on an iteration like  in CCU exemple and I'd like to access to the value of pixels around. For now I use *sampleIntegral32, but it's not optimised during an iteration. I see the iteration works with pointers for input_pixel and outputpixel but I don't find the good solution to access by this way...

 

Has someone an Idea ?

thanks again.

Unable to open resource file

$
0
0

Somehow in my development efforts I did something that makes After Effects put up a message when it starts saying "Unable to open resource file SmartyPants.plugin 3::54".  I have been struggling with effects based on SmartyPants and even tried at one point to build an older version of SmartyPants.  I can just click OK and After Effects carries on, but since I am starting it over and over again during the day, I'd like to get rid of the message.  I have used Finder to remove every file on my computer with SmartyPants in its name and I have uninstalled and reinstalled After Effects.  I still get the message.

 

Does anyone know what is causing this message and how I can stop it?

After Effects camera + OpenGL matrix

$
0
0

Hello,

 

I have a question/problem that has been bugging me for quite some time.

 

I have a functional AE plugin that has its own 3D OpenGL context/world.

This 3D world is synced to the AE camera like described in this thread: http://forums.adobe.com/thread/570135

After many tries, everything is working like expected now (phew!), but unfortunately, when I add a camera to an AE comp, its position gets initialized to (comp_width/2, comp_height/2, some_negative_z_value).

My OpenGL scene is however centered around (0,0,0). So, to actually see my scene, I have to change the AE camera's position and point of interest both to (0,0,0) as well. Is there any way around it?

I can of course translate my camera (or rather the whole scene) in OpenGL so that it is centered around (comp_width/2, comp_height/2, ???), but that does not work if adaptive resolution/downsampling kicks in, as the width and height then changes, but the coordinates don't.

 

I don't now if I explained that clearly enough, so feel free to ask me details.

 

Any input appreciated!

 

Thanks,

Tom


AEGP_UtilitySyite5::AEGP_ExecuteScript() doesn't do anything in my effect plugin. why?

$
0
0
Bonjoir All of you!,

I'm developing a Effect plugin and I wanted to execute some script using the AEGP_UtilitySyite5::AEGP_ExecuteScript() function. I have supplied all the parameters to this function. this function executing, but not doing anything. If I execute the same script via File -> Scripts -> Run Script File, then its working prefect. Why it doesn't do anyhting if I execute using the above function? what could be the reason for this?? am I missing anything??

Please any suggestions...

Thanks
Manjunath

Pixel data in AEGP plugin

$
0
0

Hi people,

I am just researching the next step for the plugin I a, developing. I need to access the pixel data so I can write it out from an AEGP plugin. I can see that you can get the layer I'd and covert it to a layer handle from a stream. But I cannot see how to request the layer for a stream, there does not seem to be a AEGP_LayerStream_... Enum value plus how can I convert a layer handle into a World so I can access the pixel data.

 

Thanks in advance

How to install AEX in Premiere Pro 2.0?

$
0
0
Hi,

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

Error on exit: Leaked effect refs

$
0
0

Hello,

I have error message "After Effects: AEGP Plugin    Updater: Leaked effect refs (5027::12)"

when exit AfterEffects with saved project. The error appears only if there are two or more instanses of my effect. One instance is ok.

After effects ends it's work correctly. Except this annoying message.

What does it mean? Does anybody know how to fix it?

dp_info.jpg

Can't load plugins in the MediaCore folder

$
0
0

So, my After Effects is installed in "E:\Adobe\After Effects CS6",so the MediaCore folder's path is "E:\Adobe\Common\Plug-ins\CS6\MediaCore".

I just started to learn the SDK yesterday. When I was playing with the samples in the SDK, I set the output folder to the MediaCore folder, After Effects won't load the plugins in this folder. I have to copy the plugins to the plugin folder in After Effects support files folder.

If I set the output folder to the plugin folder of After Effects, After Effects keeps crash.

What should I do?

I'm using Windows 7 Ultimate sp1 64 bit, After Effects CS6 and Visual Studio 2010 Ultimate.

SDK Tutorial?

$
0
0

Greetings everyone,

 

I'm going through the SDK documentation pdf and I'm wondering if there is a walkthrough with the examples somewhere or it’s a “figure it out yourself” type of thing?

 

Thx,

Layer Parameter Returning Cropped Pixels

$
0
0

How can I get a smart plugin to return me all pixels from a "texture" layer parameter, when this layer is bigger than the effect layer?

 

Example - I have a 2048x2048 pixel "texture" layer that I reference in my layer parameter. My effect layer is 1920x1080. When I check out the texture layer pixels the resultant PF_EffectWorld has a width of 2048 but a height of only 1188 pixels.

 

I must be doing something wrong in PreRender when I check out the layers (I've never really been clear about what result_rect and max_result_rect do). I've tried setting both result_rect and max_result_rect to be the union of the input and texture layers, and also set PF_RenderOutputFlag_RETURNS_EXTRA_PIXELS, but none of these things yield a correct result.

 

Basic stuff probably but I'm stumped!

 

Thanks.


Absolute coordinates

$
0
0

Hi,

 

My question is about PF_Param_POINT_3D and PF_Param_POINT. Parameters of these types change values in case of layer resizing. Is it possible to use them as constant 2-dimentional and 3-dimentional values (invariant under layer size changes)?

 

 

Thanks!

Getting Path Data

$
0
0

I'm trying to write a basic AE Exporter that outputs the geometry in a scene.

 

I was parsing streams by looping over all of the streams in a given composition's layers. I'm able to find the Path stream, but it seems to have no data.

 

How am I supposed to get a path's data? I noticed that there are suites called: PF_PathQuerySuite and PF_PathDataSuite which seem to potentially be what I want, but I have no clue how to use them. How do I get the PF_ProgPtr that these suites seem to need?

 

I can't seem to find any useful documentation online. Any help would be greatly appreciated!

AE SDK wrapper

$
0
0

Hi

I've just been working on a project writing AE plugins - mostly fairly basic things like drawing and animating geometric shapes. This has been my first foray into After Effects plugins. However in doing so I must confess to finding the API painful and the documentation impenetrable. It has taken me the best part of a year working on-and-off on this project to feel comfortable writing basic plugins - and I never even got as far as smart plugins.

 

Anyway, along the way I've begun to write a series of C++ wrappers around the API to manage resources, things like an multi-d array class to correctly handle AE memory management, some transformation code using the after effect matrix structure and the beginnings of a World class for managing AE_Worlds and doing drawing etc. I was wondering if there was any demand for this kind of thing in the community and if it was worth me developing further? The kind of thing I'm imagining is a more object oriented and easier to use interface to the SDK, with better resource management - to save the memory leaks. I know the code I've written already has massively speeded up my plugin development and reduced bugs. Maybe it would be some help to others.

 

In the end though, I'm self employed so it boils down to would anyone be interested enough in a "nice" API interface to buy it and make it worth my time developing. I wondered if anyone here had any thoughts or even might be interested in a finshed product?

 

Phil

Export controller from PP to AE

$
0
0

Hello,

Is there any way to developed export controller for After Effects, like the same for Premiere ?

Or, can be used the export controller *.prm in AfterEffects ?

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.

Viewing all 73444 articles
Browse latest View live


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