Monday, March 22, 2010

Is it possible to delete an Effect...

Hello,

Let me explain My problem.

I have developing an Effect plugin, ''MyEffect'' .

This effect has one UI + defualt ''About'' and ''Reset'' buttons + one ''Remove '' ( Which is a ''Options...'' ) button.

The ''Remove'' button functionality is: When I click on ''Remove'' button, the ''MyEffect'' effect should remove from the Layer/Composion.

The plugin EntryPoint function is called with a command ''PF_Cmd_DO_DIALOG'' clicking on ''Remove'' button. Here I want to remove this ''MyEffect'' effect from Layer/Comp.

So, My question is, Is it possible to delete/remove an effect sitting on the same effect plugin c++ code?

Hope, you understand the problem!.

Is it possible to delete an Effect...

no, it's impossible to do from within the effect itself.

you'll get an error on AE7 and a crash on CS3.

but I believe you'll find the solution pretty familiar...

that separate AEGP of ours?

leave it a message along with the layerH and the effect index of the effect you want to delete,

and the AEGP will delete it during the idle hook.

I don't see any other way to do it. (without causing a crash, of course).

Is it possible to delete an Effect...

Hi Shachar,

Thanks for your reply!

%26gt;%26gt;聽聽聽聽 that separate AEGP of ours?

Not getting the above line in your prevoius msg.

Actually My question is, ''Is it possible to delete an Effect sitting on the same effect plugin c++ code?'', wrong.

What exactly I want is...

I'm developing an effect plugin, that execute 2 scripts.

-聽聽聽聽 one script is for applying an effect ( we are discussing this issue in onother thraed, you already knew it. )聽聽聽聽 and

-聽聽聽聽 other script is for removing an effect

When I click on ''Remove'' button, the second script should executes and it removes the applied effect from the Layer/Comp.

I'm just guessing that, 3 plugins are required to solve this problem.

Plugin1:聽 Create UI + call plugin2 + call plugin3

Plugin2:聽 Execute the script1 ( i.e., apply the effect )

Plugin3:聽 Execute the script2 ( i.e., remove the effect )

am I correct?


no matter how you turn it around,

an effect can not delete itself.

why is that?

because it's exit data refers to a no longer existing effect.

crash, burn, screams, horror.

the only solution (that i know of) is to get another effect or script to do

that for you,

and to do that when that effect (or any other effect in the same stack) is

NOT in use.

if you want your ''options'' button to delete your effect, then you should

create a system in which the effect calls a different effect or AEGP,

that will delete the calling effect AFTER it finished processing and exited.

you can do that in the same way we discussed launching scripts. (or am i

confusing you with someone else?)

No comments:

Post a Comment