ai-scripts icon indicating copy to clipboard operation
ai-scripts copied to clipboard

SVG exporter stops after "Shop progressbar"

Open schroef opened this issue 2 years ago • 1 comments

I was looking for a neat function to check size of a selection. Then remembered your scripts and started testing the SVG-exporter. I noticed in the beginning it checks artboard names and see if they end with SVG. After testing this and adding .svg to a artboard. Nothing happens, actually the .svg part is stripped. If i understand that if statement correct. It checks if its equal to svg, yet that part is stripped and zero indices are returned here

schroef avatar Jul 04 '22 16:07 schroef

The scrtipt will never find artboards ending with .svg, i just noticed when you call 'getRandomNamedItems' it actually calls resetnames so the function 'getNamedArtboardsByIndex' will never find any artboard to export.

When i turn off the call for 'resetArtboardNames();' in the function 'getRandomNamedItems", it alls works like it should. It also keeps SVG in the artboard name, perhaps handy if something needs to be done. That way user doesnt need to add .svg to all ths artboards again

schroef avatar Jul 04 '22 16:07 schroef