I am trying to estimate what it is about to develop something for Illustrator.
I have found Illustrator Developer Center | Adobe Developer Connection but it raises more questions that it answers.
1. What is a difference between a plug-in (which seems to be supposed to be written in C++) and an extension (which seems to be supposed to be written in HTML/JS)? What they are for / what is basically possible with them?
2. What languages are really supported?
I would say a plugin is a shared library loaded by Illustrator from the Plug-ins folder and an extension is something that is installed by the Extensions manager. A hybrid extension is an Extension Manager installer package that includes both a plugin and an extension.
3. Is there some more newbie friendly documentation that the one linked from the page?
Most of the documentation is not very newbie friendly.
4. We need to extend a path in Illustrator such that it adds two new anchors to each of the point on the path (I mean the points which are between path segments; so the point will have up to for points - one per each path segment starting from the point and two specific for our plug-in). Based on that (the path with points and segments, and our new anchors) we want to compute a new outline as a new layer (or in a user-specified layer). Is this or something like this possible? What would you suggest as the best extension points/strategy to achieve that?
Not sure exactly what you are trying to do, but you can almost certainly do it with a plugin, but may also be able to do it using scripting:
Hi Leo and Rick, we are willing to create something which will compute a path/region based on something the user already has drawn. For this we need to have a path (or set of paths) which is defined by a set of points, type of lines between and anchors defining these lines (for example, the most commonly used is cubic bezier line which is defined by two points and two anchors). Up to this, everything is fully available in each vector drawing application. However, on top of that, we need something special for our calculation. The special thing needs to be tied to each of the points (for example, it might be two more anchors, a line, a closed path) - one special data for each participating point.
Our code will use that information - that standard one and the special one - to calculate its output which will be separate from the input (it will be put in a separate layer). Our code should recalculate its output every time the input is changed or is just being changed (the user should have immediate feedback).
I am not sure about being compatible with the scripting approach as the redrawing should be triggered by changing the path, anchors etc. Basically, if the user draws anything on the canvas, our plug-in should automatically trigger and update its result. It also needs to make some decisions and alter its behavior based on them.
Hope, it is now more clear.
If you need to react to changes in the document then you need to write a plugin.
It's normally not a very good idea to try and update every time the user makes any changes to the document. I assume there will be some way of turning this off when a user wants to work on a normal document.
It might be better to have a recalculate results menu item/button or to recalculate the output whenever the user saves one of your documents.
Thanks for confirming we need to write a plug-in.
The user needs immediate feedback like if you are drawing a classic line or rectangle.
You can imagine that we are willing to draw a circle based on a point representing its center and a line representing its diameter. So we need a point and a line which is tied to the point (it is more like a metadata of the point). We are not going to do exactly this but the process is quite similar.
Would you please suggest how we can extend a point on the path such that it will have a line attached to it? Would you point me to the right object/property/event in the SDK which represents or provides what we are talking about? Thank you.
So you want to add your own drawing tools and you will be updating art drawn with these tools, but will not modify any art drawn with the standard tools?
You could do this using plugin art objects, see the LiveDropShadow sample. I think the problem with using plugin art is if you save a document and send it to someone who doesn't have your plugin it won't display properly.
To create a line you create a new art object of type kPathArt using AIArtSuite::NewArt and then use AIPathSuite::SetPathSegments to add the points to the path. You can set the stroke and fill properties of the line using the AIPathStyleSuite.
Use AINotifierSuite::AddNotifier to receive notification messages for notifiers such as kAIArtSelectionChangedNotifier or kAIDocumentChangedNotifier.
To create your own drawing tools use AIToolSuite.
Thank you, I'll check it out.