DMA 30 · Optional studio reference

Blender Python recipes

Load a small script to set up a tool or check your work. Keep your thumbnails nearby to guide choices about shape, motion, light, and camera.

Run a script in Blender

  1. In desktop Blender, use File → Save As to make a practice copy of your .blend. Read the recipe and check which scene is active.
  2. Download the .py. In the Scripting workspace, go to the Text Editor and choose Text → Open. You can also create a new text block and paste the code.
  3. Edit the settings near the top of the script. Choose Run Script (the play icon in the Text Editor). Check the result in the panel named by the recipe. For reports, use the Text Editor’s text-block dropdown.
  4. Change one creative setting. Compare your test with your thumbnail, then use your result to plan the next pass.

If a script stops. Read the error first. Check the selected object, active scene, or file path listed in the recipe. Open your practice copy again if you want to return to the starting scene.

Blender Manual · Text Editor · Blender Python API · Overview

Setup, modeling, and movement

Setup · Set the shot format

Set the active scene to 1920 × 1080, square pixels, 24 fps, and frames 1–120. That range gives you five seconds of playback. Use the class brief to choose the image size, rate, and duration.

Check. Open Output Properties and the Timeline. Decide how much of the shot your action needs.

Modeling and UV · Inspect a mesh

Select a mesh in Object Mode. The script counts vertices, edges, face types, and render triangles in the source mesh before modifiers. It lists boundary and loose edges and shows which UV maps exist.

Check. Open Rough Pass Mesh Report in the Text Editor. Decide whether a boundary is intentional, then inspect the surface from two views. Check UV stretching visually after unwrapping.

Timing, Grease Pencil, and rigging · Mark three beats

Set START, MIDDLE, and END to frame numbers in the scene range. The script creates or updates three RP Beat markers. Markers label frames. Add your own keyframes, poses, or drawings where the action needs them.

Check. Look at the Timeline or Dope Sheet. Choose a middle beat that fits the action, then test whether it reads at playback speed.

Materials, lighting, and 360° cameras

For the materials module, compare a matte pass with a glossy pass on the same model. Set Principled BSDF roughness with Python

Lighting · Aim an area light

Enter the lamp’s XYZ POSITION and where it should point at TARGET. The script adds or updates RP Area Key for you to position and adjust.

Check. Inspect the shot in Rendered view. Move the light or change SIZE and compare the shadow edges. Aim for a silhouette that reads at the shot size.

Lighting · Set up an HDRI world

Choose a local equirectangular .hdr or .exr environment image you can use and credit. Edit IMAGE_PATH, for example //assets/hdri/studio.exr relative to a saved .blend. An absolute path also works.

The script assigns an RP HDRI World to the active scene. It wires Environment Texture to Background and updates the image and strength when rerun on its own world. To keep your prior World in the file, turn on its Fake User shield before switching to the HDRI.

Check. Use Rendered view or render one frame. Open the Shader Editor in World mode to inspect the nodes. Compare two strengths under the same camera and choose the one that keeps the subject legible.

Blender Manual · Environment Texture

Camera and Open Studio · Set up a 360° panorama

Run this in a separate version of your scene. It activates RP Panorama and sets Cycles, one view, and a full-frame 2048 × 1024 output. The equirectangular camera captures 360° horizontally and 180° vertically from a single point.

Check. Change CAMERA_LOCATION for viewer height or move the camera in the scene. Change HEADING_DEGREES to test what appears in front. Render one frame before rendering a sequence. The flat 2:1 image stretches near the poles. View it in a 360° viewer and inspect the seam and viewer height.

Choose this setup for a look-around scene or environment map. To show the outside of a model with a turntable shot, use a regular camera and animate an orbit.

Blender Manual · Panoramic cameras

Group handoff and final delivery

Delivery · Check the scene and linked images

The script reports the active camera, engine, render size, frame range, output path, and whether Blender can find unpacked still-image files. Read these results in a Text Editor report.

Check. Open Rough Pass Handoff Report in the Text Editor. Check audio, video, image sequences, tiled textures, and linked Blender files separately. Have a teammate reopen a copy and play the exported file.

Review the final delivery checklist