Intercept command
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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...
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
OMFG!!!!
you killed me with the name and logo (and hysterical movie)!!!!
dude! you made my day!
😄
Copy link to clipboard
Copied
Hi Shachar!
I manages to intercept AE's command, but it works a bit too well...
When user calls "free transform", I can do what ever I want, except "free transform".
Is there a way to give the control back to AE when Cmd 's been intercepted?
(I set AEGP_HP_AfterAE, but it doesn't change anything...)
Cheers,
François
PS: registration code is coming...
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thanx!

