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

    Python Exporter example?

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 294 Views
    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.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 30/03/2012 at 11:20, xxxxxxxx wrote:

      Hi All
      I have had some requests to do an exporter for Cinema 4D for a system I have created and being a new user for Cinema 4D I was wondering if there are handy example python scripts to show how to build a simple exporter, and python examples of how to extract the Morph data for an object.
      Thanks
      Chris

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 31/03/2012 at 06:47, xxxxxxxx wrote:

        Hi, C4D differs between a Python script and a Python plugin (same for coffee). A script is most used to simplify the workflow or to automate tasks. The entire scope of the script will be destroyed after it has been executed. You can use a script where you extract the data from the scene and save it via a save-dialog to a file.

        However, a plugin might be more useful here because there are hooks that allow you to place the exporter in the exporter submenu of "File->Export". Take a look at the documentation and the class c4d.plugins.SceneSaverData. Inherit from this class and overwrite the Save function which is called when the user wants to export the file.

        There is also an example in the examples folder of the documentation called "Py-IESMeta.pyp" which exports information of IES files to a human-readable text file.

        Btw, what exactly do you mean by morph data?

        Cheers, Sebastian

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 31/03/2012 at 06:57, xxxxxxxx wrote:

          Thank you for clearing that up, I am a total newbie with C4D, having looked further I think I will try COFFEE. I need the morph/blendshape data so that I can export it to Unity via my system, I have already written exporters for Max, Maya and Blender and I am getting a fair few requests for me to support Cinema 4D. You can see the system I am talking about at http://www.west-racing.com/mf/?page_id=257
          Thanks again.
          Chris

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