This is the internal styling toolkit for Battle Axe tools to get around the standard ScriptUI grossness. It's kinda hacky and utilizes a weird ScriptUI moveTo() method to draw single-color, straight-line vector, resolution independent icons buttons without the need for local files. If that's your scene then go crazy with it.
This is also my ScriptUI template to speed up the AE script setup process.
Download and drop it into AE's Scripts/ScriptUI Panels folder to test out the system with your own coordinates.
Copy and tweak buttonColorVector() in your own project. Arguments:
- parent object - ScriptUI panel or group
- vector string - SVG coordinates as string(s) in an array
- size - size array with the art dimensions
- static hex color string - #546E7A
- hover hex color string - #55869D (optional)
Copy the raw coordinates from an SVG file into an array of text strings. Feed this string into the buttonColorVector(). I like to store a bunch of icons in an object for added clarity.
var icons = { visibility: ['21. 9.44 26.3 8.84 22.2 11.2 24.9 16.4 33.7 16.4 38.6 11.9 10.0 33.5 12. 30 11.2 32.0 8.82 36.3 8.84 47 13 36 21 21 21 13 13 20 4 38 2 47 13 44.1 12.6 37.1 4.10 21. 5.92 16.9 11.3'] }
As far as I know, roll-over states are not possible. If you can figure it out then let me know. Roll-over states added in 1.1
Originally based on a super old post for drawing colored text buttons. [JS CS3/4] ScriptUI How to color a button ?
Apache 2.0

