• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Get mouse position on click in comp preview

Explorer ,
Jul 07, 2022 Jul 07, 2022

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?

TOPICS
SDK

Views

127

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 07, 2022 Jul 07, 2022

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.

Votes

Translate

Translate
LEGEND ,
Jul 07, 2022 Jul 07, 2022

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 07, 2022 Jul 07, 2022

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 08, 2022 Jul 08, 2022

Copy link to clipboard

Copied

LATEST

Thank you Shachar, this is exactly what I want.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines