I'm trying to get a python based audio visualisation script to work in blender 2.66 on ubuntu 14.04 in background mode.

blender -b -noaudio -P audio-viz.py

sourcecode of audio-viz.py

When my code tries to change the window context to the sequencer

bpy.context.area.type = 'SEQUENCE_EDITOR'

I get the following error

Traceback (most recent call last):
File "/home/random9/audio-viz.py", line 42, in <module>
bpy.context.area.type = 'SEQUENCE_EDITOR'
AttributeError: 'NoneType' object has no attribute 'type'

Help me debug my script. Any help is appreciated.

  • 3
    $\begingroup$ Areas are part of the ui, which is not present in batch mode. Hence, area is None, and None has no attribute type $\endgroup$ – aliasguru Oct 16 '17 at 10:34

Your Answer

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

Browse other questions tagged or ask your own question.