doakey3 / VSE_Transform_Tools

Quickly transform, crop and fade video strips in Blender's Video Sequence Editor
GNU General Public License v3.0
223 stars 22 forks source link

Batch rendering a file with Transform Tools installed crashes on exit #27

Open davidgiven opened 3 years ago

davidgiven commented 3 years ago

In __init__.py, in register(), there's this line of code:

        km = wm.keyconfigs.addon.keymaps.new(name="SequencerPreview", space_type="SEQUENCE_EDITOR", region_type="WINDOW")

In a batch environment, where I'm calling the blender binary to make it render frames without starting up the whole UI, it seems that wm.keyconfigs.addon is None, causing an exception. It looks like the rendering actually happens but my render script thinks that Blender failed and keeps rerendering the same chunk.

I don't know if it's the right solution, but a solution is to test for None and exit early:

    if not wm.keyconfigs.addon:
        return
    km = wm.keyconfigs.addon.keymaps.new(name="SequencerPreview", space_type="SEQUENCE_EDITOR", region_type="WINDOW")

From bl_info at the top of the file:

    "version": (1, 2, 9),
    "blender": (2, 83, 0),