Hi Everyone,
I was wondering how you could get the pixel width and Height of a diffuse/Base texture in maxscript? Is there anyway to access this information through scripting?
Thanks!
Forum topic · General Scripting
By Dannat121 · 2011-07-28
Hi Everyone,
I was wondering how you could get the pixel width and Height of a diffuse/Base texture in maxscript? Is there anyway to access this information through scripting?
Thanks!
sure! bm =
br0t · 2011-07-28
sure!
bm = meditMaterials[1].diffuseMap.bitmap
bm.height
bm.width
How you access the diffuse map depends on the material type, e.g. "diffuseMap" for Standard materials, "diff_color_map" for Arch&Design, "texmap_diffuse" for VrayMtl and so on. Your macro recorder can tell you the command when you turn it on and put a bitmap in a material slot.
Cheers
Dannat121 · 2011-07-28
Thanks Br0t!
This is exactly what I needed!