is there a python script that allows you to import object files? I mean the ones with the .obj extension or is there a better one to use that i can export and import from blender that allows multiple meshes to be exported and imported with or without materials and textures? Also if there isn’t away to get both the texture and material together with multiple meshes is there away to just get the meshes then beable to load a library of all of the mats and texs then reasigning them to the objects?
obj. import/export script was recently updated for 2.32. I know it’s lurking around here somewhere. a search should find it, if not, just go back page by page,…it’s probably no more than 3-4 pages back. i don’t know if it works with a python 2.33 install though, but it works ok for me in blender 2.33a if i recall correctly. sometimes it has problems with highly non manifold meshes though i have noticed. for instance it might not work properly on say, grass. good script though. also remember to stick your files you want to import in your root directory, because you have to type in the path manually, and that way you can get away with less typing.
at Blender.org, Ideasman have recently done one that reads the OBJ mtl file, and if both files are in same directory, the texture appears applied in Blender, I tested. Also, his importer does not need python installed I think.
Not sure about multiples meshes, you could always try.
here it is (the very latests links posted by ideasman at that thread) :
"Importer now imports inline ‘usemap’ keywords to assign UV textures, MTL export has changed a bit.
Bugfix where only the last object had materials applied to it was fixed.
Exporter now exports MTL files, as well as UV image textures.
Its now possible to export a large scene with materials and UV mapping/images
And import it- keeping all the properties supported by obj.
Please dont use the old OBJ I/O, these have some important Bugfixes.
Hope it helped,
i’ll see what i can get to work thanks! This is a big turning point for our game!
already have a question - do i just save the script and then open it in text editor then run it using alt-p? does it have it’s own gui or is it just once it is running then it adds import obj to my import menu?
no, not in your blender menu.
just hit alt p after loaded th epy file in text editor, like with any other python script.
I can’t remember now how was the gui, or ionly opens a file dialog.
Whatever, is very straight forward, you’ll see
you can also test this one too:
It works correctly with a lot of special .obj files like forester.arboretum, for instance.
thanx all! I am going to check it out right now and will be back to tell you the results!
i got them working but here is my situation - the textures aren’t applied just the materials (not that big of a deal as i already have to change the textures to uv ones and i think that it supports uv mapping when it exports and imports so i just have to reload the images). By second problem is that i it messses up the objects when it exports them and imports them. SOme are smaller, some are bigger, somer are longer, shorter, or skewed and stretched! I have decided that i will just try exporting each mesh invidually (which works) and then when i need to use them (cause it is just the weapons that don’t work) i will just load all of the object files and then put them back together and that should work! I will actually probably make a large blend file with all of the weapons in them and then when it come time to make a new map i will start with that blend and all of the weapons will be there already!
If anyone has another solution to this problem (something that imports and exports multiple meshes with their textures and materials) then that would be great!
from whatever the package you’re exporting from…in the export dialog settings, check the scale value is not set at other value than 1:1 or 1.0.
Something is been done wrong.
" SOme are smaller, some are bigger, somer are longer, shorter, or skewed and stretched!"
that last part is weird. It SHOULD NOT happen…
check your export ialog settings in th ether package…
also, for the textures appear applied…I think you actually need to:
put the *.OBJ file(s), the *.mtl file(s), and the bitmap *.bmp, *.jpg, whatever, ALL in the same folder, same directory.
that way I think I remember the script grabed it directly textured.
WHat do you mean!?! WHen i press ALt p to run the script all i get is a regular export file type menu of a directory. No setting are ther just a browser. About the texture thing - i had thought of that and i will try that out! Thanx though!