[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30665] trunk/blender/release/scripts/io/ import_scene_obj.py: bugfix [#22974] OBJ import arrives without texture
Campbell Barton
ideasman42 at gmail.com
Fri Jul 23 19:51:39 CEST 2010
Revision: 30665
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30665
Author: campbellbarton
Date: 2010-07-23 19:51:39 +0200 (Fri, 23 Jul 2010)
Log Message:
-----------
bugfix [#22974] OBJ import arrives without texture
Modified Paths:
--------------
trunk/blender/release/scripts/io/import_scene_obj.py
Modified: trunk/blender/release/scripts/io/import_scene_obj.py
===================================================================
--- trunk/blender/release/scripts/io/import_scene_obj.py 2010-07-23 17:48:16 UTC (rev 30664)
+++ trunk/blender/release/scripts/io/import_scene_obj.py 2010-07-23 17:51:39 UTC (rev 30665)
@@ -420,8 +420,7 @@
# Add an MTL with the same name as the obj if no MTLs are spesified.
temp_mtl = os.path.splitext((os.path.basename(filepath)))[0] + '.mtl'
- if os.path.exists(DIR + temp_mtl) and temp_mtl not in material_libs:
-# if sys.exists(DIR + temp_mtl) and temp_mtl not in material_libs:
+ if os.path.exists(os.path.join(DIR, temp_mtl)) and temp_mtl not in material_libs:
material_libs.append( temp_mtl )
del temp_mtl
@@ -435,11 +434,9 @@
unique_material_images[None]= None, False
for libname in material_libs:
- mtlpath= DIR + libname
+ mtlpath= os.path.join(DIR, libname)
if not os.path.exists(mtlpath):
-# if not sys.exists(mtlpath):
- #print '\tError Missing MTL: "%s"' % mtlpath
- pass
+ print ("\tError Missing MTL: '%s'" % mtlpath)
else:
#print '\t\tloading mtl: "%s"' % mtlpath
context_material= None
More information about the Bf-blender-cvs
mailing list