Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Question Regarding Configuring Paths

Question Regarding Configuring Paths

t_smith5
Collaborator Collaborator
1,516 Views
11 Replies
Message 1 of 12

Question Regarding Configuring Paths

t_smith5
Collaborator
Collaborator

This might be a strange question, but when setting up paths to the location of files or textures, is there a way to prevent Max from constantly going back to its default location? What I mean is, when you try to add a new path, and it comes up with the Choose New External Files Path box, it always ALWAYS comes up with the default location of where 3ds Max is, and I have to keep traipsing back to the location of where my individual files are and their paths. Is there any way of setting this so it comes up with a different default location instead?

 

Thanks

0 Likes
1,517 Views
11 Replies
Replies (11)
Message 2 of 12

irishman_team_kilber
Mentor
Mentor

most people nowadays use relink bitmap have you tried that script? link  https://apps.autodesk.com/3DSMAX/en/Detail/Index?id=2039551202535585769&appLang=en&os=Win64

0 Likes
Message 3 of 12

10DSpace
Advisor
Advisor

Hi @t_smith5 

 

"is there a way to prevent Max from constantly going back to its default location? What I mean is, when you try to add a new path, and it comes up with the Choose New External Files Path box, it always ALWAYS comes up with the default location of where 3ds Max is, and I have to keep traipsing back to the location of where my individual files are and their paths. Is there any way of setting this so it comes up with a different default location instead?"

 

I agree that it is annoying (and not very useful) to start directory navigation in the 3dsMax.exe directory.  Through maxscript you can at least start in what I consider to be a more useful directory, like the directory containing your currently opened .max file.  So, if you don't want to get the 3rd party script that @irishman_team_kilber  mentioned, an alternative would be the following 2 lines of maxscript.   

 

fdir=GetSavePath caption:"Select Additional Maps Directory to Add" initialDir:(maxFilePath)
mapPaths.add fdir

 

This will open the Save Directory dialogue starting at least in the directory in which the current maxfile is in as opposed to the directory in which 3dsmax.exe is.   It will then add the newly selected map directory to the list of mapdirectories in 3dsmax.ini

 

Just another option.  If you are curious about some of the mappath scripting options, here is a link to the relevant doc page:

 

https://help.autodesk.com/view/3DSMAX/2016/ENU/?guid=__files_GUID_F7577416_051E_478C_BB5D_81243BAAC8...

 

0 Likes
Message 4 of 12

t_smith5
Collaborator
Collaborator

Thanks for this. Although I can't seem to get it to work. It's installed, but nothing is showing in Max to indicate that it's on. The documentation says it should appear within an Exchange category on the Toolbar, but I don't have that. I've even tried going into Customise User Interface and looking in the Toolbars, but it's not there either. 😕

0 Likes
Message 5 of 12

t_smith5
Collaborator
Collaborator

I'm not sure how to do this or use MaxScript; not something I'm familiar with, I'm afraid. I've added it to a new script, but it doesn't appear to have done anything. It's a shame because both suggestions sound ideal. 😕

0 Likes
Message 6 of 12

10DSpace
Advisor
Advisor

@t_smith5 

 

If you have already added the script lines to a new script in the Script Editor window you are halfway there.  All you have to do is select "Evaluate All" from the Tools menu (see below).

Script Editor Evaluate All.png

 

To have this script more easily available, all you have to do is highlight the script lines in the Script editor and drag and drop the lines to a toolbar.  Max will automatically create an icon for it and when you click the icon the script will run.  Once you get the hang of running scripts and setting up custom toolbars it is pretty easy and save's lots of time in your workflow.  I hope you can get this working for you.  

 

Message 7 of 12

t_smith5
Collaborator
Collaborator

Okay, thanks. I've managed to execute it and add the shortcut, but unless we're misunderstanding each other, or there's still a problem with the code, it doesn't appear to be doing what I need. 😕 Executing the code has asked me which folder to select, which I've done, but if I go to Customise > Configure Project Paths > Add, it still comes up with the default 3ds Max folder and its contents. Also, if I try to execute a single line, I get an error like this:

 

3dsmax_L3uqmwLX5e.png

0 Likes
Message 8 of 12

10DSpace
Advisor
Advisor

@t_smith5 

 

Executing the code has asked me which folder to select, which I've done, but if I go to Customise > Configure Project Paths > Add, it still comes up with the default 3ds Max folder and its contents.

 

The script adds the selected directory to your maps directory (and updates 3dsmax.ini accordingly) and starts navigation as I said in the more useful directory of the currently opened maxfile.  It does not alter the initial directory that opens following the Customize>Configure Project>Add function built into Max.   Rather, the script is providing an alternative to way to update your map paths.  You don't need to go into the Customize>Configure Project> Add function because the script already did it for you.  I hope this is clear.  As far as I know there is no way to change the initial directory  of the built in Customize>Configure Project> Add function.  So the script is a workaround. 

 

Also, if I try to execute a single line, I get an error like this:

 

Unless you really understand scripting, you shouldn't isolate and run a single line of a script.  I probably should not have mentioned the option to run a single line until you got more familiar with scripting.  If you run the complete script, there should be no error messages. 

 

I hope this clears things up for you.

0 Likes
Message 9 of 12

t_smith5
Collaborator
Collaborator

Okay. Gotcha about the individual lines of code. What exactly is the 'maps path'? With my previous uni project, I kept having a problem where it couldn't find the location of my textures if I loaded up the project via my laptop or PC. Totally different directories. I've been using the Customise Paths option to set the location of my textures when it's been unable to find them. Not sure if that script will help with that...

0 Likes
Message 10 of 12

10DSpace
Advisor
Advisor

 What exactly is the 'maps path'? 

 

It is just a list of search directories that max will search for texture map file names withinConsider how slow it would be if Max had to search through every single directory in your entire computer to find a texture file name that needs to be linked to one of your materials.  So the solution is to let the user specify a targeted list of directories for max to focus on to make the search and linking process much quicker.  Even if you have hundreds of map path directories (I have 638) the search is much quicker than the thousands of directories that exist in most users' computers.   The complete list map directories is stored in a file called 3dsmax.ini which you can open and view in Notepad.   That 3dsmax.ini file is how max knows where to search.  Both my script and the built-in max Customize>Configure Project> Add function do exactly the same thing -- they add a user-specified directory as another search path for max by updating the 3dsmax.ini file.   No other hidden magic.  

 

I've been using the Customise Paths option to set the location of my textures when it's been unable to find them. Not sure if that script will help with that...

 

Yes, as I explained above, that is exactly what the script does.  It is equivalent to the Customize paths option but just starts navigation in a more logical directory which was your initial complaint.  I hope this is clear and solves your issue.

Message 11 of 12

t_smith5
Collaborator
Collaborator

I see. Thanks for the explanation. So, with that script, will it just look in the folder that's been set/chosen, or will it search in folders within the set folder as well? My textures are all organised within numerous folders/categories. For instance, each object I've modelled and textured has its own folder within the textures folder.

0 Likes
Message 12 of 12

10DSpace
Advisor
Advisor

@t_smith5 

 

Sorry, but as currently written, the script only adds the specified directory and not any sub-directories.   I did not add the equivalent of "include subpaths".  This would be a bit more elaborate and I was trying to respond reasonably quickly while still moving my own work forward.   

0 Likes