File Wrangler - Batch Processor For Blender
My custom script doesn't seem to do anything. What's wrong?
If you've enabled the "Run Custom Script" action but your files aren't being changed, it's almost always due to one of two common issues:
1. Your script is wrapped in an if __name__ == "__main__": block.
When File Wrangler executes your script, it uses a method that does not set the script's __name__ variable to "__main__". This means any code inside that if block will be skipped.
2. Your script relies on a context other than the 3D Viewport.
To run scripts, File Wrangler must provide a valid "context." The addon is specifically designed to find and provide a VIEW_3D (3D Viewport) context.
This means that operators and scripts which depend on any other editor window being active will fail with a "context is incorrect" error.
Will likely fail: Any operator that needs the Video Sequence Editor, Compositor, Shader Editor, or Image Editor to be the active window.
Will likely work: Operators that run in the 3D Viewport (e.g., bpy.ops.object.select_all()).
Best Practice (Most Robust): The safest method is to write scripts that do not rely on operators or UI context at all. Instead, access and modify data directly through bpy.data and bpy.context.scene.
Does it work on Windows, macOS, and Linux?
Yes. File Wrangler works on any operating system that Blender supports.
Do I need to know how to code to use this?
Not at all! The core features like cleaning up backups, purging data, managing paths, and handling compression require no coding whatsoever. The custom scripting feature is an optional, advanced tool for users who want to perform highly specific custom actions.
What happens if I make a mistake? Can I undo the process?
There is no "undo" button for the batch process itself, which is why using the Output Directory is the safest workflow. If you process your files into a new directory and don't like the result, you can simply delete that directory and your original files will be safe and unchanged.