Copy link to clipboard
Copied
I want to get the position of the mouse when the user clicks in the comp window. I can get the mouse position using OS calls, but I want the relative position, exactly like PF_Param_POINT does it when you press that target button next to the parameter value.
I though about geting the size and position of the comp and then calculate the mouse position using the OS mouse calls, but I don't know how to get the position and size of the comp.
Another option would be to add a hidden PF_Param_POINT, and force the activation of the pick tool from the parameter, but I didn't find a way to activate it without user input.
Any ideas?
take a look at the "CCU" SDK sample project. it shows hot to get the mouse click location in the comp window coordinates, and how to convert those into layer source coordinates.
Copy link to clipboard
Copied
I don't think there's any chance of doing that since the viewer has it's own life and you don't know anything about how the panel is set up in the API.
Mylenium
Copy link to clipboard
Copied
take a look at the "CCU" SDK sample project. it shows hot to get the mouse click location in the comp window coordinates, and how to convert those into layer source coordinates.
Copy link to clipboard
Copied
Thank you Shachar, this is exactly what I want.