Blender Studio
  • Films
  • Projects
  • Training
  • Assets
  • Tools
  • Blog
  • Join
  • BLENDER.ORG

    • Download

      Get the latest Blender, older versions, or experimental builds.

    • What's New

      Stay up-to-date with the new features in the latest Blender releases.

    DEVELOPMENT

    • Roadmap

      See which projects are currently being worked on and what's next.

    • Documentation

      Guidelines, release notes and development docs.

    LEARNING & RESOURCES

    • Blender Studio

      Access production assets and knowledge from the open movies.

    • Manual

      Documentation on the usage and features in Blender.

    • Benchmark

      A platform to collect and share results of the Blender Benchmark.

    • Blender Conference

      The yearly event that brings the community together.

    DONATE

    • Development Fund

      Support core development with a monthly contribution.

    • One-time Donations

      Perform a single donation with more payment options available.

Training Highlights
Advanced Facial Rigging
3D Printing with Blender
Story Tools
Blender Fundamentals 4.5 LTS

Training types
Course Documentation Production Lesson Workshop

Training categories
Animation Geometry Nodes Lighting Rendering Rigging Shading
Film Highlights
Singularity
2026
Wing It!
2023
Hero
2018
Spring
2019
Project Highlights
Impulse Purchase
Other
Project Storm
Rigging R&D
DOGWALK
Interactive
Project Gold
Showcase
Assets Highlights
Characters
Models & rigs
Assets
All production files
Libraries
Curated sets
  • Wing It!

Introducing bbatch: batch file processing with Blender

bbatch is a command line tool used to find .blend files and execute a provided python script.
  • Update
  • 14 Dec 2023
  • 2 min read
Nick Alberelli
Nick Alberelli Pipeline TD
Report Problem

A very common task during production is to perform repetitive actions on multiple .blend files (fixing paths, adjusting settings, etc.). This process can be time consuming and error-prone.

After writing small ad-hoc scripts for years, today we are sharing bbatch, a command line tool used to find .blend files in a given directory and execute a provided Python script on each file. Here is a quick overview.

Simply provide bbatch with a directory and a Python script and bbatch will execute that script on all the .blends it can find within the directory structure. bbatch’s functionality is only limited by a user's imagination and Python scripting abilities. Any script that can be run by Blender’s text editor) can easily be executed on a directory of .blend files via bbatch.

bbatch was developed during the production of Wing It!, an earlier iteration of this tool was Blender Purge, which was used to crawl directories and purge unused data blocks. bbatch retains the purge functionality and adds several new features, to quickly execute scripts on a directory of .blend files.

Features:

  • Automatically saves .blend files after script execution
  • Automatically detects Blender if installed on your system 
  • Supports passing multiple script files
  • Supports traversing multiple directories
  • Filter only for .blend files that match a given string
  • Ships with a purge script to remove unused data-blocks from all crawled files

How does it work?

First, check out the repository at projects.blender.org.

bbatch uses Blender’s command line arguments to open a “background blender” and runs a user provided script. bbatch does not create additional save versions when saving after script execution. To use bbatch follow the instructions on the bbatch readme.

Comments are welcome!

If you have feedback or suggestions, reach out via the comments or in the Blender Studio Pipeline Issue Board. Enjoy bbatch!

Join to leave a comment.

0 comments
Films Projects Training Blog Blender Studio for Teams
Pipeline and Tools
  • CloudRig
  • Blender Kitsu
  • Brushstroke Tools Add-on
  • Blender Studio Extensions
Characters
  • Critter Evolved
  • Critter
  • One
  • Space Creatures
Studio
  • Terms & Conditions
  • Privacy Policy
  • Contact
  • Remixing Music
Blender Studio

The creators who share.

Artistic freedom starts with Blender The Free and Open Source 3D Creation Suite