I played around with the code some and got it to work with build 35367.
Here is it is, attached, if anyone wants to try. See instructions earlier in this thread.
I played around with the code some and got it to work with build 35367.
Here is it is, attached, if anyone wants to try. See instructions earlier in this thread.
Only just found time to give the script a go. Iāve tried it on both Mac OSX version 33949, 34904 and neither load after manually installing the add-On files in the Preferences panel. Please donāt give up this will be a very useful feature.
What makes this so great is that you can quickly animate a 2D drawing by adding a few bones and have all the advantages of 3D. Another more advanced feature would be if blender could reference the ā.aiā file and its layers so that any changes would get update in the 3d blender scene. That would get a lot of broadcast designers drooling
j-mation: Did you use the script I just posted (io_vector.zip.blend) or the earlier one? Do you mean that it showed up in the preferences panel and you were able to tick the flag to say to load it, but then you were not able to convert an AI or PDF file, or did the first step fail? If the first step (checking the box) succeeded, were you able to see an āAdobe Illustrator or PDFā file entry under the File > Import menu? Did you restart Blender after ticking the box?
howardt, I tried the script and it worked great on r35333! This is awesome to have, I felt almost giddy being able import an AI file without having to do anything else with it!
A few suggestions. I tried importing a couple logos which would come in pretty good. The mesh faces are somewhat of a nightmare though if you choose too many sub-divisions.
My suggestion would be to maybe offer option to import as mesh or curves (instead of just mesh). I did a comparison below of using your script, then using the import SVG script. With the SVG import it comes in a as curves, which I then use that amazing āConvert Curves to even meshā script that I linked to earlier in this thread. https://github.com/decden/Blender-Curve-to-Uniform-Mesh
The curves to mesh script does a pretty damn good job of keeping most triangles out of the mesh. Iām sure you donāt want to write the functionality of that script into yours, but itād be nice to have the option of curves.
Did I say thank you again? Thank you thank you thank you!!!
Yep that is the script Iām using. I have also just downloaded and tried version 35382 with no luck. It doesnāt show up in the preference panel at all in any of the versions I have tried. I donāt think it is installing correctly. When I choose to install an add-on from the preference panel with all other add-ons Iāv downloaded I can only install it once as it will say the add-on is already installed. However with this plugin I can just keep adding it and no message ever appears to say that I have installed it already.
@j-mation, try copying the file manually to the scripts/Addons directory, donāt using the āinstallā button. When you copy the files into the right directory it should show up in your preferences.
On a mac it should be this:
/Applications/blender253/blender.app/Contents/MacOS/2.56/scripts/addons
You need to copy the entire folder (io_vector).
[QUOTE=crazycourier;1801466]@j-mation, try copying the file manually to the scripts/Addons directory, donāt using the āinstallā button. When you copy the files into the right directory it should show up in your preferences.
On a mac it should be this:
/Applications/blender253/blender.app/Contents/MacOS/2.56/scripts/addons
I tried this and it works however I would really want it to work through the preference panel as I like to keep all the add-ons in a different location so that when I change versions which is often I donāt have to search for all the add-ons.
I have done a quick test and found that the script is slow but gives good results compared to the svg import. Check the problem area with the svg import below.
Iām not sure Iām following you, copying the scripts to that directory is basically the same thing as clicking āInstall Add-Onā? It still only works if you enable the add-on via preferences. They both do the same thing, only Iāve found the install button doesnāt always work on every script.
If you want to keep your scripts separate, goto user preferences > File > Scripts. You can then specify whatever folder you want to use for your scripts.
I didnāt realize it copied the script to the add-on folder I though it referenced it location. Hmmā¦ that is something that needs to change in the future. Not your problem of course. A much better system is to keep this reference link in a config file so it doesnāt matter what version you are running it simply looks at the config file and loads all the compatible add-ons.
Anyway back to howardt very useful add-on. Any chance of getting a few features added.
Thanks so much crazycourier and j-mation for trying it and for the feedback.
j-mation: I think the āinstall addonā button on preferences only works if the addon is a single python file. Mine is a directory with several files. Thanks crazycourier for diagnosing what was wrong and helping j-mation to be able to see the plugin.
And yes, I am willing to hear feature requests and perhaps act on them. One feature that I am working on is the option to extrude and bevel.
crazycourier: Honestly, it would be just as easy or even easier for me to add a ādivide evenlyā option to my importer than to figure out how to import into curves, so Iād prefer doing that. I will try to do a ādivide evenlyā for my next update.
But right now I have another update (version 0.3), attached. This one has more options:
latest version works fine here.
I know this might be to much to request but these feature would make it far more useable than the svg import. The features I would love to see would be:
-Basic colour
-An option to select which layers to import
-An option to create groups from Illustrator layers
-An option to separate the created groups in z distance apart
-The ability replace a group in blender with a layer inside an ā.aiā file.
The color and z-distance spread ones are easy, and I can do soon.
The layers-related ones might be harder - it requires an understanding of the structure of an .ai file that up til now I havenāt needed because at base they are just Postscript or PDF. So I can probably figure out how layers are done with the latest Illustrator (I have CS5) but not sure how many other versions it will work for, and it presents the need-to-keep-up-with-Illustrator problem. I also have to learn how to make groups in Blender, but I expect that thatās easy.
Thanks for trying the latest version.
Here is another version, 0.4.
This one has three options for dividing the curves, now in a dropdown box:
Uniform - just divides each curve in half a set number of times (the āsmoothnessā #)
Adaptive - divides each curve in half until āflat enoughā - which depends on the āsmoothnessā #
Even - divides curves and lines to make approximately equal length segments (shorter segments as āsmoothnessā # gets bigger)
(For Uniform and Adaptive, you donāt want to make the smoothness # too big - not more than 3 or 4, say - else it will take a long time to import. For Even, the effect of increasing smoothness is more gradual and you might want to use a number like 10.)
It also has rudimentary support for colors - if you check the ācolorsā option, it tries to use the fill colors from the input file to color the polygons. It doesnāt always work yet, but it does sometimes (there are lots of ways of specifying colors and I donāt handle them all yet).
I havenāt yet looked at how to recognize layers in AI files.
I also made a web page to describe this (and eventually, other plugins), and I plan to keep the latest version download there.
This is excellent stuff, howardt ā thank you!
Iāve been fiddling with the curve-to-mesh script, and in general I can get better results with that one, although my feeling is that this addon can do just as well. The main difference is that curve-to-mesh gives you immediate feedback, while this script requires that the settings be adjusted before execution.
Iām no coder, so forgive the ignorance: how difficult is it to get some kind of visual feedback as we adjust the settings? The settings would be in the 3D window, not the open-file windowā¦
Thanks for trying it benu. I too would like what you are asking for, and will look into how to do that. Iāve seen one example of how to do it, but it didnāt involve a file chooser, so it may or may not be easy to copy.
Here is another version, 0.5. This one attempts to do what benu asks, but it is imperfect - you have to select a file from the properties, and after you choose one, you have to change a parameter to see something happen.
Also in this version is a first attempt at extrude and bevel options. The bevel is āsmartā in that it isnāt confused by, e.g., serifs on letters. E.g.:
Oh, yea! Just started fiddling with it. This is GREAT! I also get feedback on results if I change the Subdivision methods; so the differences are immediately apparent. LOVING IT.
The bevel feature is awesome as well. This addon is a huge step forward for bringing complex illustrator files to life in Blender.
One possible feature that might be useful (and hopefully not too difficult to implement!) would be an option to cap both ends when extruding. Thanks, howardt!
Thanks again for the feedback, benu. Indeed, it will not be hard to add an option to cap the back too when extruding.
Been using this addon extensively for the past several hours (perfect timing for a project Iām in the middle of). Here are some additional thoughts:
It would be great to have feedback on the vertex/face count. Blender will give me feedback on the entire scene, but it doesnāt seem to do it for the individual object while using the addon. (Something like āVe:280 Fa:184ā like Blender already uses.) It turns out the āEvenā division usually produces the fewest vertices with the best results (IMO).
The addon keeps renaming stuff! If I import ācar_red_top_view.aiā it renames the object to āCar Red Top View.ā I am renaming every file I import, because I need to keep the underscores and lowercase lettersā¦
When importing an AI file, I first have to change one of the parameters before the mesh appears. Itād be nice if the preview happened automatically after selecting a file (or maybe a ālive previewā checkbox or something ā I can see why someone might not want to have a preview but simply execute).
Occasionally, the addon stops working after a while (I can run through the movements, but no mesh is created). If I create a new .blend file, it will work again. Iāve been trying to nail down exactly what causes this, but havenāt been able to isolate it yet. Iāll keep you updated. My gut feeling is that it has something to do with the final execution of the script (which I have been doing by tabbing in and out of Edit mode): I suspect that Iām forgetting to commit the addon, then do something else. Working on itā¦
Iād like to compare this with the curve-to-mesh addon, but for now this addon is working great for my needs. Iāll definitely let you know when I am able to compare the two addons. Thanks again!
Thanks again benu for your great testing and suggestions.
This seems like it should be very easy to add as a label in the properties panel.
- The addon keeps renaming stuff! If I import ācar_red_top_view.aiā it renames the object to āCar Red Top View.ā I am renaming every file I import, because I need to keep the underscores and lowercase lettersā¦
I canāt even imagine where it is getting the name from. Iāll investigate.
- When importing an AI file, I first have to change one of the parameters before the mesh appears. Itād be nice if the preview happened automatically after selecting a file (or maybe a ālive previewā checkbox or something ā I can see why someone might not want to have a preview but simply execute).
This is a bug. What I want to happen is that when you select the menu item, it goes straight to the file selector, and after you hit the import button on that, it does the first import but leaves the settings up for further tweaking. Second best would be the current behavior, where you have to select the file-selecting icon in the panel after doing the menu select - but then the very act of selecting a file should be enough to cause the first import, and it isnāt. This seems to be a bug in Blender [thanks Domino, who helped with this on another thread], but I will continue to try to find a workaround.
Occasionally, the addon stops working after a while (I can run through the movements, but no mesh is created). If I create a new .blend file, it will work again. Iāve been trying to nail down exactly what causes this, but havenāt been able to isolate it yet. Iāll keep you updated. My gut feeling is that it has something to do with the final execution of the script (which I have been doing by tabbing in and out of Edit mode): I suspect that Iām forgetting to commit the addon, then do something else. Working on itā¦
If you can narrow this down some, let me know. I havenāt run into this problem myself yet.
Iād like to compare this with the curve-to-mesh addon, but for now this addon is working great for my needs. Iāll definitely let you know when I am able to compare the two addons. Thanks again!
Youāre welcome. It is great to hear that this is of use to someone.