build_scene_from_json
Build a complete Blender scene from a JSON description, generating and executing a bpy script in headless Blender.
Instructions
Build a complete Blender scene from a JSON description.
Generates a bpy script from the JSON and executes it in headless Blender. Adapted from CLI-Anything's scene building approach.
The JSON format supports:
materials: [{name, color, metallic, roughness}]
objects: [{mesh_type, name, location, rotation, scale, material, modifiers, collection, smooth}]
cameras: [{name, location, rotation, focal_length, active}]
lights: [{name, type, location, rotation, power, color, size}]
render: {engine, resolution_x, resolution_y, samples}
Example: { "materials": [{"name": "Red", "color": [1,0,0,1]}], "objects": [ {"mesh_type": "sphere", "name": "Ball", "location": [0,0,1], "material": "Red", "smooth": true, "modifiers": [{"type": "subdivision_surface", "params": {"levels": 2}}]} ], "cameras": [{"name": "Cam", "location": [0,-5,2], "rotation": [80,0,0], "focal_length": 85, "active": true}], "lights": [{"name": "Key", "type": "AREA", "location": [2,-2,3], "power": 200}] }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_json | Yes | ||
| blend_output | No | ||
| render_output | No |