Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Export multiple GLB files via script

    Cinema 4D SDK
    2
    2
    392
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kinetikos
      last edited by

      Is it possible to export a sequence of .glb files via scripting? Or even one at a time would be helpful, as I have many thousands to export and the regular path to export is quite cumbersome.

      I have seen the .gltf export script featured in the forums, and my attempts to modify it have failed so far.

      Thanks in advance!

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by

        Hi,

        We have an example on github to export to obj and how to define the parameters, you can find it here

        You need to retrieve the plugins with its plugin ID GLTFEXPORTER_PLUGIN_ID 1041129 There is no symbol attached for it.
        Then, you must send the message MSG_RETRIEVEPRIVATEDATA to define the option you want.

        For each parameter you will find its ID in the following file : \resource\modules\gltf\description\fgltfexporter.res
        You will find that the parameter you want to change is c4d.GLTFEXPORTER_FILEFORMAT and it should be set to c4d.GLTFEXPORTER_FILEFORMAT_GLB

        So just like in this line, you will write

         objExport[c4d.GLTFEXPORTER_FILEFORMAT] = c4d.GLTFEXPORTER_FILEFORMAT_GLB
        

        You should be able to clean the code from the obj example and adapt it to your needs. That will help for your thousands of exports.

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

        1 Reply Last reply Reply Quote 0
        • First post
          Last post