Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-09-01 18:13:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-09-01 18:13:48 +0400
commit39cb1432d8ab7c2263b3e4c5eeada5e25928938d (patch)
treed733b5292fdb36c32f35c771a18f3788a3cdfddb /release/scripts
parent81d9a3de4302e0d4722d75d727fbc9e9c626bd9e (diff)
bugfix [#23285] Exporters not available whel using special characters in path name
- ID properties now suopport non utf-8 strings for their values but not their keys. - moved utility functions into py_capi_utils.c from bpy_utils and bpy_rna. - import/export paths have to be printed with repr() or %r, so non utf-8 chars are escaped.
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/op/io_scene_x3d/export_x3d.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/release/scripts/op/io_scene_x3d/export_x3d.py b/release/scripts/op/io_scene_x3d/export_x3d.py
index dd8b9b2c5f6..d4188b79351 100644
--- a/release/scripts/op/io_scene_x3d/export_x3d.py
+++ b/release/scripts/op/io_scene_x3d/export_x3d.py
@@ -136,12 +136,12 @@ class x3d_class:
def writeHeader(self):
#bfile = sys.expandpath( Blender.Get('filepath') ).replace('<', '&lt').replace('>', '&gt')
- bfile = self.filepath.replace('<', '&lt').replace('>', '&gt') # use outfile name
+ bfile = repr(os.path.basename(self.filepath).replace('<', '&lt').replace('>', '&gt'))[1:-1] # use outfile name
self.file.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")
self.file.write("<!DOCTYPE X3D PUBLIC \"ISO//Web3D//DTD X3D 3.0//EN\" \"http://www.web3d.org/specifications/x3d-3.0.dtd\">\n")
self.file.write("<X3D version=\"3.0\" profile=\"Immersive\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema-instance\" xsd:noNamespaceSchemaLocation=\"http://www.web3d.org/specifications/x3d-3.0.xsd\">\n")
self.file.write("<head>\n")
- self.file.write("\t<meta name=\"filename\" content=\"%s\" />\n" % os.path.basename(bfile))
+ self.file.write("\t<meta name=\"filename\" content=\"%s\" />\n" % bfile)
# self.file.write("\t<meta name=\"filename\" content=\"%s\" />\n" % sys.basename(bfile))
self.file.write("\t<meta name=\"generator\" content=\"Blender %s\" />\n" % bpy.app.version_string)
# self.file.write("\t<meta name=\"generator\" content=\"Blender %s\" />\n" % Blender.Get('version'))
@@ -781,7 +781,7 @@ class x3d_class:
EXPORT_TRI= False,\
):
- print("Info: starting X3D export to " + self.filepath + "...")
+ print("Info: starting X3D export to %r..." % self.filepath)
self.writeHeader()
# self.writeScript()
self.writeNavigationInfo(scene)
@@ -879,7 +879,7 @@ class x3d_class:
self.texNames={}
self.matNames={}
self.indentLevel=0
- print("Info: finished X3D export to %s\n" % self.filepath)
+ print("Info: finished X3D export to %r" % self.filepath)
def cleanStr(self, name, prefix='rsvd_'):
"""cleanStr(name,prefix) - try to create a valid VRML DEF name from object name"""