The Visibility support is not part of the XMesh Saver plugin itself, but of the XMeshSaver.mcr MAXScript UI.
So if you have implemented your own MAXScript saver that calls the XMeshSaverUtils methods, but you are not using the actual XMeshSaver script we ship, then you would be lacking that capability.
On the other hand, if you are using the shipping script, then the property XMeshSaver_Settings.ObjectVisibilityMode set to 3 would enable the “Do Not Save” if Visibility is less than 1.
You could copy and paste the code to support this behavior from our script into yours. Basically what we do is
- On each frame, filter the array of the meshes to save based on the visibility mode:
- if the mode is not 2 or 3, we just use the original array
- if the mode is 2, we filter for visibility == 0 (in fact we collect if visibility is > 0.0)
- if the mode is 3, we filter for visibility < 1 (we collect if visibility is >= 1.0)
- Then we pass the resulting filtered array to the saving function
Note that the filter function for visibility was recently updated to support correct visibility inheritance from parent objects, but we have not released that update yet. I have attached the updated version of the script, search for the function getInheritedVisibility to see how it is defined and where we are using it to filter the list of meshes to save…