OBJ + MTL export File
Who can help.
When i use OBJ + MTL export script i need a # before the last line in the mtl-file. Otherwise i can't import it to mObject.
So last line should look like this:
# WaveFront *.obj file (generated by Cheetah3D)
mtllib test.mtl
g Ebene
v -0.500000 0.480631 -0.137819
v -0.500000 -0.480631 0.137819
.....
usemtl Material
f 2/4/1 4/3/1 3/2/1 1/1/1
#usemtl default
Can anyone post a modified Version of the script:
function main(doc){
var path=OS.runSavePanel("obj");
if(path==null){
return;
}
var file=new File(path);
var lastpathcomp=file.lastPathComponent();
var dir=file.directory();
var comps= lastpathcomp.split(/\./);
var objpath=dir+"/"+comps[0]+".obj";
var mtlpath=dir+"/"+comps[0]+".mtl";
doc.saveToFile(objpath,"obj");
doc.saveToFile(mtlpath,"mtl");
}
THX
Who can help.
When i use OBJ + MTL export script i need a # before the last line in the mtl-file. Otherwise i can't import it to mObject.
So last line should look like this:
# WaveFront *.obj file (generated by Cheetah3D)
mtllib test.mtl
g Ebene
v -0.500000 0.480631 -0.137819
v -0.500000 -0.480631 0.137819
.....
usemtl Material
f 2/4/1 4/3/1 3/2/1 1/1/1
#usemtl default
Can anyone post a modified Version of the script:
function main(doc){
var path=OS.runSavePanel("obj");
if(path==null){
return;
}
var file=new File(path);
var lastpathcomp=file.lastPathComponent();
var dir=file.directory();
var comps= lastpathcomp.split(/\./);
var objpath=dir+"/"+comps[0]+".obj";
var mtlpath=dir+"/"+comps[0]+".mtl";
doc.saveToFile(objpath,"obj");
doc.saveToFile(mtlpath,"mtl");
}
THX