Relink Bitmaps

As featured in 3D World – August 2011

 

 

 

Download Relink Bitmaps v2.09

 

 

 

(Self-installing .mzp file, just run this script via:  “Maxscript->Run script”)

 Note: The file when downloaded should be “Relink Bitmaps v2.##.mzp” (NOT ZIP, IExplorer makes it a Zip file)
INSTALLATION:  In 3dsMax, goto MAXScript -> Run Script, and run the file you downloaded above “Relink Bitmaps v2.##.mzp

Friends/Community,

This tool is available to the community for free, but I kindly request if you see the value in time this tool saves you, that you donate whatever you can to help me pay off student loans.  Every donation helps immensely.  I do however understand that we’re all in this mess somehow and I understand if you aren’t able to donate immediately at this time.  To donate simply click the “Donate!” button on the script.  I am suggesting $10 for an individual, but whatever you can spare will insure the future development of this script and updates.

Tested thoroughly with (32-bit and 64-bit):   Max 9-2015

2.09 Changelog

    • CoronaBitmap / CoronaProxy / CoronaLight support added (this didn’t get added to 2.08 even though I meant it to).
    • Changed the functionality of the read-only browse (because I didn’t like how I did it last verison)
    • Fixed the stupid error with the “RemindMe=” bug that users experienced when they pressed “Remind Me in a week”
    • Octane render is still impossible for me to support at the moment, they handled filenames strangely.  Contact them if you want support added, my forum name on their forums is colinsenner.

2.08 Changelog

  • Corona Render Fully supported
  • Browse buttons are Read-only share friendly
  • Attempted to support Octane Render, but the way they are exposing their custom map types like Image_Texture are not in line with any other plugin I’ve seen, if you want Octane support, it’d be best to contact them on their forums or email directly to help me resolve the issue, they were unhelpful when I attempted to contact them to resolve this.  My forum name on Octane forums is colinsenner.

Features:

  • All 3dsmax supported Bitmap Texture types
  • (new) Relinks Mental Ray Proxy files
  • (new) Relinks VRay Proxies (.vrmesh)
  • (new) Relinks VRayHDRI files
  • (new) Relinks IES files (including VRayIES files)
  • (new) Automatically checks for script updates and new versions
  • 250% speed increase from previous versions
  • Command-line mode available for automating repetative tasks (see documentation below)
  • Configurable default user options saving button clicks and wasted time
 

Just a quick thank you to Christopher Grant at Scriptspot, and the users who have shared their time and ideas (and donations) to make this script better:   brittnell, hongxu, fajar and others!

As always, thank you for everything and be well,
-Colin

 

FAQ:

Q: $directory not recognized:  errors

A: The problem is there’s a ‘$’ token in one of your paths.  Windows allows a directory to contain a ‘$’ token like this:   c:\3d\models\couch$\couch.max.  The problem is max doesn’t allow this because it’s a reserved keyword.  The quick fix is to open the Max Asset Tracking and remove all paths (“Strip Path”) for all directories with a ‘$’ in it.  I’ll fix this next update.

Q: Every time I open 3dsmax a message saying “Relink bitmaps is now installed….”.

A: To fix your problem though: search your max root folder for “InstalledMessage.ms” and delete it. That should fix everything.  This is because it wasn’t installed as an .mzp file.  The script file should be named “Relink Bitmaps v#.#.mzp”. Some browsers rename .mzp to .zip (annoyingly). If you in max do Maxscript->RunScript and pick the .mzp file, it’ll install everywhere correctly.

 

Documentation:

To reset the configuration .ini file in the Listener window (Maxscript->MAXScript Listener) type and hit [enter]:

resetConfig()

To reset the position of the Relink Bitmap’s dialog window (in case it gets stuck off screen) type:

resetPosition()

If you want to run the function ‘sceneRelinkBitmaps’ from your script you just need to detect if two .mse files are where they should be, run the following first, then you can call sceneRelinkBitmaps without the user opening Relink Bitmaps

if doesFileExist ((getDir #userScripts)+"\\Relink Bitmaps\\C_Lib.mse") and doesFileExist ((getDir #userScripts)+"\\Relink Bitmaps\\Relink_Lib.mse") and doesFileExist ((getDir #userScripts)+"\\Relink Bitmaps\\Relink Bitmaps.mse") then ( 
   fileIn ((getDir #userScripts)+"\\Relink Bitmaps\\C_Lib.mse") quiet:true 
   fileIn ((getDir #userScripts)+"\\Relink Bitmaps\\Relink_Lib.mse") quiet:true 
   fileIn ((getDir #userScripts)+"\\Relink Bitmaps\\Relink Bitmaps.mse") quiet:true 
) else (
   MessageBox "Relink Bitmaps files are not in the default installation path.  Try reinstalling."
)

Relink Bitmaps has the ability to run automatically via the command line, here is the syntax:

sceneRelinkBitmaps searchArr ignoreCase:[true/false] ignoreExtension:[true/false] recursive:[true/false] undoOn:[true/false] lowMemory:[true/false] allMaps:[true/false] progress:[progressBar]
/* sceneRelinkBitmaps – Relinks bitmaps in the current scene
append to returnMissingBitmaps() function for adding more kinds of assets to relink
searchArr: an array of directories to search
ignoreCase: true or false
recursive: true of false
undoOn: true or false
lowMemory: true or false
progress: progressBar link to update progress */

/* sceneRelinkBitmaps – Relinks bitmaps in the current scene
searchArr: an array of directories to search, ie. #(“C:/maps”,”D:/maps”)
ignoreCase: true or false
ignoreExtension: true or false
recursive: true of false
undoOn: true or false
lowMemory: true or false
allMaps: true or false
progress: progressBar link to update progress, will update the .value in this while it relinks */

If you’re having problems with the script run it and in the listener type:

setDebugMode on

and send me the output and what you did so I can track it down for you asap

Previous Changelogs:

New in Version 2.04

  • Added an option to Relink All Bitmaps and not just missing ones.  The checkbox “All Maps” should do the trick.
  • Fixed a bug with the licensing system, if you have requested a license in the past and it wasn’t working, please email colin.senner@gmail.com your new request code (Generated by clicking the “Donate!” button).  Old License files will continue to work, but they now have a new format
  • Command Line support added for “All Maps” feature (check the FAQ at the bottom for syntax)
  • The new version deletes your “Relink Bitmaps.ini” file because new features have been added to it, this is to prevent errors.  Reconfigure manually.
  • Fixed the icon not showing up properly after install (Thanks Artur)

New in Version 2.03

  • Changed the script path to use the user’s local scripts path instead of “C:\Program Files\Autodesk\3dsMax 20##\”, this should eliminate problems with needing administrator rights to install the script.
  • Added the option to ignore the file’s extension allowing you to relink .jpgs to .tifs with ease.  Note: it will use whichever one it finds first.
  • Corrected a bug with the “Find” button which would induce a crash if it was clicked with nothing in it.

New in Version 2.02

  • Added a user requested option to delete all missing maps in a scene
  • Fixed a bug with find a material producing an error

Older Versions:

Relink Bitmaps 2.0
Relink Bitmaps 2.01
Relink Bitmaps 2.02
Relink Bitmaps 2.03
Relink Bitmaps 2.04
Relink Bitmaps 2.05
Relink Bitmaps 2.06
Relink Bitmaps 2.07
Relink Bitmaps 2.08

 

 

264 thoughts on “Relink Bitmaps

  1. James

    You can delete my last 2 comments (unless it helps someone go down the wrong path lol)

    I’m so close I can feel it, I get an error on the searchArr line:

    if doesFileExist ((getDir #userScripts)+”\\Relink Bitmaps\\C_Lib.mse”) and doesFileExist ((getDir #userScripts)+”\\Relink Bitmaps\\Relink_Lib.mse”) and doesFileExist ((getDir #userScripts)+”\\Relink Bitmaps\\Relink Bitmaps.mse”) then (
    fileIn ((getDir #userScripts)+”\\Relink Bitmaps\\C_Lib.mse”) quiet:true
    fileIn ((getDir #userScripts)+”\\Relink Bitmaps\\Relink_Lib.mse”) quiet:true
    fileIn ((getDir #userScripts)+”\\Relink Bitmaps\\Relink Bitmaps.mse”) quiet:true
    ) else (
    MessageBox “Relink Bitmaps files are not in the default installation path. Try reinstalling.”
    )

    sceneRelinkBitmaps
    searchArr: #(“M:/Stock”,”X:/”)
    ignoreCase: true
    ignoreExtension: true
    recursive: true
    undoOn: false
    lowMemory: true
    allMaps: true
    progress: progressBar

    — Error occurred in anonymous codeblock; filename: C:\Users\render\Desktop\Relink.ms; position: 628; line: 10
    — Syntax error: at keyword parameter, expected
    — In line: searchArr: #

    Please help!

  2. Thomas Klyhn Christensen

    Dear Colin,

    First of all, your script alone is part of the reason I am still using and loving 3dsmax! so thank you! there is not a single day where I don’t use your script.

    I do have a request / feature request though.

    would it be hard / possible to get support for Fstorm Render? bitmap relinking?
    It’s a GPU render and im sure you are aware of its existance, but the current 2.09 version doesn’t recognize fstorm bitmap paths for some reason.

    Thanks again!

  3. Rueben Allan Derrick

    Hi Colin

    I purchased your product a few years back absolutely love it…life saver!

    Recently (might be due to windows update, max updates, not sure) the ability to search has become unreasonably slow compared to “before” I’m running v2.09 and it can take 20 min to search a folder of 200 files. Yet I can access the same network folder very quickly via windows explorer and the transfer rate is quick so access to that drive is not the issue.

    The network drive is a synology nas but seeing I can assess it easily not sure if that is playing a role?

    If it was you, how would you go about solving the issue?

    Also on a side note, there is a small bug related to vray proxies. If you have been playing around with ,maxes “Assets Tracker” and you point the proxies to a folder without the vmesh. Save the file & reopen it. Relink bitmaps does not see the file as missing the vmesh, even though its point to a folder without vmeshes in it. This means you have to manually re-direct via assest tracking and not relink bitmaps.

    Have you come across this before?

    Regards Rueben

  4. Michael McCormick

    Hi Colin,

    Great tool! It’s been such a lifesaver for me over the past few weeks!

    I did come across an issue recently that I’m hoping you could help me with. Your tool doesn’t seem to be able to relink textures that use the UDIM workflow. This workflow allows Max to automatically hook up a bunch of textures to various UV tiles.
    The texture nodes (VrayHDRI) use a format of Name_.ext while the textures on disk are actually named Name_1000.ext, Name_1001.ext, Name_1002.ext, etc.

    Unfortunately, Max and all other relinking scripts don’t recognize this format and can’t reconcile the path.

    Would it be possible to have your tool optionally search\validate based on matching string? Then you could put in just the NAME part of the texture to validate the path because the complete name can’t be matched to the directory files.

    Thank you,
    Michael

Leave a Reply

Your email address will not be published. Required fields are marked *

*