Writing material thumbnails
-
I'm using Material.write_thumbnail to create image files of materials but am running into a couple issues when materials have textures.
First, it does not seem to take material colorization into account in the written thumbnail file.
Second, it will fail if the texture thumbnail size is larger in pixelsize than the material texture. I can get around this one by checking the texture size first.
Does anyone anyone happen to know a way around the first issue besides applying my own colorization?
Thanks in advance.
-
Does TextureWriter do what you need?
-
Material.write_thumbnail
is bugged in its design. If I remember it preserves the aspect ratio but exports the largest dimension no larger than 128px (or something, at least the cause why it fails most of the times is when one dimension is rounded to 0). I'm still searching for the detailed forum post and bug report on this.Don't use it, but use Jim's suggestion with a material applied to a group. It will retain the color shift and colorized properties.
Advertisement