Here are some short and simple maxscript snippets that I use quite often. They are very simple and there’s probably a cleaner way to do what they do, but who knows, it can be useful for someone… Replace a map by another In this example, the code collects all the Normal_Bump maps, to replace them by a VRayNormalMap one, while keeping the same bitmap input. _mapArray = getClassInstances Normal_Bump for i in _mapArray do ( _bitmapNode = i.normal_map _newNode = VRayNormalMap() _newNode.normal_map = _bitmapNode replaceinstances i _newNode ) 123456789 _mapArray = getClassInstances Normal_Bumpfor i in _mapArray do( _bitmapNode = i.normal_map _newNode = VRayNormalMap() _newNode.normal_map = _bitmapNode replaceinstances i _newNode) Get all the node’s dependances This code get all nodes that have speficic node linked to. The node can be a mesh, a map, a light… Here it collects all the Normal_Bump maps, and collects all the VRayMtl material linked to them. _mapArray = getClassInstances Normal_Bump _matCollection = #() for i in _mapArray do ( _matCollection = for u in (refs.dependents i) where (classof u == VRayMtl) collect u ) 123456 _mapArray = getClassInstances...

The first stable release of the Matlib Manager is out ! This script allows to save a matlib from a scene or a selection, and to save which material goes with which objects (name-based). Then it can be easily/automatically reapplied. It has been initially created for the Cosmic Love production, but this brand new version have been entirely recoded, that’s why it’s an alpha version: I’ve done a massive debugging, but I’m waiting for feedbacks to set it officially to a « stable status. Here is the dedicated page, with usage and installation instructions: onectin.fr/matlib-manager. You can also check my Github page. ...