DEV Community

vesper_finch
vesper_finch

Posted on

How I Automated My Blender Game Asset Pipeline with Custom Python Addons

Every game project I work on hits the same bottleneck: exporting dozens of assets from Blender with consistent settings, checking mesh quality, and organizing scenes that have grown out of control.

So I built a set of addons to fix it. Here's the workflow and the code behind it.

The Problem

A typical game asset pipeline in Blender looks like this:

  1. Model the asset
  2. Check for mesh issues (non-manifold, flipped normals, etc.)
  3. Apply modifiers
  4. Set up UVs
  5. Export to FBX/glTF
  6. Repeat for every asset

Steps 2-5 are repetitive. Each one involves clicking through menus, adjusting settings, and hoping you didn't miss anything. When you have 50+ assets, this kills your momentum.

The Solution: 10 Single-File Addons

I built 10 Blender addons, each targeting one pain point. They're all single Python files with zero dependencies — just drop them into your addons folder.

1. Mesh Analysis Toolkit (12 operators)

Before exporting anything, you need to know if your mesh is game-ready:

class MESHQC_OT_check_nonmanifold(Operator):
    """Find non-manifold edges that will cause problems in-engine"""
    bl_idname = "meshqc.check_nonmanifold"
    bl_label = "Check Non-Manifold"

    def execute(self, context):
        obj = context.active_object
        bpy.ops.object.mode_set(mode='EDIT')
        bpy.ops.mesh.select_all(action='DESELECT')
        bpy.ops.mesh.select_non_manifold()
        # Count and report
        bpy.ops.object.mode_set(mode='OBJECT')
        count = sum(1 for v in obj.data.vertices if v.select)
        self.report({'INFO'}, f"Found {count} non-manifold vertices")
        return {'FINISHED'}
Enter fullscreen mode Exit fullscreen mode

This catches issues that cause invisible problems in Unity/Unreal — z-fighting, lighting artifacts, physics glitches.

2. Quick Exporter Pro (10 operators)

The core of my pipeline. Export everything in one click:

def _ensure_export_dir(context):
    """Return the export directory path, creating it if needed."""
    props = context.scene.quick_exporter_props
    export_path = bpy.path.abspath(props.export_path)
    if not export_path:
        blend_path = bpy.data.filepath
        if blend_path:
            export_path = os.path.join(os.path.dirname(blend_path), "exports")
        else:
            export_path = os.path.join(os.path.expanduser("~"), "BlenderExports")
    os.makedirs(export_path, exist_ok=True)
    return export_path
Enter fullscreen mode Exit fullscreen mode

It handles FBX, OBJ, and glTF/GLB. Select objects, pick format, export — all with consistent naming and settings across your entire project.

3. Modifier Stack Manager (13 operators)

When 50 props all need the same decimate + weighted normal setup:

def copy_modifier(source_mod, target_obj):
    """Copy a modifier from source to target, replicating all settings."""
    new_mod = target_obj.modifiers.new(
        name=source_mod.name, type=source_mod.type
    )
    for attr in dir(source_mod):
        if attr.startswith("_") or attr in ('bl_rna', 'rna_type', 'type', 'name'):
            continue
        try:
            setattr(new_mod, attr, getattr(source_mod, attr))
        except (AttributeError, TypeError):
            pass
    return new_mod
Enter fullscreen mode Exit fullscreen mode

Copy modifier stacks between objects, batch apply by type, reorder — all from one panel.

4-10. The Rest of the Toolkit

  • UV Tools Pro (14 ops) — Batch unwrap, UV packing, channel management
  • Scene Cleaner Pro (15 ops) — Purge unused data, remove empties, fix names
  • Batch Renamer Pro (12 ops) — Regex rename, sequential numbering, prefix/suffix
  • Material Manager Pro (13 ops) — Merge Material.001/.002 duplicates, batch edit
  • Collection Organizer Pro (12 ops) — Auto-sort by type, batch visibility
  • Viewport Toolbox (14 ops) — Camera bookmarks, focal length presets
  • Quick Lighting Studio (12 ops) — One-click three-point, studio, product lighting

My Actual Workflow

  1. Scene Cleaner → purge orphan data, remove empties
  2. Batch Renamer → enforce naming convention (prefixed by type)
  3. Material Manager → consolidate duplicate materials
  4. Mesh Analysis → check for non-manifold, flipped normals
  5. Modifier Manager → apply all modifiers in correct order
  6. UV Tools → verify UV coverage, pack islands
  7. Quick Exporter → batch export to FBX with game-ready settings

What used to take 30+ minutes per batch now takes about 2 minutes.

Get Them

All 10 addons are MIT licensed and free on GitHub:

127 operators total across all 10 addons. Each is a single .py file — no dependencies, no build step. Blender 3.6+.

If something doesn't work for your pipeline, open an issue and I'll fix it.

Top comments (0)