I can’t get the GTLF export to work with Python scripting.
repo steps:
Open Blender (I tried 2.8 and 3.3)
Select “General” template
click on “scripting” tab
click new (to create a new script)
paste this code:
import bpy
bpy.ops.export_scene.gltf("test.gltf")
click run
click Window → toggle system console
see this error:
Error: Python: Traceback (most recent call last):
File “\Text”, line 3, in
File “C:\Program Files\Blender Foundation\Blender 3.3\3.3\scripts\modules\bpy\ops.py”, line 111, in call
ret = _op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
TypeError: Calling operator “bpy.ops.export_scene.gltf” error, expected a string enum in (‘INVOKE_DEFAULT’, ‘INVOKE_REGION_WIN’, ‘INVOKE_REGION_CHANNELS’, ‘INVOKE_REGION_PREVIEW’, ‘INVOKE_AREA’, ‘INVOKE_SCREEN’, ‘EXEC_DEFAULT’, ‘EXEC_REGION_WIN’, ‘EXEC_REGION_CHANNELS’, ‘EXEC_REGION_PREVIEW’, ‘EXEC_AREA’, ‘EXEC_SCREEN’)