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

How to create a interactive graphic in ScriptUI ?

Community Beginner ,
Mar 05, 2016 Mar 05, 2016

This is a ScriptUI panel,I want to know how to create the interactive graphic?

When I click the point in the graphic,it will be selected.

imge.png

TOPICS
Scripting
1.3K
Translate
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 , Mar 06, 2016 Mar 06, 2016
Translate
Advocate ,
Mar 05, 2016 Mar 05, 2016

You need to add a "mousedown" event listener: run over the vertex array and see if the mouse event occured close enough from a vertex (location of mouse event ev in widget system is : ev.clientX for x and ev.clientY for y).

One thing is that ScriptUIGraphics doesnt have a curveTo() method, so if you want to draw bezier curves like in the picture you'll have to implement it (like AE does, by splitting the curves into line segments, maybe not as many as in the comp viewer (32), 8 should be ok).

Feasable, but quite some work though...

Translate
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 ,
Mar 05, 2016 Mar 05, 2016

For these kinds of complex user interfaces, you should also consider using CEP panels. Since their UI is build with HTML5, you have way more flexibility (but it only works with recent AE versions).

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
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 Beginner ,
Mar 06, 2016 Mar 06, 2016

Ok, do you know where I can find the tutorials about this method ??

Or relevant guidance books in the Adobe website?

Thanks for your help !!

Translate
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 ,
Mar 06, 2016 Mar 06, 2016

For CEP panels, best start reading here:

CEP 6 HTML Extension Cookbook for CC 2015 · Adobe-CEP/CEP-Resources Wiki · GitHub

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
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
Enthusiast ,
Mar 06, 2016 Mar 06, 2016

Also you can keep an eye on Davide Barranca's book here:

HTML Panels book – Update (Dec 2015) | Photoshop, etc.

I hope he will release it soon.

Translate
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 Beginner ,
Mar 06, 2016 Mar 06, 2016
LATEST

Thank you my friends !!!!!!!!!

Translate
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