ScriptSpot

Forum topic · General Scripting

Go up the hierarchy, get Material from Map

By br0t · 2011-06-06

Description

Hi,
so I get all bitmaps in my scene using

 theBMs = getClassInstances bitmapTexture

Now looping over scene objects, I want to test if e.g. theBMs[1] is part of the material applied to the current object in the loop. Is there a way to get the material in which this bitmap is in?
I guess I could get all maps of that material and check if any of them is equal to the bitmap, but I thought maybe there is like a function to get it faster e.g.

getParent theBMs[1]

or sth. like that...

Cheers

Comments (2)

br0t · 2011-06-07

Well, so be it :[

Anubis · 2011-06-06

Well, am also want to has such function but unfortunately we are forced to do this in a hard way.