I am facing a problem when trying to run my script for Fcurve smoothing form terminal. I have read that some operations are not supported when running Blender in the background. Moreover, bpy.context.area must be run in Blender, otherwise it will return NonType error if I run the script from terminal. My questions is: Is there any solution for that? I need to smooth my animations from terminal since this is a part of my project. Any help will be appreciated. Thanks

import os
import sys

import bpy

# delete the cube

if bpy.context.object.mode == “EDIT”:


if “Cube” in bpy.data.objects:

# import file

# Fcurve smoothing
bpy.context.area.ui_type = “FCURVES”

# Export as FBX

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.