OBJs and PBR Materials

This is a tough one
As many of you know, OBJ is a very old format and does not support PBR materials: that means that after importing an OBJ only the diffuse and bump maps are correctly loaded (if the MTL file is correctly formatted). All metallic, roughness, glossiness, emissive, and (if i'm not wrong) even opacity maps must be tediously manually reapplied.
This process sometimes can be VERY time-consuming and, as i've said before, tedious.
So i've decided to waste even what little spare time and sanity i have left, and bring out the programmer in me:
my goal is to write a DAZ script that (conceptually) does this:
- loop through all the surfaces of the object/s
- search (for each one) in the MTL file if there's a corresponding "entry" (comparing the names/titles)
- if so, read all the MTL defined maps (like "map_Kd", "map_Ns", "map_Bump" etc.)
- take the map/s and apply them to the target surface
- enjoy!
Advices? Tips? Directions? Do you think is feasible or should i schedule an appointment with a psychiatrist?
Thank You in advance!
Comments
There are a couple of sample scripts dealing with materials http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/start#materials that may help. Other samples may help with reading the contents of the MTL or geting a list of files in a directoy so that you can study their names.