alexander-ladygin / illustrator-scripts

Adobe Illustrator scripts
MIT License
971 stars 315 forks source link

Fillinger does nothing. #25

Closed silverrowan closed 1 year ago

silverrowan commented 1 year ago

Script options box appears, but nothing happens when "ok" is clicked (except options box going away). No error dialog, no changes in the illustrator file, CPU/GPU/Mem etc dont even increase. AI 2021 (ver 25.3 64bit), Windows 10 Pro 64bit.

opening up the editor there is a warning signs and info symbols, but i don't know how/where to fix these... ln 23: function declarations should not be placed in blocks. use a function expression or move the statement to the top of the [cuttoff from here] ln 31: a leading decimal point can be confused with a dot ".1" --> tried changing this to 0.1 ln 39: missing semicolon ln 74: function declaration.... lns 99, 106, 123, 124: missing semicolon ln 133 "too many errors. 31% scanned" and then no more cause it gave up I assume.

Errors that trigger before the options box show seem to work fine. If items are not paths it will throw the all items need to be paths error, if only one item is selected it will ask for 2 items to be selected.

silverrowan commented 1 year ago

Leaving this up in case anyone else has this issue, I figured out the problem by running the fill with circles script this is derived from - error 8705 was triggered, but not displayed. Nothing to do with the errors the script windows was showing.

All layers NEED to be unlocked (if still does nothing, try making them all visible too) to run this script, even if not affected (any idea why?).

To work around that without unlocking etc everything, move the images to a new document and run the script there and copy back into original document.

creold commented 1 year ago

@silverrowan Find the line groupItems = (groupResult.value ? activeDocument.groupItems.add() : false); And replace it with groupItems = (groupResult.value ? object.layer.groupItems.add() : false);

If the active (blue highlight) layer is locked, the script tries to add the group to it. The new line tells the script to add the group to the parent layer of the selected object, which is exactly unlocked.