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 you don't want to change your scene bitmap paths, Save it before applying the script then reload the scene.
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.
Comments
yeah!!!
:) don't worry, i am glad that you've reported bugs and added new ideas, it makes the script more reliable for everybody.
it is solved!!!
I downloaded 1.5 again and I no longer get any errors.
I feel embarrass for troubling you but now it works.
Thank you very much again!
???
I've installed vray 6 on max 2020, but i can't get the same bug, every time it works just fine, i dont know what to do...
You can redownload v1.5, i've made a few changes to the renaming part that has become a little buggy with the new changes, now it works fine.
For your VrayBitmap problem, i run out of solution, can you try to save select the same material but as individual materials keeping the vraybitmaps but without multi/sub-object.
And an other test keeping the multi/sub-object material but with standard bitmaps.
odd it's max 2020 and vray 6
odd it's max 2020 and vray 6 update 1.2
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!