Multi document

Rumba can be used to layout several animations together on a dynamic, editable timeline.

Basics

Using the MediaLayer as a track, documents can be added as MediaClips and arranged as needed. Only one document is active at a time and only the active document can be edited.

The active document can be changed by chosing Set Active Document in the right click menu of MediaClip items. The document switch combo box at the top right of the interface also allows you to quickly switch between documents.

All loaded documents visible at any given frame will be displayed in the viewport, even if you change the active document.

Documents

In a multi document setup, there are two documents that play a special role:

  • The active document is the currently edited document, it is the one that can be edited, that controls the timeline widget, etc…

  • The main_document is the document which was created with New or opened with Open. It is the temporal reference when it comes to displaying all other documents in sync in the viewport.

At all times, there is exactly one active document and one main document.

Main camera

When working with several documents, you may want to switch between cameras during playback, and these cameras may be located in any of the currently playing documents.

To that end, you can leverage the Main Camera item in the camera switching widget. When Main Camera is selected, the viewport will be displayed through the eye of the camera with the Main plug set to true (it is false by default), whatever document it may come from.

Let’s say that you have 4 shots on a layer following one another and each of them has its own camera with its Main plug set to true. Playing back the sequence with the Main Camera selected will automaticaly switch between the cameras of the shots as they appear, diplaying the sequence the way it’s meant to be seen.

Scripting

Multi document setups can also be created from python using the scripting API of MediaLayer and MediaClip.

import rumbapy

doc0 = "/my/project/anim0.rumba"
doc1 = "/my/project/anim1.rumba"
doc2 = "/my/project/anim2.rumba"

# Create a MediaLayer
layer0 = rumbapy.add_media_layer()

# Create Media objects from documents
media0 = rumbapy.get_media(doc0)
media1 = rumbapy.get_media(doc1)
media2 = rumbapy.get_media(doc2)

# Create MediaClips from Medias and put them on the MediaLayer, with an optional frame offset
clip0 = rumbapy.add_media_clip(layer0, media0)
clip1 = rumbapy.add_media_clip(layer0, media1, frame=100)
clip2 = rumbapy.add_media_clip(layer0, media2, frame=256)

# MediaClips of documents expose a frame based API
clip0.frame_offset.set_value(10)
clip0.frame_clip_in.set_value(31)
clip0.frame_clip_out.set_value(60)

# Here we add another MediaLayer on top, it will play simultaneously
doc3 = "/my/project/anim3.rumba"
layer1 = rumbapy.add_media_layer()
media3 = rumbapy.get_media(doc3)
clip3 = rumbapy.add_media_clip(layer1, media3)

import rumba

# Creating document Medias does not load them by default to save on loading times.
# Call add_document on the document files you want to see in the viewport.
# add_document does not change the main or active document.
rumba.add_document(doc0)
rumba.add_document(doc1)
rumba.add_document(doc2)
rumba.add_document(doc3)

Suggested workflow

A simple way to get good results with multi-document setups is to use one document as an entrypoint.

This document (let’s call it the layout document) would mostly contain media layers with document clips and act as an editing table for the sequence. The layout document exposes the whole sequence interactively, and an animator can easily go and work on his shot using Set Active Document. Only the currently active document can be edited but all content coming from other documents playing at the same time will be displayed.

This gives great flexibility when it comes to organizing animation work, editing and layout changes can happen at the layout document level while animators work on their shot in parallel in their own separate document.