diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-07-23 21:51:39 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-07-23 21:51:39 +0400 |
commit | 4e62175989cd438078a36ee82e903686c39e02db (patch) | |
tree | f9f3ffc6d69924f14d5f859b1e715862feefb104 /release | |
parent | d5346883dc0e8637815098c6e38cac7b12b5a27a (diff) |
bugfix [#22974] OBJ import arrives without texture
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/io/import_scene_obj.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/release/scripts/io/import_scene_obj.py b/release/scripts/io/import_scene_obj.py index 9bbb9124b60..5b29a5ded90 100644 --- a/release/scripts/io/import_scene_obj.py +++ b/release/scripts/io/import_scene_obj.py @@ -420,8 +420,7 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_ # 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 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_ 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 |