Save Selected With Maps

It will collect/relink all selected objects bitmaps to the chosen folder, even if the bitmaps are just flagged "found" in the asset tracker, and it will save your selected objects to that same folder.
If path are missing or unsolved those maps will keep their missing or unsolved path, it will be easier to try to find them.
It is compatible with Vray bitmaps, Corona bitmaps and IES files in Standard, Photometric, Vray and Corona Lights.
It has an option for resetting material editors before saving, it is usefull to reduce filesize and avoid unlinked bitmaps in the destination files, because it relinks only selected objects bitmap , maps in the material editor might be flagged "missing" in the destination file (even if their path were flagged "found" in the original file). It will make cleaner files but if you need to keep your material editor untouch just unchek the option.
update 1.3 : vraydisplacement and coronadisplacement modifiers are now supported, the output name is now based on the selected objects name, in case of multiple selection it will use the first selected object name. i also fixed a few bugs
update 1.4 : introduce an option for file naming, you can either enter the name yourself or use auto file name, it will behave as before and inherit name from object selection.
update 1.5 : you can now specify a name for your file , without having to browse twice.
update 1.6 : bug correction
update 1.7 : bug correction, the script was crashing if vray or corona wasn't installed, i 've also added an option to clear render output and render elements.
update 1.7.1 : bug correction, the script was crashing when corona lights where part of the selection.
update 1.7.2 : now compatible with Corona and Vray proxies. i also did some code optimization, it could be even more optimized, i'll try to find some time to improve it further more in next update....
update 1.7.5: added a renaming and relinking of maps that have the same name but are in different folders and doesn't have the same size, prior version was overwriting those files. Also change the way it handles renderengine assets, the previous version was checking for currrent renderer to avoid crashing when a certain renderer wasn't installed, but if you had some vraybitmaps or coronabitmaps in your scene, the script wasn't collecting them if the current renderer wasn't set accordingly. Now it checks if the renderer is installed instead of being currently used, then it collects any dependent files what ever renderer is currently used as long as the renderer is installed. I also added support for Hair and Fur modifiers maps and Vrayfur maps.
update 1.7.6: In previous versions, the current scene was left with the selected objects maps relinked to the new path aswell, same for the material editors, it was cleared in the current scene aswell as in the output saved file, now only the output file has relinked bitmaps and cleaned material editors, the current scene stays in its current state, same for the output render path and render elements.
update 1.7.7: Bugfix, the script was crashing when trying to collect texture file from an empty bitmap (missing file path)
update 1.7.8: BugFix,it was failing if you have been switching between different render engine without closing the script , because the render engine detection was happening at script startup, now the render engine check happen when clicked on "Save Selected" button.
update 1.7.9: now also collect .osl files
update 1.8 : You can now archive as a zip a rar or a 7zip file (requested by kino_unico), i also simplified the naming process, you don't need to browse for a folder then type the file name or choose "auto filename" anymore, now it directly opens a browser to save file (it will automatically enter the first selected object name as base name), you can choose to save the file as a previous versions of 3dsmax if needed.
update 1.9: Saving to a previous versions of 3dsmax wasn't working well, i had to add a UI element to choose the desired version before saving, sadly the built in saving dialog doesn't return the chosen version...so there is no need to choose the version from the saving dialog.
update 2.0: Did some Code cleanup, and refine the archive functions, added some option to clear environment maps, effects and atmosphere, this new version keeps your latest chosen options as default settings.
update 2.1: Option to delete empty layers added (requested by AeRo).
update 2.2 : Option to strip path in destination file added ((requested by AeRo).
update 2.3: Bug fix, the script was crashing when trying to relink path on a bitmap that doesn't have any path.
update 2.4:Bug fix, after saving with clear render elements checked, render elements where recreated in current scene but with default settings, now it recreates them with previously stored user settings of each render elements
update 2.5:Bug fix, the script was trowing an error when the sme material editor has never been open in the current session of 3dsmax.

Comments
i tried the exact same setup
i tried the exact same setup and it works fine for me, i tested on max 2020 and 2023 with vray 5 an 6 and have no problem, it very strange...
what's your 3dsmax and vray versions?
Sure
I've tried the most basic material, a multi/sub-object with 2 materials that each have a vraybitmap in the diffuse slot
I've also attached a screenshot
VrayBitmap in multi/sub-object Bug
It seems to be related to vraybitmap not having any "filename" attribute, for VrayBitmap the filename attribute is called "HDRIMapName" thats why it could not find it, it should'nt cause any error since i already have a part of the script dealing with this issue. When i try to replicate your issue by creating a multi/sub-object material that has VrayBitmaps it saves without error, it must be something else, your VrayBitmap must be in a situation that i didn't anticipate, it's hard to debug without the actual scene that cause the error, can you send me the material or take a screenshot of the nodes layout?
"-- Unknown property:
"-- Unknown property: "filename" in Map #2138623734_VRay:VRayBitmap"
This is the error I get it only happens if the multi/sub-oject has a bitmap file
Without it it works fine
update 1.5
You're welcome :)
i've updated the naming part, you can now specify the new name before saving it will skip the second browser, if both checkbox are unchecked or if you checked "custom file name" but didn't enter any name it will open a browser to choose file name and location.
For the sub-object problem you are facing, i have no problem exporting sub-object material, it must be something else that cause the problem, can you share your file for investigation?
and one more thing (actually 2)
because there's always one more thing usually :))
It gives a error when saving out multi/sub-object maps.
And could you please make the option to save with name default to the same folder
as the maps folder? Currently you have to navigate it twice to save out an asset.
Either way, brilliant and thank you for your work!
merci beaucoup!!!
merci beaucoup!!!
You are welcome
Glad you like the script
You can download the new update it has your request included ;)
by default you have to uncheck the option to behave as desired, you can edit the script in notepad and remove " checked:true " or replace by " checked:false" in the line checkbox autoname "auto file name" at the begining of the script. It will then be unchecked by default.
Thank you!
Very simple and useful, thank you!!
Could you please add a option to specify file names?