Skip to main content
françois leroy
Inspiring
July 15, 2013
Question

Intercept command

  • July 15, 2013
  • 1 reply
  • 1412 views

Hi!

I've written a plugin (effect) to control MaskShapes instead of AE.

I already have a button in my plugin, to switch between 2 options: 1_Mask controls effect, 2_Effect controls mask.

Now I'm trying to intercept the following command: Free Transform (ctrl + t).

If I get the call, switch to option 1, when Free Transform is over, switch back to option 2.

So, here are the issues:

First, how to get the call? (I tried to handle PF_Event, but no result for the moment...)

More tricky, how to know when user stops Free Transform, as effect isn't selected anymore?

If anyone has the beginning of a clue, I'm highly interested!

Thanx,

François

Note: I found a work around by script and executeScript, but I was wondering if there is a more reliable way through SDK.

Ce message a été modifié par: françois leroy

This topic has been closed for replies.

1 reply

Community Expert
July 16, 2013

AEGP_RegisterCommandHook() is the way to go.

you can initially request all commands to report to you, until you zero in on the commnads that are of interest to you.

i don't know if such commands are reported, but hey, if you don't try, you won't know.

p.s.

AEGP_RegisterCommandHook() might only work for AEGPs...

françois leroy
Inspiring
July 16, 2013

Thanx Shachar!

As usual, you're the man with an answer... you should write a book!

Cheers,

François

PS:

Here's a link to my plugin:

http://aescripts.com/bao-mask-avenger/

I made it thanx to your help! So I'd like to give you a free registration code (if you're interested).

Do you have a personnal e-mail or a place I can upload it?

You can send me an answer here: frankoue@yahoo.fr

françois leroy
Inspiring
July 18, 2013

i think you're supposed to report back whether you've handled the event or

not.

if you report back "false" AE will handle the command itself, regardless of

any operation you have done during that call.


Thanx!