Sg2.9
tabletData causes Illustrator...
Recent RSS
tabletData causes Illustrator to crash
From:  Squis
Date:  25. March 2007, 12:33

Any change on tabletData (be it "tabletData = ..." or "setTabletData(...)") causes Illustrator to crash. Not necessarily immediately, sometimes it waits until a new brush stroke is drawn.

Since I really want to make use of this possibilty, I'm looking into writing my own plugin. How do you access the stylus pressure with the AI Suites?

Re: tabletData causes Illustrator to crash
From:  Jürg Lehni
Date:  25. March 2007, 17:13

Could you please provide more information or a test case for me to reproduce the problem? I am using the feature a lot for my own work and have not run into such problems. It might be that you are setting too many values, or a sequence of values that is crashing Illustrator. In that case, it would also crash if you wrote your own plugin (something I cannot really recommend, btw).

Re: tabletData causes Illustrator to crash
From:  Squis
Date:  25. March 2007, 17:52

I have Illustrator CS 2 Tryout installed on my PC on Windows XP. I have installed Scriptographer 2.0.022. My script contains exactly one line:

activeDocument.getSelectedItems()[1].tabletData = activeDocument.getSelectedItems()[0].tabletData;

I draw 2 lines with the brush tool with my stylus (trying to make them look very different in width variation, so I can witness changes) and selct them both. I then select my script in the Scriptographer window and hit the play button. Sometimes one of the two selected lines receives a constant width (not the tabletData of the other line) - drawing another line with the brush tool then causes Illustrator to freeze. Other times Illustrator freezes immediately without changing one of the lines.

I thought this might be due to the tryout version, but I had the same problem on my computer at work.

The same problem occurs with more complex code like taper.js from Hiroyuki (see http://www.scriptographer.com/Forum/Wish+List/Control-Calligraphic-Thickness/).

If this problem does not occur on other computers (like yours, perhaps), it might be the different versions of Java Runtime Environment we have installed? Just a guess.

Yes, learning how to create my own plugins by going through Adobe SDK is currently blowing my mind, but it's a lot of fun too :D

Re: tabletData causes Illustrator to crash
From:  Jürg Lehni
Date:  25. March 2007, 20:41

I just tried this out on my Mac: It works perfectly here. I doubt it has something to do with the version of the Java Virtual Machine, but maybe it is linked to the kind of stylus data your tablet produces? Would you mind providing me with an example file that actually crashes Illustrator? I will also try it out on PC later on, to see if that makes a difference.

Re: tabletData causes Illustrator to crash
From:  Jürg Lehni
Date:  26. March 2007, 04:32

Ok, I managed to reproduce the problem on PC CS2, and I already found a fix for it. As so often, the problem was not in the SG code, and the fix required a work-around that seems to satisfy CS2. This will be fixed in 2.0.023.

Re: tabletData causes Illustrator to crash
From:  Squis
Date:  26. March 2007, 05:41

You, sir, are my hero. When will 2.0.023 be coming out?

Re: tabletData causes Illustrator to crash
From:  Jürg Lehni
Date:  26. March 2007, 05:53

As I just fixed the other open bug as well (setting text style leads to crash), I expect it to be ready these days.

Re: tabletData causes Illustrator to crash
From:  Squis
Date:  29. March 2007, 20:21

It's working! Super! Thanks a lot! This will save me mounds of time.

I'm currently trying to find out how to apply the actual brush from one stroke to another. Say I've got a line drawn with the brush tool and one with the pencil tool. Is there a command to tell scriptographer "apply the brush from the one line to the other"?

Also: I can easily apply the stroke color from line line to another. Except for when the color is a global color, in which case the receiving stroke gets no color. Apparently this is because Scriptographer sees global colors as "null" (according to print()).

Re: tabletData causes Illustrator to crash
From:  Jürg Lehni
Date:  30. March 2007, 01:16

Hi Squis,

Good to hear it works for you now!

The brush thing is on the list of things to do. It is a feature that Adobe does not expose in their SDK, but I actually got them to send me the missing private header file (not sure I'm allowed to tell here). So expect that to come soon, similar to the way gradients, symbols and swatches work. And a donation allways helps to speed things up!

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
Phyllotactic Spirals 25.03.11