Paint effect stroke shape to Shape layer shape via script
IWhen working with paint stroke effect, I usually like to paste the path info to a shape layer's path (as easy as go to the paint stroke path, then copy, and go to the shape layer path and paste.
BUT I'm trying to automate that a bit via scripting, so when the script is executed, it automatically copies that info of the stroke path value and paste into the shape layer's path value.
I was reading a bit here at the redefinery site but Im totally stuck, because I don't know how to use the stored data in the paintStroke array he mentions about, and paste into the shapePathData of a new created shape
(this is the code from the Redefinery article, just in case you can't click at the link)
do you have any ideas?
this post recalls me to an old quick adaptation I made of the exquisite Redefinery Script that converted masks to shapes, to make it work with paint brushes and shape layers. As I was in an animation project rush and I needed a quick tool for converting brushes paths to shape layers, I only could scratch the surface of the script, and I ended up copy-pasting the paths by hand.
The thing is, having this adapted script as a basis, maybe you can do the copypaste via scripting, copying from the brush path property array to the newly shape paths generated.
Im totally lost on that, so I can help more than that, I don't know how to go from the original paths, store their values, and paste on the duplicated paths in the shape layer ☹
Making that work would be a really handy tool I think! Any advice?
here is the quick script you can start from. Now it goes thru all the brushes of a solid, and makes a duplicated of them on a newly created shape layer, buuuuuuut they are empty (is handy to recreate the hierarchy btw)
Sorry I can't help more, but as your question was something similar to what I did, maybe is useful as a start until some real scripting expert can drive you onto a better direction 😃
I have no idea about how to achieve the copypaste thing via scripting, but as a hierarchy replicator as you said, it works :-D