Notifications
Clear all

[Closed] Collecting scene maps

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!

Thanks!

3 Replies

Try with this:

usedMaps()

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.

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