Blender Add-On: Resize Texture Panel
Description:
This Blender add-on, “Resize Textures Panel”, is designed to resize image textures used by selected objects in your Blender scene. It helps optimize performance or reduce memory usage by scaling large textures down to a specified maximum resolution.
1. Addon Metadata
Registers the add-on name, author, version, location in Blender UI, and compatible Blender version (4.0.0+).
2. Property Group
Adds a customizable “Max Resolution” field to the UI for the user to set the target maximum width/height of image textures.
3. UI Panel
-
Adds a panel in 3D Viewport Sidebar > Resize Tab.
-
Displays:
-
The max resolution field.
-
A list of textures used by selected objects.
-
A button to trigger the resize operation.
-
4. Resize Operator
The core logic:
-
Iterates through selected objects.
-
Finds textures in node-based materials.
-
Resizes images if they exceed the specified
max_resolution
. -
Uses
image.scale(new_w, new_h)
and then packs the image into the .blend file to retain it.
✅ Pluses / Benefits
👍 User-Friendly
-
Intuitive UI in the 3D viewport sidebar.
-
Displays which textures are being used and their resolutions.
🚀 Performance Boost
-
Great for optimizing large scenes by reducing texture sizes.
-
Helps avoid high memory usage or GPU bottlenecks.
🔁 Reusable & Non-destructive
-
Uses Blender’s built-in
scale()
andpack()
methods. -
Prevents resizing the same image multiple times by tracking with a
seen
set.
🧩 Blender Native
-
Built with the standard
bpy
API. -
Supports Blender 4.0+.
🛠️ Installation Instructions
-
Save the Script:
-
Copy the code into a
.py
file (e.g.,resize_textures_panel.py
).
-
-
Install in Blender:
-
Open Blender.
-
Go to
Edit > Preferences > Add-ons
. -
Click “Install…”, select the
.py
file, and click “Install Add-on”. -
Enable the checkbox next to “Resize Textures Panel”.
-
-
Use It:
-
In the 3D Viewport, go to the Sidebar (press
N
). -
Look for the “Resize” tab.
-
Set the Max Resolution.
-
Select your objects and click “Resize Textures”.
-