-
iwkya 61 posts
hi guys,
Does anyone know a little maxscript to help me out. I have an export from a game engine that exports the terrain straight into max which is great, but then all other models export in the centre of the scene. The author of the exporter tells me I need script to be wrote to parse the model location files and relocate all of the models.
The file it exports starts with :-
ModelFile;PositionX;PositionY;PositionZ;RotationX;RotationY;RotationZ;ScaleFactor
.....and then carries on with the list of models like this :-
canopylesstree01.obj;18109.13;99.02845;25778.55;0;332.1488;0;1
I know no maxscript at all, does anyone have a clue where I would start. I would be more than willing to learn this myself but i wouldnt know where to start.
cheers guys
-
diemacht 1,045 posts
can you please explain it more im not sure if i understand what you want to export where from where?
-
iwkya 61 posts
Hi thanks for replying..
Ok, I have a friend coder who has written an export program for a game. Most of it works apart from the location of certains doodads (trees, barrels etc), they are exported great but the location data isn't carried on to the obj file. Instead the exporter creates a text file listing all of the obj's and their positions.
So basically I need a script that will read all of these postion coards from the text file, into 3ds max.
Think you can help, ?
-
JayG 1,164 posts
So you just need to read the text file, parse the coordinates and apply them to the objs?
How is the text file laid out? Is it comma separated? If you can post a line from it that would help.
-
JayG 1,164 posts
Nevermind, it's right up there....haha. I'll whip up some maxscript for you later this afternoon if no one beats me to it.
-
iwkya 61 posts
wow really ?? Thank you so much man. If anything i'll be certainly looking at your script to learn as well as use.
btw, would i run the script once i had loaded all of the obj's in the scene ?
-
JayG 1,164 posts
-
iwkya 61 posts
-
diemacht 1,045 posts
-
JayG 1,164 posts
-
JayG 1,164 posts
I also didn't include a file test (check if the files exist, error out if they don't) because I'm not sure how to do it maxScript, perhaps somebody can chime in with how to do that.
-
iwkya 61 posts
cheers man really appreciate this..
Ok, tried it and i get no errors after i put paths in, but nothing happens.