Problem with obj export via script (DAZ 4.14).
mundotwo
Posts: 3
Hello. I am trying to export an object in some non-default poses into obj files. When I try to do it via script ( using this example: http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/file_io/export_obj_silent/start ) the resulting geometry, for some reason, doesn't have those nice shape "improvements" (morphs) that DAZ does automatically (like stretch compensations for bending, etc.). On the other hand, when I export manually (via File > Export...) - everything works just fine.
Even this "minimal" code does not work as it should:
function exportOBJ( sPath, sName){ var oExportMgr = App.getExportMgr(); var sClassName = "DzObjExporter"; var oExporter = oExportMgr.findExporterByClassName( sClassName ); var aPath = sPath + "/" + sName+ ".obj"; oExporter.writeFile( aPath ); oExporter.deleteLater(); };
What am I doing wrong?
Post edited by mundotwo on
Comments
I found this solution:
Still not sure why the first variant doesn't work as it should.