ScriptSpot

Forum topic · General Scripting

Get ClassInstances bitmaptex didnt catch the texture

By fajar · 2012-12-20

Description

hey everyone Im working on script asset management ...I got it all working till I got ClassInstances bitmaptex didnt work with arch_mi material....is there any way to retrieve same result as getclassinstances bitmaptex....raw data that contain all hidden data

btw im workin on max 9 tho....all vraymtl working if i assign texture map to it. the map cathced using getclass instance.

#(Map #2:Bitmap, Map #hall:Bitmap)
somthing like that.

thanks

fajar

Comments (6)

solution

barigazy · 2013-01-21

Hi fajar ,
maybe this can help

(
clearlistener()
mapsArr=#()
fn getMtlMaps mtl maps =
(
if mtl != undefined and mtl.numsubs != 0 do
(
for m = 1 to mtl.numsubs where (mtl[m] != undefined) do
(
if (isKindOf mtl[m] SubAnim) and (isKindOf mtl[m].Object textureMap) do append maps mtl[m].Object
getMtlMaps mtl[m] maps
)
)
)
getMtlMaps $.material mapsArr
mapsArr
--for i in mapsArr do print i.filename
)

Anubis · 2013-01-13

usedMaps()

and

enumerateFiles()

are useful if you need an array with bitmap's filenames (Strings), but not helps to collect instances of BitmapTex objects.

zahid hasan · 2013-01-21

i see,after reading your post i just realized how different they are.
though its getting my job done.i just need to collect bitmap texture.

zahid hasan · 2013-01-13

i am using max 2012 and same problem.specially some vray material and displacement related maps are not found.
so i am using usedmaps() instead.

fajar · 2012-12-21

hehhehhee.....damn...why they? duh....

thanks for the info anubis.

you're in trouble then

Anubis · 2012-12-20

as until Max 2011 (where it was fixed) getClassInstances cannot collect all nested class instances.