Collecting scene maps


#1

Hi there,

do any of you know if there is some way of accessing scene maps in Maxscript? The method I mean specifically is the one that’s available in the Material/Map Browser: “Get All Scene Materials/Maps”. If I am not mistaken, this collects all maps that have been incorporated into the scene by some method other than existing in materials. I originally thought this may be available as a system global similar to scenematerials, but couldn’t find anything on that topic.

If there’s no inbuilt method, I was thinking of collecting all texturemap classe’s classinstances, tracking dependencies and narrowing down the array to something resembling the results that the Material/Map Browser offers. Thought I’d check here and see if someone may have some rough pointer to a solution that I’m missing! :slight_smile:

Thanks!


#2

Try with this:

usedMaps()


#3

Was new to me, thanks! That does, however, seem to be restricted to bitmap textures. The method within the Material/Map Browser collects any kind of map.
But that’s the basic functionality I was hoping for.


#4

You can try this

fn get_all_maps =
(
	tex_array = #()
	for tex_class in texturemap.classes do join tex_array (getclassinstances tex_class)
	return tex_array
)

get_all_maps()

It will gathers all maps of the file