Everything the panel does is available from Python (and Blueprint) through the editor subsystem TADraughtsmanSubsystem:
draughtsman = unreal.get_editor_subsystem(unreal.TADraughtsmanSubsystem)
draughtsman = unreal.get_editor_subsystem(unreal.TADraughtsmanSubsystem)
board = draughtsman.create_board( "/Game/Previs" , "SB_Forest" )
options = unreal.TADraughtsmanImportOptions()
options.panel_folder = "D:/Boards/Forest/Panels"
options.shot_list_file = "D:/Boards/Forest/shots.csv"
plan = draughtsman.make_import_plan(board, options) # changes nothing
print (plan.num_new, plan.num_changed, list (plan.warnings))
draughtsman.apply_import_plan(board, plan)
report = draughtsman.build_sequence(board)
print (report.master_sequence, list (report.kept_lens))
settings = unreal.TADraughtsmanAnimaticSettings()
settings.mode = unreal.TADraughtsmanAnimaticMode. BOARD
settings.output_path = "D:/Boards/Forest/animatic.mp4"
print (draughtsman.export_animatic(board, settings).frames)
Function
What it does
create_board(package_path, name)
A new storyboard asset, e.g. create_board("/Game/Previs", "SB_Forest").
open_panel(board)
Opens the ta Draughtsman panel, showing this board.
show_panel_page(page_index)
Shows page 0 (Shots) or 1 (Animatic).
select_panel_shot(shot_index)
Picks a shot in the panel, as a click on its row.
open_import_window(board, options, preview=True)
Opens the import window with these sources; preview reads them right away.
apply_import_window() / close_import_window()
Imports what the open import window shows / closes it.
The storyboard asset itself answers a few questions:
Function
Returns
board.find_shot_index(number)
The index of a shot by its number ("010", "sh010" and "10" are the same shot; with a scene, "01/010"), or -1.
board.get_shot_start(shot_index)
Seconds from the start of the board to the start of the shot.
board.get_total_duration()
The length of the whole board in seconds.
Function
What it does
make_import_plan(board, options)
Reads the sources and matches them against the board. Changes nothing. Returns a TADraughtsmanImportPlan.
apply_import_plan(board, plan)
Writes a plan into the board: shots, fields and panel textures.
import_sources(board, options)
make_import_plan + apply_import_plan.
reimport(board)
Imports again from the sources of the last import.
TADraughtsmanImportOptions has panel_folder, recursive, file_pattern, shot_list_file, xml_file and remove_missing_shots. A plan has shots (each with status, shot, changes and warnings), unmatched_panels, columns, warnings, error and the counts num_new, num_changed, num_unchanged, num_removed and num_panels.
For checking files without a board:
Function
Returns
parse_shot_list_file(file, frame_rate=24) / parse_shot_list_text(text, frame_rate=24)
The shots, recognised columns and warnings of a shot list.
parse_xml_file(file)
The clips of an FCP 7 XML edit.
parse_panel_name(name, file_pattern, frame_rate=24)
Scene, shot, panel and duration read from a file name.
parse_duration(text, frame_rate=24, frames_by_default=False)
Seconds, or -1 when the text is not a duration.
Function
What it does
build_sequence(board)
Creates or syncs the master sequence, shot sequences, cameras and cuts. Returns a TADraughtsmanSyncReport (master_sequence, shots_created, shots_updated, shots_unchanged, sections_removed, cameras_created, kept_lens, messages).
pull_timing(board)
Takes shot lengths and order from the master sequence back into the board. Returns what changed.
open_in_sequencer(board, shot_index=-1)
Opens the master sequence, at a shot when given.
get_camera_focal_length(board, shot_index) / set_camera_focal_length(board, shot_index, focal_length)
The lens of the shot’s camera.
get_shot_section_frames(board, shot_index) / set_shot_section_frames(board, shot_index, frames)
Start and length of the shot’s section in the master, in display frames.
Function
What it does
set_overlay_board(board)
The board the overlay shows.
set_overlay_mode(mode, opacity=0.5)
TADraughtsmanOverlayMode.OFF, OVERLAY, LINES, WIPE or CORNER.
pin_shot(shot_index, panel_index=0)
Shows this shot’s panel when Sequencer does not drive the overlay.
get_overlay_info()
What the overlay shows right now: board, shot, panel, whether a panel is drawn and where it comes from: Sequencer (the playhead) or Pinned (a picked shot).
jump_to_shot(board, shot_index, offset_seconds=0)
Moves the Sequencer playhead to a shot of the open master sequence.
save_viewport_image(file, with_overlay=True)
Saves the camera frame of the level viewport as PNG.
get_image_average(file)
The average colour (sRGB, 0 to 1) of an image file, for checking saved frames. Alpha is -1 when the file cannot be read.
Function
What it does
export_animatic(board, settings)
Writes an animatic. Returns output_path, frames, width, height, seconds, fell_back_to_png and cancelled.
save_board_frame(board, shot_index, shot_time, settings, file)
One board frame with burn-ins as PNG.
find_panel_at_time(board, shot_index, shot_time)
The panel shown at a time inside a shot, or -1.
can_write_mp4()
True when MP4 can be written on this platform.
TADraughtsmanAnimaticSettings has mode (BOARD, CAMERA, SIDE_BY_SIDE, BOARD_OVER_CAMERA), format (MP4, PNG), output_path, width and height (0 uses the board’s resolution), shots (empty exports all), the burn-ins shot_number, shot_name, timecode, frame_counter, panel, lens, dialogue and title, burn_in_scale and board_opacity.