[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14015] trunk/blender/release/scripts: A small addition from macuno, if a full python install is not found when the

Tom Musgrove LetterRip at gmail.com
Sat Mar 8 22:20:37 CET 2008


Revision: 14015
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14015
Author:   letterrip
Date:     2008-03-08 22:20:33 +0100 (Sat, 08 Mar 2008)

Log Message:
-----------
A small addition from macuno, if a full python install is not found when the 
user trys to run the Collada import/export scripts then it requests they install
python (right now a user might be a bit mystified as to why the Collada importer
or exporter is giving an error.

Modified Paths:
--------------
    trunk/blender/release/scripts/collada_export.py
    trunk/blender/release/scripts/collada_import.py

Modified: trunk/blender/release/scripts/collada_export.py
===================================================================
--- trunk/blender/release/scripts/collada_export.py	2008-03-08 19:02:08 UTC (rev 14014)
+++ trunk/blender/release/scripts/collada_export.py	2008-03-08 21:20:33 UTC (rev 14015)
@@ -51,27 +51,26 @@
 _ERROR = False
 
 try:
-    import math
+	import math
 except:
-    print "Error! Could not find math module"
-    _ERROR = True
-
+	print "Error! Could not find math module"
+	_ERROR = True
 try:
-    import Blender
-    from Blender import *
+	import Blender
+	from Blender import *
 except:
-    print "Error! Could not find Blender modules!"
-    _ERROR = True
+	print "Error! Could not find Blender modules!"
+	_ERROR = True
 try:
-    from xml.dom.minidom import Document, Element, Childless, Text, _write_data
+	from xml.dom.minidom import Document, Element, Childless, Text, _write_data
 except:
-    print "\nError! Could not find XML modules!"
-    _ERROR = True
+	print "\nError! Could not find XML modules!"
+	_ERROR = True
 
 if _ERROR:
-    from sys import version_info
-    version = '%s.%s' % version_info[0:2]
-    print """
+	from sys import version_info
+	version = '%s.%s' % version_info[0:2]
+	print """
 This script requires the xml module that is part of a
 default standalone Python install.
 
@@ -87,7 +86,7 @@
 make sure Blender's Python interpreter is finding the standalone modules
 (run 'System Information' from Blender's Help -> System menu).
 """ % (version, version, version, version)
-    Draw.PupMenu("Error: missing module(s), please check console")
+	Draw.PupMenu("Please install full version of python %t | Check the console for more info")
 
 
 # === GLOBAL EXPORT SETTINGS ===

Modified: trunk/blender/release/scripts/collada_import.py
===================================================================
--- trunk/blender/release/scripts/collada_import.py	2008-03-08 19:02:08 UTC (rev 14014)
+++ trunk/blender/release/scripts/collada_import.py	2008-03-08 21:20:33 UTC (rev 14015)
@@ -64,6 +64,27 @@
     print 'Error! Could not find reader.Sax2 module'
     _ERROR = True
 
+if _ERROR:
+	from sys import version_info
+	version = '%s.%s' % version_info[0:2]
+	print """
+This script requires the xml module that is part of a
+default standalone Python install.
+
+To run the collada importer and exporter you need to have
+Python version %s installed in your system. It can be downloaded from:
+
+http://www.python.org
+
+Notes:
+- The minor (third) version number doesn't matter, you can have either
+Python %s.1 or %s.2 or higher.
+- If you do have Python %s installed and still can't run the scripts, then
+make sure Blender's Python interpreter is finding the standalone modules
+(run 'System Information' from Blender's Help -> System menu).
+""" % (version, version, version, version)
+	Draw.PupMenu("Please install full version of python %t | Check the console for more info")
+	
 import re
 
 #filename = 'C:\\test.xml'





More information about the Bf-blender-cvs mailing list