Another way to call bpy.ops.graph.sound_bake()

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
Posts: 0
Joined: Thu Dec 20, 2012 9:12 am

Another way to call bpy.ops.graph.sound_bake()

Post by vinniyo » Fri Jan 11, 2013 10:42 pm

When running a script at startup Eg:
blender <myblend.blend> -P <>
I cannot select area types:
bpy.context.area.type = "GRAPH_EDITOR"
and therefore cannot execute
which will return a context error. Eg:
Operator bpy.ops.graph.sound_bake.poll() failed, context is incorrect.

My question is, are there other ways to call sound_bake that do not require an area to be active?

Thank you!!

Posts: 0
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Post by CoDEmanX » Wed Jan 16, 2013 8:41 am

you would usually use overrides for this, but this op requires graph editor area, region, a context window and a scene. And possibly more, at least it did not work for me in a quick test using a context override.

maybe ask the devs if there is a way...
I'm sitting, waiting, wishing, building Blender in superstition...

Post Reply