Quantcast
Channel: Adobe Community : Unanswered Discussions - After Effects
Viewing all articles
Browse latest Browse all 30854

Get mouse position during Custom UI Draw event?

$
0
0

I am building a Custom UI for one of my plugin effect.

I want to get the mouse position during the Custom UI Draw event (PF_Event_DRAW), but cannot manage to get it.

 

From what I understand, it seems we can only get the mouse position during the events PF_Event_DRAG, PF_Event_DO_CLICK, and PF_Event_ADJUST_CURSOR.

 

I tried to use PFAppSuite4::PF_GetMouse() too, but this resulted in the error message "After Effects error: internal verification failure, sorry! {PF_GetMouse can only be called during valid events.}".

 

Therefore I want to store the mouse position during PF_Event_ADJUST_CURSOR, and use it later during PF_Event_DRAW.

Where can I store those values in a "clean" way (ensuring there will not be conflicts if two instances of the same effect are running, etc)?

 

Or is there an easier method to get the mouse position during a Custom UI Draw event?


Viewing all articles
Browse latest Browse all 30854

Trending Articles



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