Skip to content

API Cheatsheet

A quick lookup of the calls you'll use most. Import from submodules (from dsl.actors import ...), not the dsl package root.

Opening a shot

with location.Sub.Anchor as shot:   # anchor-based
with location as shot:              # location-based (use at=)
with bare_scene as shot:           # no set

Casting characters (rig + voice)

Voice is split from the rig — pick it at cast time (string name or Voice singleton); tone via instructions. Both fall back to the character's curated defaults.

from dsl.actors import brian
from dsl.voices import onyx, by_gender

brian("Bob")                                   # default voice + tone
brian("Bob", voice=onyx)                        # or voice="onyx" (string lookup)
brian("Bob", instructions="Whisper. Tense.")    # override delivery only
brian("Bob", voice=onyx, instructions="…")      # both
by_gender("male")                               # gender-filtered Voice list (+ neutral)

Full list: Voice Catalogue · API detail: Actors → voices.

ShotContext methods

Method Signature Effect
block block(blocking, *characters, at=None) place a group (one per shot)
add add(character, at=None) place a single actor
walk_to_join walk_to_join(blocking, walker, target, walker_start=None, at=None) walk into a formation
camera camera(name, **kwargs) record the camera spec
lighting lighting(name, **kwargs) record the lighting spec
clip clip(seconds) hard ceiling on duration
output output(path) custom output (rel. to renders/)
mark_actor_has_action (character) suppress the auto default-idle

After the block: shot.render.source_path, shot.frame_start, shot.frame_end, shot.actors.

Character methods

idle() · say(dialog, action_name="idle") · walk_to(loc) · move_to(loc, action="walking") · walk_to_join(target, blocking, start=None) · set_frame(n) · .actor

Cameras

static · push · arc · tilt · rotating · dolly_zoom · tracking_static · tracking_moving · global_static

Common kwargs: mode (closeup/medium/wide), R, theta, phi, subject.

Lighting

rembrandt · three_point · butterfly · split · silhouette · spotlight · hdr · none

Blocking

Group Primitives
2-person shoulder_to_shoulder face_to_face back_to_back in_line conversational_l
3-person lecturer_triangle leader_in_front three_single_file coach_behind two_lead_one_follow huddle_triangle inward_row attention_right
4-person horizontal_line four_single_file two_by_two diamond_forward diamond_vip arrow_wedge square_inward

Render profile

use_fast_output(engine="workbench", downsample_factor=4, output_fps=1, frame_step=24)
use_production_output(engine="cycles", cycles_samples=128)

Edit DSL

edit = Edit("name")
with edit.clip(shot.render, name="a") as c:
    c.trim(0, 3); c.fade_in(0.3); c.look("cold"); c.caption("…"); c.music("bgm/…")
edit.between("a", "b").crossfade(0.4)
edit.letterbox("2.35")
edit.save("out.mp4")