0
$\begingroup$

In Python, is there a simple way to save everything in an editor, ex. the Sequence Editor to disk and later when needed load everything again?

enter image description here

The reason for this question is that changing scene will change the contents of most of the editors, and this is not always desired. Being able to save and load all content from from ex. Sequence Editor would be a way to workaround this.

$\endgroup$
2
$\begingroup$

Sequence Editor belongs to the scene.

The settings shown are on data that belongs to each scene. A new scene will use blender's defaults.

Python console. Create a sequence editor in the context scene. It is of type bpy.types.SequenceEditor. The value for overlay_frame is shown

>>> sed = C.scene.sequence_editor_create()
>>> type(sed)
<class 'bpy.types.SequenceEditor'>

>>> sed.overlay_frame
0

.

To have the same settings in another scene, would suggest creating a new and copying the attributes of the old, or copying the scene and unlinking from it unrequired data, including strips. Be a good candidate for an operator with presets.

Alternatively save it as a scene in another blend and append the scene each time instead of creating a new one.

Another option would be to save a workspace template or startup file with the settings desired.

$\endgroup$
4
  • $\begingroup$ Thank you, but what I'm after is not so much the settings as the full content of the Sequence Editor ex. all of the edited strips. So it's everything nested inside the "Sequence Editor" data structure. So I guess it would have to iterate through all entries, whatever they are and save them to disk in a way they could be loaded back into the sequence again. Like in the Text Editor where you can load a text-block into the editor and save it too. And even swap between them. $\endgroup$ – tintwotin Dec 3 '20 at 13:06
  • $\begingroup$ Envisage something Simalarly to copying nodetree shown here blender.stackexchange.com/questions/123887/… in conjunction with blender.stackexchange.com/questions/134613/… ie could generate the sed preset template via the sed rna properties. $\endgroup$ – batFINGER Dec 3 '20 at 13:16
  • $\begingroup$ Maybe that's an idea. To copy all strips to clipboard, save them to disk, and later read them into clipboard and paste that? I wonder what is the most current lib to do that stuff or is there any thing in the included python which lets you read and write from/to the clipboard? Doing it as in the node example, seems to be codong a full exporter and importer, and that'll be a lot of work. But I guess it could be done with otio: github.com/tin2tin/VSE_OTIO_Export $\endgroup$ – tintwotin Dec 3 '20 at 13:46
  • $\begingroup$ Stupid me. The copied strips are not stored in the text clipboard... So that approach would need to patch the sourcecode... $\endgroup$ – tintwotin Dec 3 '20 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.