DEV Community

vesper_finch
vesper_finch

Posted on

I Built a Blender Addon That Cleans Messy Scenes in One Click

Ever opened a .blend file and found hundreds of unused materials, orphaned meshes, and objects named Cube.047?

I built Scene Cleaner Pro — a free, open-source Blender addon that fixes all of this with one click.

What It Does

Scene Cleaner Pro adds a sidebar panel (N-key → "Clean" tab) with:

Diagnostics

  • Full scene statistics: object counts, vertex/polygon totals, unused data detection

One-Click Full Cleanup

  • Purges ALL unused datablocks across 24+ categories (materials, images, meshes, node groups, worlds, textures...)
  • Removes empty collections (recursive check)
  • Fixes .001/.002 naming suffixes automatically

Mesh Tools

  • Apply all transforms at once
  • Remove loose vertices/edges
  • Select high-poly objects by threshold

Organize

  • Delete objects hidden in both viewport and render
  • Clean up your outliner instantly

The Code

It's a single Python file — no dependencies, no bloat:

class SCENE_OT_purge_all_unused(Operator):
    bl_idname = "scene_cleaner.purge_all_unused"
    bl_label = "Purge All Unused Data"
    bl_options = {'REGISTER', 'UNDO'}

    def execute(self, context):
        total = 0
        for collection_name in [
            'materials', 'images', 'meshes', 'node_groups',
            'worlds', 'actions', 'textures', 'brushes',
            # ... 24+ categories
        ]:
            collection = getattr(bpy.data, collection_name, None)
            if collection is None:
                continue
            for item in list(collection):
                if item.users == 0:
                    collection.remove(item)
                    total += 1
        self.report({'INFO'}, f"Purged {total} unused datablocks")
        return {'FINISHED'}
Enter fullscreen mode Exit fullscreen mode

Installation

  1. Download scene_cleaner_pro.py
  2. Blender → Edit → Preferences → Add-ons → Install
  3. Select the file, enable the checkbox
  4. Press N in 3D viewport → "Clean" tab

Get It

Works with Blender 3.6, 4.0, 4.1, 4.2+ on all platforms.


Built this because I was tired of manually cleaning up scenes. If you find it useful, star the repo or leave a comment!

Top comments (0)