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

« back to all changes in this revision

Viewing changes to release/scripts/export_obj.py

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2007-05-17 11:47:59 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070517114759-yp4ybrnhp2u7pk66
Tags: 2.44-1
* New upstream release.
* Drop debian/patches/01_64bits_stupidity, not needed anymore: as of this
  version blender is 64 bits safe again. Adjust README.Debian accordingly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
from Blender import Mesh, Scene, Window, sys, Image, Draw
51
51
import BPyMesh
52
52
import BPyObject
53
 
 
 
53
import BPySys
54
54
import BPyMessages
55
55
 
56
56
# Returns a tuple - path,extension.
69
69
                return name.replace(' ', '_')
70
70
 
71
71
# Used to add the scene name into the filename without using odd chars
72
 
def saneFilechars(name):
73
 
        for ch in ' /\\~!@#$%^&*()+=[];\':",./<>?\t\r\n':
74
 
                name = name.replace(ch, '_')
75
 
        return name
76
 
 
77
72
global MTL_DICT
78
73
 
79
74
# A Dict of Materials
615
610
                orig_frame = Blender.Get('curframe')
616
611
                
617
612
                if EXPORT_ALL_SCENES: # Add scene name into the context_name
618
 
                        context_name[1] = '_%s' % saneFilechars(scn.name) # WARNING, its possible that this could cause a collision. we could fix if were feeling parranoied.
 
613
                        context_name[1] = '_%s' % BPySys.cleanName(scn.name) # WARNING, its possible that this could cause a collision. we could fix if were feeling parranoied.
619
614
                
620
615
                # Export an animation?
621
616
                if EXPORT_ANIMATION: