Copy link to clipboard
Copied
Hi
I'm making a ScriptUI panel. I have a icon button which is based on an png image I load:
var button = container.add("iconbutton",undefined, imagePath, {"style":"toolbutton"});
The image isn't a perfect square, so it contains transparent pixels. Problem is, when I click the button it gets the focus, and all that is transparent will be AE-blue until it looses focus again.
Is there a way to avoid this? I tried using the "active" property, but that didn't seem to do much.
If I just could control the focus on the button...
Any help is greatly appreciated,
Jakob
Unfortunately, you are in no luck here.
However, there are 2 options you can chose:
1. Either use GitHub - adamplouff/scriptui-battlestyle: Button options for ScriptUI, namely high high-density/retina icon buttons from…
2. Or look into my method of using image as a button instead of an iconbutton https://bitbucket.org/rendertom/_snippets_/src/master/After%20Effects/UI%20-%20Image%20mouseEvents.jsx
Hope that helps.
Copy link to clipboard
Copied
Unfortunately, you are in no luck here.
However, there are 2 options you can chose:
1. Either use GitHub - adamplouff/scriptui-battlestyle: Button options for ScriptUI, namely high high-density/reti...
2. Or look into my method of using image as a button instead of an iconbutton https://bitbucket.org/rendertom/_snippets_/src/master/After%20Effects/UI%20-%20Image%20mouseEvents.j...
Hope that helps.
Copy link to clipboard
Copied
Thank you Tomas! That helped a lot. Didn't realize you can put mouse events on an image.
Copy link to clipboard
Copied
Rendertom, thank you for your insight!
Have you used Plouff's script? I need helping extracting coordinates from my svg. Every which way I try, they are not in the correct format.
For reference here is the correct format:
["21.32 9.44 26.33 8.84 22.26 11.25 24.93 16.40 33.72 16.40 38.68 11.99 34 10.06 33.59 12.99 30 11.25 32.02 8.82 36.36 8.84 47 13 36 21 21 21 13 13 20 4 38 2 47 13 44.10 12.62 37.13 4.10 21.04 5.92 16.91 11.32”]
But here are my coordinates that I extract:
["M0,64.31V30.34L32.36,0l32.37,30.37v33.95H0Z”]