I'm trying to get a python based audio visualisation script to work in blender via command line interface. Here's the code myscript.py
When I run the following in blender 2.66 on Ubuntu 14.04
blender -b -noaudio -P myscript.py
I get the following error
File "/home/random9/myscript.py", line 66, in <module> bpy.ops.anim.keyframe_insert_menu(type='Scaling') File "/usr/share/blender/2.79/scripts/modules/bpy/ops.py", line 189, in __call__ ret = op_call(self.idname_py(), None, kw) RuntimeError: Operator bpy.ops.anim.keyframe_insert_menu.poll() failed, context is incorrect
in [line number 66]
How do I resolve this error?
I've been going through the python scripting docs and it suggests that I should be able to figure out what context an operator needs simply by seeing how it’s used in Blender and thinking about what it does.
Any help is appreciated.