Scripts & Testing
This section covers how to create, test, and manage your custom Python scripts for Brender Cloud, including best practices, limitations, and testing procedures.
Writing Custom Scripts
With Brender Cloud, you can write Python scripts to enhance your Blender workflows. These scripts allow you to automate tasks, control rendering settings, and integrate advanced features using the full power of Blender’s bpy
API.
Python jobs with custom scripts run in an offline environment.
Ensure all required assets are included in a .zip
file with relative paths, as external resources cannot be accessed during execution.
Key Features
-
Reusability:
Once uploaded, your scripts are available to the entire studio, making it easy to share and reuse functionality. -
Customization:
Leverage both Blender’s internal modules and a curated list of external pip modules for extended capabilities. Please refer to Supported Modules for a list of approved external modules.
Script Limitations
Limitation | Details |
---|---|
File Size | Maximum allowed file size is 1MB per script. |
Module Restrictions | Certain internal/external modules are blocked for security reasons. |
Please refer to Unsupported Modules for a list of restricted modules.
Testing Your Scripts
Before launching a full render job, you can test your scripts in a controlled, CPU-based environment. This process helps verify that your script’s logic is sound and free of errors. Navigate to the Brender Cloud Scripts Portal to upload and test your scripts.
Please refer to the full guide on Testing Scripts for detailed instructions.
Test executions are FREE and do not consume any render usage.
Test Environment Limitations
Aspect | Details |
---|---|
.blend File Size | Maximum allowed file size is 15MB. |
Runtime | Maximum runtime of 5 minutes. |
Rendering Engine | Eevee is not supported in test mode. |
Output | No file is generated; instead, the file structure is printed using BC_OUTPUT_FOLDER . |
The testing environment is solely for verifying logic. When rendering an actual frame, consider lowering the resolution (e.g., 250x250px) and sample count (1 sample).
You can also print images in base64 for a quick preview.