Dave Buckley Posted August 3, 2009 Share Posted August 3, 2009 Guys I'm importing geometry from Revit into Max, i always have the extra step of using an additional script to eliminate the triangulation that we get after the import. I just wondered if there was anyway to automate the process so that whenever i import an FBX file, 3DS max runs the script automatically?? Link to comment Share on other sites More sharing options...
SandmanNinja Posted August 3, 2009 Share Posted August 3, 2009 Can you clear your listener window, import the file, then execute the script, then look at the listener window? Would it have what you need? Link to comment Share on other sites More sharing options...
KIT Posted August 3, 2009 Share Posted August 3, 2009 (edited) You could make the script work inside a file open callback (#filePostOpen most likely), so that once it's been evaluated, it will run automatically whenever a new file is opened. Edited August 3, 2009 by KIT Link to comment Share on other sites More sharing options...
Dave Buckley Posted August 3, 2009 Author Share Posted August 3, 2009 thanks for input guys, however i have a little problem. No knowledge of scripts etc, i simply select all the imported geometry and then drag a .mcr file into my max viewport which elimnates uncessary edges on the geometery Link to comment Share on other sites More sharing options...
KIT Posted August 3, 2009 Share Posted August 3, 2009 Well, is there any chance you could upload the file or send it by email for me to modify it? Link to comment Share on other sites More sharing options...
Dave Buckley Posted August 3, 2009 Author Share Posted August 3, 2009 yep no probs, what do you want then? just the .mcr? i basically want it to run whenever i import an FBX file, the only prob is that it will only work if everything is selected first Link to comment Share on other sites More sharing options...
KIT Posted August 3, 2009 Share Posted August 3, 2009 Here's a quick whack at it. I couldn't find any way of knowing directly if the file being imported is a FBX file, so the script will run every time you import a file... Just drag the file into the scene like before, now every time you import a file the script will find the new items on the scene and run the cleanup rutine. You will have to drop the script on the scene again if you restart MAX. I've set it up so it will output to the listener the mesh that it's being cleaned so you'll know if it's working properly. Let me know how it goes. I'll see about creating a proper tool and mini GUI for this when I get some free time so you don't have to keep dropping the file to the scene every time max starts. Link to comment Share on other sites More sharing options...
Dave Buckley Posted August 3, 2009 Author Share Posted August 3, 2009 i think your my new hero if i'm honest it's because when i'm doing presentations inside the software i often import revit models, and it just looks incredibly untidy with the additional triangulation. so providing i get into my presentations early and run the script everything should be fine. do i still need to select everything first on the initial first run? Link to comment Share on other sites More sharing options...
KIT Posted August 3, 2009 Share Posted August 3, 2009 do i still need to select everything first on the initial first run? Nop, the script will make sure the cleaning is done only on meshes that were just imported... in theory at least. Give it a couple of tries before you using it on a presentation just in case I messed up somewhere however. Good luck Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now