Blender (jusqu'à 2.49)
The "Import Paths" Script 
Version Française
    Main   Index
Previous Importing Bspline curves
Importing "AI" format Next

Warning concerning the group "import paths"

The scripts of the group "import Paths" are still in an experimental stage and do not always give the expected results.  The word "Path" has not been chosen at random, that's really the only thing that is managed within the limits of the technical abilities of the Bézier's curves managed by Blender. 
 

"paths_import.py"

This source file, wich is located in .Blender/scripts directory, can cause a misunderstanding. If you try to launch it the usual way, that is to say "loading it in the text window" and doing "alt-p", you will obtain an error signaling  that the variable "fonctionSELECT" can not be found. And indeed, this variable is located into the modules "svg2obj.py, ai2obj.py, eps2obj.py", thus gimp2obj.py and paths_import.py are only used to call them according to the user choice. To do so, you have to go through the sub-menu Scripts/Import/Paths  that you can find in the scripts window.

The "Scripts" Menu

The "Import" Menu

The "Paths" Sub-menu

Calling a script from the sub-menu 
 

#!BPY

"""
Name: 'Paths (.svg, .ps, .eps, .ai, Gimp)'
Blender: 233
Group: 'Import'
Submenu: 'Gimp 1.0 - 1.2.5' Gimp_1_0
Submenu: 'Gimp 2.0' Gimp_2_0
Submenu: 'Illustrator (.ai) PS-Adobe-2.0' AI
Submenu: 'InkScape (.svg)' SVG
Submenu: 'Postscript (.eps/.ps) PS-Adobe-2.0' EPS
Tip: 'Import a path from any of a set of formats (still experimental)'
"""
 

For all the scripts, if you want them to appear in the Blender menus, their headers must begin with those five characters :

#!BPY
...

This expression tells the python's API that everything that comes after, within the space defined by triple inverted commas 

"""
...
"""

must be interpreted as a layout for a menu's hierarchy.

  • Name: 'text'
  • Blender: version number
  • Group: 'type'
  • Submenu: 'text' argument
  • ...
  • Tip: 'text'
Name, Blender, Group and Tip are obligatory. Text must be between single bracket  except for Blender. The text that follows Name will be displayed in the menu but do not have to be entered in a particular shape. The version number prevents blender from displaying the script name in another version than the one indicated. The  type that follows Group must exist into the corresponding version . In case of doubt, take 'Misc'  but avoid 'Help' which make appear this entry in the 'Help' menu only not in the 'Scripts' menu .

Submenu is optional and must be followed by a first free text that will appear within the menu and a second one that will be given to the script as if it was an argument in command line (look at the python documentation concerning the sys module and the argv property). 

As it is  indicated above, the modified script  must be saved in the .blender/scripts directory . 

Giving an argument to the "paths_import" script. 
 
Previous Importing Bspline curves
 Importing "AI" format Suivant
Vers le  Haut de page

Les questions concernant cette page  peuvent être posées sur  :
 news://news.zoo-logique.org/3D.Blender


 

 

Livre en français
Blender : apprenez, pratiquez, Créez, livre, Ed. Campus Press, coll. Starter Kit
Blender Starter Kit

Forum
FAQ
Lexique
Didacticiels
Compilations
Blender2KT
Débuter
Modelage
Blender python
Materiaux
Lumière
Animation
API python (eng)
Archives nzn
Statistiques
Doc flash Sculptris
Galerie Sculptris

mon site de démos sur youtube