Notifications
Clear all
[Closed] Find if Bitmap is used by a scene object
May 06, 2007 9:28 pm
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
May 06, 2007 9:28 pm
I found this in the help:
usedMaps MAXWrapper
should make things easier.
May 06, 2007 9:28 pm
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.
May 06, 2007 9:28 pm
That work great, it solved some other problems I was having too.
Cheers
Dan
May 06, 2007 9:28 pm
Good to hear, getclassinstances helps because bitmaps can appear in displacement maps, projection maps etc. Glad it helped.
-Colin