Jump to content

need script to work automatically


Dave Buckley
 Share

Recommended Posts

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

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 by KIT
Link to comment
Share on other sites

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...