Repathing 3ds Max assets externally, command line utility

loocas | 3ds Max,software,technical | Sunday, March 3rd, 2013

Repath Max Assets cmd

Do you remember my post about repathing 3ds Max assets in the .max and .mat files without actually running 3ds Max? Well, I cooked up a little utility that can be run from the command line without any IronPython installed. You can use this simple exe file to repath or simply just list all your external asset paths inside your .max and .mat files, should you need to. And since it’s a command line utility you can run it from within your programs and catch the outputs or batch feed it data for processing etc…

Anyways, the syntax is pretty simple:

You need to call the program and then pass it a .max or .mat scene file. If you provide only that, it’ll list the file’s asset paths. But if you provide a -p parameter followed by a new path, it’ll re-path all the file’s external assets to the new location you provided. Unfortunately, there is no way for me (afaik) to distinguish what is an actual render output or RE output and what are texture or cache data inputs, so everything will be linked to the new directory at once.

Should you need any help, just call the program without any parameters, or with the parameter -h for help.

Download the program from here.


  1. Hi,

    Really great tool ! I only tested it on windows 7 32b and it comes with an error even when calling the programs without any parameters :

    Unhandled Exception: System.IO.FileLoadException: Could not load file or assembl
    y ‘IronPython, Version=, Culture=neutral, PublicKeyToken=7f709c5b713576e
    1’ or one of its dependencies. The parameter is incorrect. (Exception from HRESU
    LT: 0x80070057 (E_INVALIDARG)) —> System.ArgumentException: Offset and length
    were out of bounds for the array or count is greater than the number of elements
    from index to the end of the source collection.
    at System.IO.UnmanagedMemoryStream.Read(Byte[] buffer, Int32 offset, Int32 co
    at PythonMain.AssemblyResolve(Object , ResolveEventArgs )
    at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String a
    — End of inner exception stack trace —
    at PythonMain.Main()

    Anything that i need to install prior running the exe?


    Comment by Alex — November 9, 2013 @ 19:59

  2. Thanks a lot for the very useful utility! Actually is it possible to use it to strip file paths from network paths only? I often work locally at home on scenes created at the office where all the assets are stored on a file server and 3dsmax always hangs for several minutes while trying to locate the network computer that doesn’t exist at my home. If you didn’t plan for such feature, would you be willing to share the source code so I could add the functionality? I’m not really equipped for any C++ compiling but I don’t want to waste your time on my issue.

    Comment by David — November 14, 2013 @ 15:07

  3. For that scenario, David, I’d suggest using MAXScript and its getMAXFileAssetMetadata() and setMAXFileAssetMetadata() methods.

    It requires Max running, but it should be OK in your case.

    This utility was designed to work on a render farm where such re-pathing is needed to be done externally from 3ds Max via other Python tools.

    Comment by loocas — November 14, 2013 @ 18:26

  4. That error is weird, Alex, I haven’t bumped into such a problem, unfortunately :/

    Not really sure what it might be causing, though.

    Comment by loocas — November 14, 2013 @ 18:27

  5. Thanks for the info Loocas! Will look it up.

    Comment by David — November 14, 2013 @ 22:33

  6. I was unable to run it.
    A double click loads the cmd and it shuts down after a couple of seconds.


    Comment by panibor — March 6, 2014 @ 11:37

  7. Hi, panibor. I haven’t updated this utility for the latest Max versions, yet. So, that might be the problem. I’ll try to do so in the near future, but for now, I’m, unfortunately, unable to help. :(

    Comment by loocas — March 10, 2014 @ 02:47

  8. loocas,
    may be im missing somthing? does somthing must be preinstalled in order to run this tool?

    Comment by panibor — March 13, 2014 @ 14:12

  9. hi,your program is very useful,but I want to run it on the linux.So would you be willing to share the source code to me.Thanks

    Comment by 70KG — April 25, 2014 @ 14:41

  10. Hi, this looks really useful, but unfortunately it doesn’t work for me.
    I get the following error:
    “The stream ‘FileAssetMetaData2’ seems to be missing.”
    Any ideas how to fix this?


    Comment by David — October 10, 2014 @ 16:04

  11. Hi, David, well, I suspect it’s because of the newer Max version file stream structure. I haven’t updated this tool in years.

    Comment by loocas — October 19, 2014 @ 20:45

  12. Thanx a million …
    it works like a charm and really fast :)
    If only can separate proxies asset from textures

    Comment by ttm1st — January 14, 2015 @ 11:12

  13. Unfortunately I don’t know of any way how to, reliably, distinguish individual asset types. :(

    Comment by loocas — February 3, 2015 @ 20:36

  14. Hi. Thanks for the great utility! However, i often get this error message: “The stream ‘FileAssetMetaData2’ seems to be missing.” With 3ds max 2014 files.
    And nothing happens.
    Any suggestions?

    Comment by Vasily — February 3, 2015 @ 21:45

  15. Hi, well, unfortunately I haven’t updated the tool for the latest versions of Max, so it is not compatible at this time. I’m planning on updating the tool soon-ish.

    Comment by loocas — February 11, 2015 @ 16:51

  16. What exactly version did you build this for? 3ds max 2012? or 2013? Would be great if it work with 2012. I’m aware of the fact you didn’t update this for years and this blog article date ~2013.

    Comment by nnq2603 — November 29, 2016 @ 17:49

  17. Hey, nnq2603, I think I made it work in Max 2013 and Max 2014. I didn’t test this on any other version. I’m not sure, I don’t remember, to be honest, when Autodesk implemented the second data stream in the .max file. I think
    you might be out of luck with Max 2012, though. Do you really need an outside repathing tool? I never updated this program because I’ve always gone with MAXScript repathing tools running from within a running 3ds Max session (i.e.
    post-load render MXS scripts, etc…)

    Comment by loocas — November 29, 2016 @ 18:55

  18. I saw other posters said above that 2014 doesn’t work. I’ve got 2014, too. But not 2013 though.
    I don’t really need if you say that as a addition cost. Where I work we’ve to submit files to out private renderfarm but mostly repath procedure was done by hand manually (3ds max laggy UI response and always missing some path in between the tracking list, other speed issue…). And I think it’d be easier and faster to use such a tool like this one to batch repath some files before send to farm. But it’s just a attempt, if it wasn’t a successful attempt, then it’d be still ok. Because there’s not too many works to submit to farm.
    Also I visit the blog to find again a older script by Duber called “duber bitmap collector” to see if the mass renaming asset feature has any update (‘coz I need that rename feature even more than repath one, there’s almost no free script has that rename function except yours). But can’t find it out here any more. I guess you remove it from this site. Only remain in scriptspot old version since 2011.

    Comment by nnq2603 — November 30, 2016 @ 04:34

  19. Did you get my e-mail? I sent you my script files I still use to this day for Deadline repathing.

    Comment by loocas — December 13, 2016 @ 00:22

  20. I did come back here time to time checking if there was any reply from you but there wasn’t, so after a few weeks I forgot about this. But I didn’t receive any email from anyone with max script as far as I remember.

    Honestly, I don’t remember which email I use to asked a question here (I recheck 3 different emails and search with keyword such as *repath, duber, script… but found none. Only *script found scriptspot website notification emails).

    Thanks for your kind support though.

    Comment by nnq2603 — May 7, 2017 @ 17:25

  21. No prob, just sent you another mail.

    Comment by loocas — May 7, 2017 @ 17:39

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WordPress | Theme by Roy Tanck