One of the hidden gem of the new 3dsMax 2019 feature is the Custom Scene File Data Streams. This allows uses attach custom strings to your max and access from outside of 3dsmax. It is not only eliminate the need of companion external file for such data but also opens up accesing of .max file related data to any program or language.
For more details, check the help.
To show the power of this feature, I made a sample implementation of this feature. csMergeBy script. It allows users to merge object from other .max file by Layer, SelectionSet, ObjectID and Material name.Download CsMergeBy 1.0
There are 2 files in the zip file. The first one is csMergeBySave.ms which registers post save callback to save the scene data as xml and write to Custom Scene File Data Stream. You need to drop this into your startup script folder or one of plugins folder to run this script automatically everytime when you launch 3dsMax.
For exmaple, C:\Users\[username]\AppData\Local\Autodesk\3dsMax\2018 – 64bit\ENU\scripts\startup
This script would increase file saving a littlt bit. When I tested it, it took 0.1 sec for for 1,000 objects. BUT, I also have an extreme case of 29,769 objects which add 4.5 sec for saving. Considering the file saving itself would take some time, It was not noticable. But, I still want to give you heads up for the possible saving time increase.
The second file is csMergeBy.ms. This is actually a macro script. Just drag and drop this file into iewport. It will make csTools > csMergeBy action. This is the merge dialog.
How to use is simple.
- Select a max file which you want to merge from using the top button
2. Choose “Merge By” method from dropdownlist. You can use…
Layer – with hierarchy
Layer – no hierarchy
3. Choose items in the left list. You can CTRL+click to select multiple items. CTRL+click also deselect item.
As you choose item in the left list. Preview object list will be updated.
By default, all objects in the preview will be selected. But, you can only select the objects you want.
If you have a lot of objects(1000+), it might take a while to update the object list. Then you cah turn off Preview object names chekbox to not to show the object list. Then all objects in the selected items will be merged.
4. Then press Merge.
5. All megered object will be in “JustMerged” selection set for your convinience.