ok, so there seem to be some problems with context overriding, i got blender to crash various times
http://projects.blender.org/tracker/?fu ... group_id=9
despite of that, i see what's the problem with your code:
Code: Select all
# assume code above generates to_export list
override_context = { 'selected_objects': to_export }
bpy.ops.wm.collada_export(context=override_context, filepath=filepath, check_existing=False, selected=True)
you try to pass override_context to the operator using a keyword argument. There is indeed no context parameter.
If you want to pass the custom context, you gotta pass it as first argument, but not keyword arg!
like this:
bpy.ops.wm.collada_export(override_context, filepath=filepath, check_existing=False, selected=True)
"context=" is removed, all following arguments are keyword args. That should do the trick.
I'm sitting, waiting, wishing, building Blender in superstition...