1

I'm new to blender.

I have a big .blend file and I need to decrease the size of the textures. How can I do it programmatically?

Ray Mairlot
  • 29,192
  • 11
  • 103
  • 125
  • Related: http://blender.stackexchange.com/questions/3333/how-to-scale-an-image-with-python – lemon Mar 21 '17 at 10:04

1 Answers1

2

Asked many times

To quickly scale all images in .blend to given size:

import bpy
for img in bpy.data.images:
    try:
        # for empty render result image, etc.
        img.scale(512, 512) # (width, height)
    except:
        pass
kilbee
  • 1,327
  • 12
  • 22