Notifications
Clear all

[Closed] Find if Bitmap is used by a scene object

Hi All,

Is there a smart way to find out which scene objects have a material that is using a certain Bitmap.

The only way at the moment I can think of doing it is to loop through all objects checking .material property and looping though the map channels of that material until a bitmaptexture is found to be referencing the file string im checking for.

Im not even sure if that will work, is there a quick and easy way?

Cheers

Dan

5 Replies

I found this in the help:

usedMaps MAXWrapper

should make things easier.

there is an easier way


bmaps = getClassInstances BitmapTexture

for b in bmaps do (
   local thefile = filenameFromPath b.filename
   if thefile == "me.jpg" then (
	  -- do something
   )
)

hope that helps.

Thanks MoonDoggie I will give it a try.

Cheers

Dan

That work great, it solved some other problems I was having too.

Cheers

Dan

Good to hear, getclassinstances helps because bitmaps can appear in displacement maps, projection maps etc. Glad it helped.

-Colin