Get ClassInstances bitmaptex didnt catch the texture

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
barigazy's picture

solution

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
)

barigazy

Anubis's picture

usedMaps() and enumerateFiles()

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

my recent MAXScripts RSS (archive here)

zahidhasan's picture

i see,after reading your post

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.

zahidhasan's picture

i am using max 2012 and same

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's picture

hehhehhee.....damn...why

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

thanks for the info anubis.

Anubis's picture

you're in trouble then

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

my recent MAXScripts RSS (archive here)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.