import os
import bpy
# http://blender.stackexchange.com/questions/5064/batch-import-wavefront-obj
# put the location to the folder where the objs are located here in this fashion
# this line will only work on windows ie C:\objects
#path_to_obj_dir = os.path.join('C:\\', 'objects')
path_to_obj_dir = os.path.join('X:\\', 'path_to_flver.obj')
# get list of all files in directory
file_list = sorted(os.listdir(path_to_obj_dir))
# get a list of files ending in 'obj'
obj_list = [item for item in file_list if item[-3:] == 'obj']
# loop through the strings in obj_list and add the files to the scene
for item in obj_list:
path_to_file = os.path.join(path_to_obj_dir, item)
bpy.ops.import_scene.obj(filepath = path_to_file)
replace 'X' with your drive letter and path_to_flver.obj with your .obj path.
You'll need \\ (instead of single \) for each sub directory.
dropoff wrote:Here is tool for converting map flvers to obj, with all materials and correct uvs (most of them), still have problem with some models that dont have lightmap uvs i believe.
Made using soulsformats c# library made by TKGP. https://github.com/JKAnderson/SoulsFormats
Usage: run tool and put path to folder with flvers you want to convert.
This is amazing!
It gets the models to OBJ pretty much instantly. Doesn't get textures as far as I can tell though.
Is it supposed to close after one action though? success or fail, the next key pressed closes the app?
dropoff wrote:Here is tool for converting map flvers to obj, with all materials and correct uvs (most of them), still have problem with some models that dont have lightmap uvs i believe.
Made using soulsformats c# library made by TKGP. https://github.com/JKAnderson/SoulsFormats
Usage: run tool and put path to folder with flvers you want to convert.
This is amazing!
It gets the models to OBJ pretty much instantly. Doesn't get textures as far as I can tell though.
Is it supposed to close after one action though? success or fail, the next key pressed closes the app?
You need to extract textures by yourself, it only does models. Also idk, never tried to press key while it works, it will say when conversion done.
dropoff wrote:
You need to extract textures by yourself, it only does models. Also idk, never tried to press key while it works, it will say when conversion done.
After it's done I mean. Success or fail, once it's completed one folder, it closes as soon as you press anything.
Wasn't sure if it's a bug, or if you just re-open the app to do the next folder.
EDIT:
I'm having a lot of trouble with the 'SoulsFormats' project; the enums in the script BinaryReaderEx.cs are coming up with "Constraint cannot be special class 'Enum'" and the build fails. Is there some setup guide or similar for opening/building/importing this?
dropoff wrote:
You need to extract textures by yourself, it only does models. Also idk, never tried to press key while it works, it will say when conversion done.
After it's done I mean. Success or fail, once it's completed one folder, it closes as soon as you press anything.
Wasn't sure if it's a bug, or if you just re-open the app to do the next folder.
EDIT:
I'm having a lot of trouble with the 'SoulsFormats' project; the enums in the script BinaryReaderEx.cs are coming up with "Constraint cannot be special class 'Enum'" and the build fails. Is there some setup guide or similar for opening/building/importing this?
It only works with 1 folder, so subfolders doesnt work and yeah after its done you need to run it again for other folder. Also you can ask author of soulsformats (TKGP) about it in souls modding discord server: https://discord.gg/mT2JJjx
So cool!
Can u send me stages that you get? I no have luck with my comp for dems maps.
Without fx and lights - I'll use it in keyshot
Just import map flvers
All +100500 files with map fragments? And then put textures in all one by one? I'll dead.
But like with tool you dont need to apply all by hands, like all materials applied, you just need to set path to textures in 3ds max after import, idk how to do it in blender though.
All +100500 files with map fragments? And then put textures in all one by one? I'll dead.
But like with tool you dont need to apply all by hands, like all materials applied, you just need to set path to textures in 3ds max after import, idk how to do it in blender though.
How exactly did you import the maps with correct coordinates by the way? your converter is awesome but way too much stuff comes out of place for some maps.
All +100500 files with map fragments? And then put textures in all one by one? I'll dead.
But like with tool you dont need to apply all by hands, like all materials applied, you just need to set path to textures in 3ds max after import, idk how to do it in blender though.
How exactly did you import the maps with correct coordinates by the way? your converter is awesome but way too much stuff comes out of place for some maps.
I just got coordinates from msb with msb editor and put into text file, then wrote simple max script to place models on them.