OBJ Export Issue

Unable to export an obj file including mtl file and collected Mats folder.

I'm trying to export an obj for Blender with mtl file and Mats folder.  I can use the dialog, choose the correct options and it works fine.  If I dump the settings in code, they are all set correctly however using code, I get the obj file and no mtl file or Mats folder.   These are the settings I'm using:

    settings->setStringValue("Preset","Custom");
    settings->setFloatValue("Scale",50);
    settings->setStringValue("LatAxis","X");
    settings->setStringValue("VertAxis","Y");
    settings->setStringValue("DepthAxis","Z");
    settings->setBoolValue("InvertLatAxis",false);
    settings->setBoolValue("InvertVertAxis",false);
    settings->setBoolValue("InvertDepthAxis",false);
    settings->setBoolValue("IgnoreInvisible",true);
    settings->setBoolValue("WeldSeams",true);
    settings->setBoolValue("RemoveUnusedVerts",true);
    settings->setBoolValue("WriteVT",true);
    settings->setBoolValue("WriteVN",true);
    settings->setBoolValue("WriteO",true);
    settings->setBoolValue("WriteG",true);
    settings->setBoolValue("GroupGeom",true);
    settings->setBoolValue("GroupNodes",false);
    settings->setBoolValue("GroupSurfaces",false);
    settings->setBoolValue("GroupSingle",false);
    settings->setBoolValue("WriteUsemtl",true);
    settings->setBoolValue("WriteMtllib",true);
    settings->setBoolValue("NoMaps",false);
    settings->setBoolValue("OriginalMaps",false);
    settings->setBoolValue("CollectMaps",true);
    settings->setBoolValue("ConvertMaps",false);
    settings->setBoolValue("SelectedOnly",false);
    settings->setBoolValue("SelectedRootsOnly",true);
    settings->setBoolValue("PrimaryRootOnly",false);
    settings->setBoolValue("IncludeParented",false);
    settings->setBoolValue("TriangulateNgons",false);

I have also tried creating a custom preset. In code, it finds the preset but still doesn't work.

The exporter seems to accept some of the settings like the scale and orentation but does not accept the material settings.

Any help would be greatly appretiated. Also, if anyone is aware of any documentation on the exporters, please let me know.

Thanks

Comments

  • Update:  What I have found is that for some reason, the OBJ file is exported to the directory specified however the mtl and Maps folder are being exported to the root directory. Very strange.  I guess the obvious solution is that you have to change the working directory prior to export.

Sign In or Register to comment.