I have a question about working with pattern swatches. I am working on a script (attached) to randomly assign selected objects a color from the documents swatches. I have it working fine with gradient and color swatches but when it attempts to use a pattern swatch. I get the error:
java.lang.NoSuchMethodException: com.scriptographer.ai.Pattern.(int)
The code I tried to use is (among other things):
art.style.fill.pattern = randswatch;
I don't want to simply ignore the pattern swatches, I would really like the script to use them. When running the attached script, select the option to use document swatches and make sure you have pattern swatches in your document to replicate the error.
Anyone else run into this? anyone know how to use pattern swatches in this way?
Thanks in advance. Once I sort this issue, I'll be posting the working script,
Keegan