Synfig/Krita/Kdenlive Animation Notes

From 2020-06-03

So you want to do hand-drawn animation on Linux and/or entirely with Free Open Source Software, and that animation involves lip syncing? Well, here's some notes as I work on my first decent sized animation in Synfig/Krita/Kdenlive and I get my pipeline ready to go for smooth production work on future animation.

snippet.python
  from PyQt5.QtWidgets import QFileDialog
  from krita import Krita
 
  KID = Krita.instance().activeDocument()
 
  active = KID.activeNode()
 
  file, _ = QFileDialog.getOpenFileName(None, "Create phoneme layers for Papagayo file", "", "Papagayo File (*.pgo)")
 
  # rest is the default when a frame doesn't have a specified phoneme
  phonemes = ["rest"]
 
  with open(file) as f:
      for line in f:
          line = line.rstrip()
          if line.startswith("\t\t\t\t"):
              _, phoneme = line.split(" ")
              if not(phoneme in phonemes):
                  phonemes.append(phoneme)
 
  for name in phonemes:
      layer = KID.createGroupLayer(name)
      active.addChildNode(layer, None)
 
      for artName in ["Pencils", "Colors", "Shading", "Inks"]:
          artLayer = KID.createNode(artName, "paintlayer")
 
          if artName == "Shading":
              artLayer.setBlendingMode("multiply")
 
          layer.addChildNode(artLayer, None)

All in all, the process was pretty decent. It took some time to figure out the Synfig way of doing things, but once I got that, the actual pipeline of Krita → Synfig → Kdenlive was very smooth. Expect something way more substantial describing the process in the coming months.