~ubuntu-branches/ubuntu/intrepid/blender/intrepid-updates

« back to all changes in this revision

Viewing changes to release/scripts/collada_export.py

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2008-08-08 02:45:40 UTC
  • mfrom: (12.1.14 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080808024540-kkjp7ekfivzhuw3l
Tags: 2.46+dfsg-4
* Fix python syntax warning in import_dxf.py, which led to nasty output
  in installation/upgrade logs during byte-compilation, using a patch
  provided by the script author (Closes: #492280):
   - debian/patches/45_fix_python_syntax_warning

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
"""
9
9
 
10
10
__author__ = "Mikael Lagre"
11
 
__url__ = ("blender", "elysiun", "Project homepage, http://colladablender.sourceforge.net", "Official Collada site, http://www.collada.org")
 
11
__url__ = ("blender", "blenderartists.org", "Project homepage, http://colladablender.sourceforge.net", "Official Collada site, http://www.collada.org")
12
12
__version__ = "0.4"
13
13
__bpydoc__ = """
14
14
Description:
51
51
_ERROR = False
52
52
 
53
53
try:
54
 
    import math
55
 
except:
56
 
    print "Error! Could not find math module"
57
 
    _ERROR = True
58
 
 
59
 
try:
60
 
    import Blender
61
 
    from Blender import *
62
 
except:
63
 
    print "Error! Could not find Blender modules!"
64
 
    _ERROR = True
65
 
try:
66
 
    from xml.dom.minidom import Document, Element, Childless, Text, _write_data
67
 
except:
68
 
    print "\nError! Could not find XML modules!"
69
 
    _ERROR = True
 
54
        import math
 
55
except:
 
56
        print "Error! Could not find math module"
 
57
        _ERROR = True
 
58
try:
 
59
        import Blender
 
60
        from Blender import *
 
61
except:
 
62
        print "Error! Could not find Blender modules!"
 
63
        _ERROR = True
 
64
try:
 
65
        from xml.dom.minidom import Document, Element, Childless, Text, _write_data
 
66
except:
 
67
        print "\nError! Could not find XML modules!"
 
68
        _ERROR = True
70
69
 
71
70
if _ERROR:
72
 
    from sys import version_info
73
 
    version = '%s.%s' % version_info[0:2]
74
 
    print """
 
71
        from sys import version_info
 
72
        version = '%s.%s' % version_info[0:2]
 
73
        print """
75
74
This script requires the xml module that is part of a
76
75
default standalone Python install.
77
76
 
87
86
make sure Blender's Python interpreter is finding the standalone modules
88
87
(run 'System Information' from Blender's Help -> System menu).
89
88
""" % (version, version, version, version)
90
 
    Draw.PupMenu("Error: missing module(s), please check console")
 
89
        Draw.PupMenu("Please install full version of python %t | Check the console for more info")
91
90
 
92
91
 
93
92
# === GLOBAL EXPORT SETTINGS ===
2743
2742
            
2744
2743
            # Gather data
2745
2744
            for curve in transformCurves:
2746
 
                curveName = curve.getName( )
2747
 
                value = curve.evaluate( time )
 
2745
                curveName = curve.name
 
2746
                value = curve[time]
2748
2747
                # print '%s: Time: %i Value: %f' % ( curveName, time, value )
2749
2748
                if ( curveName == 'LocX' ): translateXYZ.x = value
2750
2749
                elif ( curveName == 'LocY' ): translateXYZ.y = value