devs, I'm still new with python and blender scripting. I tried eding the obj exporter that I found. Can someone help me me with this.
Since I'm exporting tons of object groups, I need each of scene selection or selected objects to be exported as an individual gtlf file
import bpy import os # get the path where the blend file is located basedir = bpy.path.abspath('//') # deselect all objects # bpy.ops.object.select_all(action='DESELECT') # loop through all the objects in the scene scene = bpy.context.scene for ob in scene.objects: # make the current object active and select it scene.objects.active = ob ob.select = True # make sure that we only export meshes if ob.type == 'MESH': # export the currently selected object to its own file based on its name bpy.ops.export_scene.gltf( filepath=os.path.join(basedir+'gltf-individual', ob.name + '.gltf'), use_selection=True, ) # deselect the object and move on to another if any more are left ob.select = False