Blender Studio
  • Films
  • Projects
  • Training
  • Assets
  • Blog
  • Community
  • 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.

    LEARNING & RESOURCES

    • Blender Studio

      Access production assets and knowledge from the open movies.

    • Manual

      Documentation on the usage and features in Blender.

    DEVELOPMENT

    • Developers Blog

      Latest development updates, by Blender developers.

    • Documentation

      Guidelines, release notes and development docs.

    • 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
Facial Rigging
Blender Fundamentals 4.5 LTS
3D Printing with Blender
Video Log #6: Promo video

Training types
Course Documentation Production Lesson Worskhop

Training categories
Animation Geometry Nodes Lighting Rendering Rigging Shading
Film Highlights
Singularity
2025
Wing It!
2023
Spring
2019
Hero
2018
Project Highlights
Impulse Purchase
Showcase
Project Storm
Showcase
DogWalk
Showcase
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 Author
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.

Films Projects Training Blog
Characters
  • Storm
  • Mikassa
  • Whale
  • Ballan Wrasse
Studio
  • Terms & Conditions
  • Privacy Policy
  • Contact
  • Remixing Music
  • blender.org
Blender Studio

The creators who share.

Artistic freedom starts with Blender powered by CG Global Entertainment Ltd.
粤ICP备2024327355号-3