We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Use Blender Python Script to Export to Verge3D GLTF?

Home Forums Programming Use Blender Python Script to Export to Verge3D GLTF?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #44703
    techrise47
    Customer

    Hi all,

    I would like to export verge3D compatible GLTFs directly from the Blender Python scripting interface but I am afraid I just don’t know exactly the mechanics for calling the correct export functions from the Verge3D addon (it imports no problem, so I have access to all the functions, I just don’t know what function(s) to call or how to tweak the settings).

    Might there be some sample code available that shows how you could export a blender scene to GLTF as if you were just manually clicking the “export to Verge3D” option on the export menu?

    Any help would be hugely appreciated. Thanks!

    #48013
    David Bujeda
    Customer

    Hi,

    I’ve been searching for exactly the same and found the following command in the web:

    bpy.ops.export_scene.v3d_gltf(filepath=”/path/to/file/example.gltf”)

    However, the output for me is:
    AttributeError: Calling operator “bpy.ops.export_scene.v3d_gltf” error, could not be found

    Can you give it a try and see if it works for you? It should be working but I don’t know what I’m doing wrong.

    It would be great if someone from the dev team could give us a hand here

    #48032

    Hi,
    It should be

    bpy.ops.v3d.export_gltf(filepath="/path/to/file/example.gltf")

    Soft8Soft Tech Chief
    X | FB | LinkedIn

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.