~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to release/scripts/paths_import.py

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!BPY
 
2
 
 
3
"""
 
4
Name: 'Paths (.svg, .ps, .eps, .ai, Gimp)'
 
5
Blender: 233
 
6
Group: 'Import'
 
7
Submenu: 'Gimp 1.0 - 1.2.5' Gimp_1_0
 
8
Submenu: 'Gimp 2.0' Gimp_2_0
 
9
Submenu: 'Illustrator (.ai) PS-Adobe-2.0' AI
 
10
Submenu: 'InkScape (.svg)' SVG
 
11
Submenu: 'Postscript (.eps/.ps) PS-Adobe-2.0' EPS
 
12
Tip: 'Import a path from any of a set of formats (still experimental)'
 
13
"""
 
14
 
 
15
__author__ = "Jean-Michel Soler (jms)"
 
16
__url__ = ("blender", "elysiun",
 
17
"AI importer's homepage, http://jmsoler.free.fr/didacticiel/blender/tutor/cpl_import_ai.htm",
 
18
"Communicate problems and errors, http://www.zoo-logique.org/3D.Blender/newsportal/thread.php?group=3D.Blender")
 
19
__version__ = "0.1.1"
 
20
 
 
21
__bpydoc__ = """\
 
22
Paths Import imports paths from a selection of different formats:
 
23
 
 
24
- Gimp 1.0 -> 1.2.5;<br>
 
25
- Gimp 2.0;<br>
 
26
- AI PS-Adobe 2.0;<br>
 
27
- Inkscape (svg);<br>
 
28
- Postscript (ps/eps)
 
29
 
 
30
Usage:
 
31
    Run the script from "File->Import", select the desired format from the
 
32
pop-up menu and select the file to open.
 
33
 
 
34
Notes:<br>
 
35
    If the imported curve looks "messy", you may need to enter edit mode with the imported curve selected and toggle cyclic mode for it, by selecting all its points and pressing "c" or using the Curve menu in the 3d view header.
 
36
"""
 
37
 
 
38
#----------------------------------------------
 
39
# (c) jm soler juillet 2004, released under Blender Artistic Licence 
 
40
#    for the Blender 2.34 Python Scripts Bundle.
 
41
#----------------------------------------------
 
42
 
 
43
import Blender
 
44
 
 
45
argv=__script__['arg']
 
46
 
 
47
if argv=='SVG':
 
48
  from svg2obj import *
 
49
 
 
50
elif argv=='AI':
 
51
  from ai2obj import *
 
52
 
 
53
elif argv=='EPS':
 
54
  from eps2obj import *
 
55
 
 
56
elif argv=='Gimp_1_0':
 
57
  from gimp2obj import *
 
58
 
 
59
elif argv=='Gimp_2_0':
 
60
  from svg2obj import *
 
61
 
 
62
text = 'Import %s' % argv
 
63
Blender.Window.FileSelector (fonctionSELECT, text)