Go Back   3D-Palace Community Forums > Application Specific and Hardware Subforums > 3DS MAX FORUM
» 3d-Palace Ed209 Set is awesome.
» Log in
User Name Not a member yet?
Register Now!
Password
Post New Thread Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 03-24-2010, 01:07 AM
Junior Member
Official N00b
 
Join Date: Mar 2010
Posts: 2
dreid270 smells faintly of something similar to wee
Maxscript Help - Batch Import and position script

Hello I wonder if anyone can help. Im a Max Script newbie and Im using max design 2010 and importing FLT mesh files to a MAX scene.

My project is a cityscape scene which coveres a 3 squre km area, containing up to 2000 buildings. The building models have come from a seperate company in FLT format which can be used in 3dsmax. When I import each building model they come in at 0,0,0 each on top of each other and not in the positions they're supposed to be in. Ive got a text file that gives the details of each file and building position as follows:

ss_id | openflight | astext
-------+-----------------------------------------+----------------------------------------------------
2423 | manchester_build_area6_2423.fl | POINT(383077.83583427 398130.662707564)
2424 | manchester_build_area6_2424.fl | POINT(383067.921649128 398118.414637092)
2425 | manchester_build_area6_2425.fl | POINT(383056.288790959 398137.108632821)

...where the "openfight" column is the filename and the "astext" column is the numerical values in x and y positions. (The axis of each building has already been offset for z values). Can you tell me how to write a script for batch importing these files to the correct positions through parsing the data in the text file?

Thanks anyones help would be appreciated
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 03-24-2010, 12:17 PM
MaccaAko's Avatar
Senior Member
Polygon Fumbler
 
Join Date: Apr 2007
Location: Finland
Posts: 264
MaccaAko leaves a faint aroma of banana
I wish you luck finding someone to code for you for free.

As I sit at work I'll give you some hints on the way:
- Turn on Macrorecorder (right click in bottom left corner, open "listener window", Macrorecorder "enable"

- Then import one item, modify it to suit your need.

For reading a text file google "read textfile maxscript" and you might be lucky (first one I got read some coordinates from a file - CGTalk - MaxScript: Reading Custom Info from a File).

Then put it in a loop to import the recorded macro with values from the file, simple and sound.

But of course it helps if you know programming or maxscript. I just gave you some hints, maybe someone will code it for you!


/Macca
__________________
So slow progress...: www.netikka.net/macca/

Last edited by MaccaAko; 04-01-2010 at 08:32 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 04-01-2010, 02:36 PM
Junior Member
Official N00b
 
Join Date: Mar 2010
Posts: 2
dreid270 smells faintly of something similar to wee
Thanks for that
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Post New Thread Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


» Online Users: 42
4 members and 38 guests
AceMastermind, black dust, Gazfx, JL
Most users ever online was 508, 12-19-2009 at 05:41 PM.
» Today's Birthdays
None
Powered by vBadvanced CMPS v3.2.2
Links Legal Notes Disclaimer

Valid CSS!
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
3d-Palace
3d-Palace.com
3D-Palace Video Tutorials are supplied to you to download and watch for your own personal use only. Duplication whole or in part is illegal without express permission of 3d-palace International Training. Do not post 3d-palace tutorails to fileshare sites or torrents please..
Email 3D-Palace International Training for clarification or permission.