• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Paths with custom attributes and output

New Here ,
Oct 02, 2017 Oct 02, 2017

Copy link to clipboard

Copied

Hi,

I'm currently working on a plug-in using the Illustrator CC 2017 SDK.

I want a click-and-point behavior like the pen tool, as well as some additional behavior and attributes.

As of now I have played with the "Tutorial Line Tool" located in the SDK. The additional behavior I want is:

1. Close a path when you click on the first placed anchor(like how pen tool does)

2. Expand a path. That is, if you have a existing path, and would like to draw further on it. One important note is that I require the path to be closed. (Is this even possible with the pen tool?)

3. Custom color to each anchor

4. Produce a custom output/artwork (a mesh-like structure)

I have considered several approaches, but is unsure what is the best (or even if I have the best approach).

For point 1 and 2 I'm considering to take the artwork that the pen tool produce, and tweak it as necessary (with the PathfinderSuite and PathConstructionSuite)

For point 3 and 4 I'm currently quite blank. I have considered the ForeignObjectSuite, or to convert the result to a mesh using the MeshSuite as the output from my plugin will be a cubic mesh.

Any suggestions of the best approach would be much appreciated. Thank you. 

TOPICS
SDK

Views

503

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Oct 02, 2017 Oct 02, 2017

There's no way to assign colours to vertices in Illustrator (technically, there aren't even vertices, there are just segments), at least not in a permanent way. If you're content for the colour to persist through the UI only, that can be achieved via annotations (see AIAnnotation.h). In a nutshell, you'd have to draw whatever you want over top of the vertices in question. Alternately, you could make your paths into kPluginArt, which divides the rendering from the interaction, so you could theore

...

Votes

Translate

Translate
Adobe
Guide ,
Oct 02, 2017 Oct 02, 2017

Copy link to clipboard

Copied

There's no way to assign colours to vertices in Illustrator (technically, there aren't even vertices, there are just segments), at least not in a permanent way. If you're content for the colour to persist through the UI only, that can be achieved via annotations (see AIAnnotation.h). In a nutshell, you'd have to draw whatever you want over top of the vertices in question. Alternately, you could make your paths into kPluginArt, which divides the rendering from the interaction, so you could theoretically draw whatever you want using AI artwork for the rendering (thus colouring the art). That comes with a price however; there's a lot of work involved in kPluginArt. We have several uses of it,and it can be quite powerful, but there are a lot of things to work through.

Given #4, maybe the latter is the best option? It sounds like you want this to finish as some sort of artwork structure?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 02, 2017 Oct 02, 2017

Copy link to clipboard

Copied

LATEST

Thanks for your reply.

I'll definitively check that out.

I'll save the "vertices" in a custom data structure for later use (face creation and eventually rendering) so an annotation might be a possible solution.

Given #4, maybe the latter is the best option? It sounds like you want this to finish as some sort of artwork structure?

If I go for the kPluginArt it may be easier to add a new file format (AIFileFormatSuite) since I can customize the rendering, and thus I'm not limited to the methods the MeshSuite provides.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines