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

    SaveDocument Unexpected Behavior in R23

    Cinema 4D SDK
    2
    3
    492
    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
      Kon Q
      last edited by Manuel

      Hello there,

      I tried to export the OBJ file using c4d.documents.SaveDocument(). The return value always be true, but I cannot find the exported file.

      I can reproduce this issue using the script from the official repository:
      https://github.com/PluginCafe/cinema4d_py_sdk_extended/blob/master/scripts/03_application_development/files_media/export_obj_r13.py

      This issue only appears in Cinema 4D R23, and I also found that the API works after I export an OBJ file using GUI. If I reset the user data by deleting the preferences folder, it doesn't work again.

      Cinema 4D version: R23.110
      System: macOS 11.2.3

      Thanks,
      Kon

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

        hi,

        you have to add this line if you don't want animated object.
        At least for now, I'm going to check with the devs if it's our code (conditions) or the "default" parameters that are missing

            objExport[c4d.OBJEXPORTOPTIONS_ANIMATION_TYPE] = c4d.OBJEXPORTOPTIONS_NO_ANIMATION
        

        or one of those if you want animation :

        ''' 
        can be on of those if animation is wanted.
        OBJEXPORTOPTIONS_MANUAL_RANGE
        OBJEXPORTOPTIONS_LOOP_FRAMES
        OBJEXPORTOPTIONS_PREVIEW_FRAMES
        OBJEXPORTOPTIONS_ALL_ANIMATED_FRAMES
        	
        '''
        objExport[c4d.OBJEXPORTOPTIONS_ANIMATION_TYPE] == c4d.OBJEXPORTOPTIONS_ALL_ANIMATED_FRAMES
        

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

        K 1 Reply Last reply Reply Quote 0
        • K
          Kon Q @Manuel
          last edited by

          @m_magalhaes

          Thank you so much for the help! The script works fine after adding this line.

          Cheers,
          Kon

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