obj-import doesn't import textures

I’m using the obj_import v1.0 by Ideasman, and I have a little problem with importing textures correctly.

The images themselves are loaded correctly, and in textured-mode in the 3d view they are displayed. But in the texture-menu they are not accessible because they all get the name Kd (Kd, Kd.001, Kd.002 and so on), and hence not rendered.

I guess the problem is somewhere in this lines of the script


			elif l[0] == 'map_Kd':
				img_fileName = ' '.join(l[1:])
				loadMaterialImage(currentMat, img_fileName, 'Kd', MeshDict, dir)

But as I don’t know Python I have no idea what to do about this.

Can anyone help?

please

  1. Download the latest blender and latest OBJ exporter from my page and test.
  2. If it dosent work still then send me the files so I can check.
    cbarton _ a t _ metavr.com

I’ve used the latest version with both 2.37a and 2.40 a2, with the same results. I’ll send you a test file tomorrow, I have to create a new one as this is over 10 MB big.

Thanks for your help!

OK this is really confusing but here goes anyway:

I downloaded the above referenced file-its a 31kb file and inside it says v1.17
dated 2004/12/12.

I opened the same file in Blender 2.37 and it is a 26kb file that says v1.20 dated 2005/06/12.

For 2.4a2 its a 31kb file v1.22 dated 2005/10/11.

I exported the object file (Phf from Project Human) with standard parameters from Poser 6 which produced an obj and a mtl file and I put these in the same file as the relevant textures.

None of the above would import correctly.

Now I have loaded up a script called obj_io_modif236 from jms site mentioned elsewhere in the forums and that ran without errors (there is a note inside about uv).

But then there are other seemingly later versions 236d and 236e which produce error messages about more than 16 materials.

To further confuse the issue the name of the script installed with Blender is
obj_import which shows up in the Import menu as Wavefront and the new script shows up as OBJ!

We newbies havent a hope.

I dont yet know enough about Python but it seems the best bet is to use the 236 script and manage somehow from there but perhaps wiser minds than ours could comment…?

Edit-Aargh! Now I found a 236f but that does not work either, something about an overflow error.

I’m currently working on a new version of the obj_io script based on the 236d version .

jms, merci beaucoup! Glad you found some time.

While I am waiting I am going to experiment with PoseRay:-

http://mysite.verizon.net/sfg0000/

It claims to support Daz and Poser Scenes to POVRay and to export Wavefront OBJ for use in “other applications”.

Not sure to understand your project ?

Sometimes I need to bring Poser and Daz things into Blender and then out again.

I want your new script.

But I can try Poseray while I am waiting (I think).

this week-end perhaps …

Yes s´il vous plait!