KerryTouch
04-23-2007, 03:12 PM
Ok, i've written a simple script, sample below..., but no textures appear, when i open the processed max files.
I have tried -not- using the #noprompt and clicking ok every time...(300 times ) still no textures.
I have checked the file Obj2Max.cfg, that has Materials =1 (sample below)
If I open the obj and import it, it does ... repeat does ... load the texture, it takes a little while, big textures, but it does do it.
I tried to reset the views, even tried a sleep in its place, no joy.
The script does process all of the files with the script, but without textures. I am a bit of a loss of what to do...
Using Max 8.
Any help would be great.
Thanks
Kerry.
------------maxscript
getFiles "C:\\objs\\*.obj"
for f in files do (
s = copy f
// this gets rid of the .obj so when max saves it it uses .max
num=s.count
num=num-4
newname = substring s 1 num
ImportFile f #noPrompt
// sleep 5
max views redraw
saveMaxFile newname
//tell me what one your on
print newname
resetMaxFile #noPrompt
-------------Obj2Max.cfg
[Obj2Max]
Single=0
Helper=0
Grouper=0
Rotate=1
Texture=1
Normals=1
Unify=1
ObjSmooth=1
Smooth=1
Scale=100
Center=0
Materials=1
Group=obj
I have tried -not- using the #noprompt and clicking ok every time...(300 times ) still no textures.
I have checked the file Obj2Max.cfg, that has Materials =1 (sample below)
If I open the obj and import it, it does ... repeat does ... load the texture, it takes a little while, big textures, but it does do it.
I tried to reset the views, even tried a sleep in its place, no joy.
The script does process all of the files with the script, but without textures. I am a bit of a loss of what to do...
Using Max 8.
Any help would be great.
Thanks
Kerry.
------------maxscript
getFiles "C:\\objs\\*.obj"
for f in files do (
s = copy f
// this gets rid of the .obj so when max saves it it uses .max
num=s.count
num=num-4
newname = substring s 1 num
ImportFile f #noPrompt
// sleep 5
max views redraw
saveMaxFile newname
//tell me what one your on
print newname
resetMaxFile #noPrompt
-------------Obj2Max.cfg
[Obj2Max]
Single=0
Helper=0
Grouper=0
Rotate=1
Texture=1
Normals=1
Unify=1
ObjSmooth=1
Smooth=1
Scale=100
Center=0
Materials=1
Group=obj
