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

asset management for Plug-ins

$
0
0

After Effects performs certain kinds of asset management for a project. When you import an image or footage, the project keeps a file-reference to it, sometimes relative. You can "Collect Files..." and gather them all to one place. Handy!

 

Is there any way for a plug-in to get in on that action?

 

For my effect plugin "omino_python", which runs a python script to draw on a layer, I refer to external scripts.

 

It seems the best way to do this, for now, is use a custom parameter, or maybe options dialog, to select a file, and save the file path as parameter (or options) data.

 

Is there a way to find the project's path? Then the file path could at least be relative. It seems best to NOT save the whole script as parameter data; I want the user to own their own files for revision control and what not.

 

What I'd love is a PF_Param_FILE_ASSET type, and let AE manage it. Be part of the "Collect Files..." club. Is there anything sort-of close?


Parameters' expanding in Timeline window

$
0
0

When i'm trying to unhide any hidden plug-in's parameter with

ERR(suites.DynamicStreamSuite2()->AEGP_SetDynamicStreamFlag(some_streamH,           AEGP_DynStreamFlag_HIDDEN, FALSE, false));

plug-in's properties in Timeline window are expanding. The same thing i've found in "Supervisor" (SDK 5.5's example plug-in)

 

Before "unhide"

before_.png

after "unhide"

after_.png

 

I've tryed to use

PF_ParamDef     pCopy;

pCopy = *params[UNHIDDEN_NUM];

pCopy.flags |= PF_ParamFlag_COLLAPSE_TWIRLY;

suites.ParamUtilsSuite1()->PF_UpdateParamUI(in_data->effect_ref, UNHIDDEN_NUM, &pCopy);

 

but it doesn't affect.

 

Is there any ways to prevent Timeline's expanding?

Multiple renders slowing my plugin

$
0
0

Hey guys.

I use AE SDK to write a plugin for Premiere. I use my custom renderer to do OpenGL drawings. When I change current frame in Premiere - Render function is called about 30 times (full HD 24fps). Is that normal? I know that Premiere is multiprocessing application but it's just insane - because of that my plugin works really slow - in AE works like a charm. Is there any way to decrease renders number?

Refresh mask

$
0
0

Hi!

 

My plugin (effect) acts like an AEGP and performs Mask modification.

 

Everything works fine, but AE still shows the Mask before modification unless I deselect the mask... Is there a way to force refresh?

 

Note, I can't force "deselect" then "reselect", cos' the Mask computation needs the selection to be stable...

 

Thanx in advance,

François

Warning treated as error in VS2012. Any idea to fix?

$
0
0

When I build, I'm seeing some errors popup and they are all on lines where I am setting up checkbox parameters.  The compiler is throwing the following errors:

 

error C2220: warning treated as error - no 'object' file generated
warning C4244: '=' : conversion from 'PF_ParamValue' to 'PF_Boolean', possible loss of data

 

These are being thrown on any line where I have the following:

 

PF_ADD_CHECKBOXX(STR(StrID_Input_Required), true, PF_ParamFlag_CANNOT_TIME_VARY, PLG_REQUIRED);

 

I could turn off the error by removing the /WX flag during compiling, but do I really want to do that?  It seems like all would be okay if I did, but thought I'd post here to see if anybody had a suggestion as to why the `possible loss of data` error ocurrs.  Any ideas?

 

Thanks,

Arie

Using to Drawbot to render

$
0
0

Hi Shachar and everyone!

 

I have a simple question: is it possible to use Drawbot during the Render call and / or render what's drawn on the layer / comp?

 

Thanx,

François

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 default a parameter's twirly to be open?

$
0
0

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


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

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

Memory management issues

$
0
0

Hi All.I have a question regarding dynamic allocation in the SDK.I write a plugin which uses some code which allocates memory on  a heap with malloc.It crashes right after that.And inspecting the pointers to the AE data which I need to memcpy into that memory I see their are all reset.I have seen different examples where only SDK specific routines are used to allocate/deallocate the memory.Does it mean that C/C++ standard methods to work with memory cannot be used within the plugins?

What function should I use to composite two effect worlds with ADD mode?

$
0
0

how can I do it without iterate suit?

ADD mode means R = Ra+Rb, G = Ga+Gb, B = Ba+Bb, A = Aa+Ab

 

Is there a simple way to composite worlds in plugs-in just like what AE does?

Interlaced scanning video processing

$
0
0

Hi all,

 

I'm writing an Effect Plugin for AE CC to process 1080i50 video (shot by Sony PMW-TD300 Camera). And I'm confused about the mechanism of interlaced video rendering.

 

I expected the Render function to be called twice for a frame, and in_data->field should be either PF_Field_UPPER or PF_Field_LOWER, so I can process the upper field and the lower field seperatelly. But in fact, in debugging mode, when I change a parameter, or choose another time in the layer, the Render function is only called once, and the value of in_data->field is always 0 (PF_Field_FRAME). Can you explain what's wrong with my understanding? How should I process interlaced video in my plugin?


By the way, the footage information is as follows,

footage imformation.JPG

This means that the scan type of my footage is interlaced indeed, right?

 

Thanks a lot

 

Xiaonan

Refreshing HTML5 panel quickly?

$
0
0

I'm developing an add-on using HTML5 panels, and I am seeing the dockable panel, but currently the only way I found I can refresh the panel is closing it and then going to "window > extensions > my extension" to load it back, and that's really not as quick as pushing a keyboard shortcut.

I didn't find a way I can assign a keyboard shortcut to the custom extension, and using the workspace keyboard shortcuts to switch between a workspace with this panel and without this panel has a visual bug in which the content of the panel isn't rendering.

 

Any idea how quick-refreshing of the panel's content can be achieved?

Which function should I call to rotate a frame with axis-Y within Render()?

$
0
0

Hello there,I need to rotate a 3D frame data with axis-Y when PF_Cmd_RENDER was sent to my effect.Here is my idea,but I don't know which functions to call:

1,get each pixel's x,y,z in  PF_ParamDef (how to get z ? )

2,calculate the new pixel's x,y,z ( calculate new x,y,z by rotating old pixel with axis-Y )

3,create a new PF_EffectWorld,copy the old rectangle(left=oldx,right=left+1,top=oldy,bottom=top+1) to the new rectangel(left=newx,right=left+1,top=newy,bottom=top+1)

4,copy the PF_EffectWorld to PF_OutData

 

Can my idea work well,or any other solutions?

Thanks


How to get the selected layers?

$
0
0

Hi, how can I use the SDK to get a list of the layers which are selected by the user when the plugin is activated?

Apply my effect plugin only once

$
0
0

How can I prevent an effect plugin from being applied on a layer?

I would like my plugin to do nothing if activated a second time on a layer.

Thx

How to iterate 16bpc and 32bpc pixels directly

$
0
0

Hello all,

I want to iterate pixels directly, loop through, row by row, col by col. Now I can do it well with 8bpc pixels (I copied codes from the CCU example). But I don't know how to do with 16bpc and 32bpc pixels.

 

Is there a way to iterate 16bpc and 32bpc pixels without using the iterate suites ?

 

Thanks a lot.

Thi

Questions before writing my plugin

$
0
0

Hello everybody,

 

It has been some times now that I wanted to create a simple plugin to start with AE sdk...

I have a simple Idea That I would like to work on but first I would like to know if you think it would not be too complicated to make.

 

I am not a programmer but I haves basics in C++ and I am scripting in JS and usually ExtendScript for AE.

 

I want to create an effect wich would be applied on comps.

this effect would contain a dropdown list. this list would be filled with the names of the layers that are inside the comp where the effect is.

Selecting one would enable this layer and disable all the other layer. ( probably with AEGP_LayerFlag_VIDEO_ACTIVE if I understood correctly).

 

Creating the UI itself would be easy if I start from the UI example and strip it down.

by reading the documentation, it seems that selecting the items would be doable with  AEGP_ITEMSUITE however I dont find direct explanation of how to select items that are INSIDE the actual item. 

Is this actually possible?

 

I understand that all this is mainly noob questions but it would be very helpful if you could orient me a little bit.

 

thanks a lot.

Is there a way to get the layer comment?

$
0
0

Hi, Everyone.

 

I'm having a problem.

I can not find the API to get the layer comment.

Could you please teach me?

Viewing all 73444 articles
Browse latest View live


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