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>2009-04-10 18:33:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-10 18:33:52 +0400
commita412ce0702101628ac827d53465354c05fed7927 (patch)
treeef2fdd2d597363585c71f9b4bf0a910597e4a9da /release
parent4ff661c98985179bbfea89b3b23d9add13f85cb9 (diff)
strip indentation from lines of OBJ files.
OBJ's from VMD's molecular visualization program had this.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/import_obj.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/release/scripts/import_obj.py b/release/scripts/import_obj.py
index 42cdac4dc35..493354601a6 100644
--- a/release/scripts/import_obj.py
+++ b/release/scripts/import_obj.py
@@ -537,6 +537,7 @@ def get_float_func(filepath):
'''
file= open(filepath, 'rU')
for line in file: #.xreadlines():
+ line = line.lstrip()
if line.startswith('v'): # vn vt v
if ',' in line:
return lambda f: float(f.replace(',', '.'))
@@ -590,6 +591,7 @@ def load_obj(filepath, CLAMP_SIZE= 0.0, CREATE_FGONS= True, CREATE_SMOOTH_GROUPS
time_sub= sys.time()
file= open(filepath, 'rU')
for line in file: #.xreadlines():
+ line = line.lstrip() # rare cases there is white space at the start of the line
if line.startswith('v '):
line_split= line.split()