Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    R20 Alembic Export Crash

    Cinema 4D SDK
    3
    5
    1.6k
    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.
    • D
      dev-vfxboat
      last edited by m_adam

      Hi,

      I'm trying to use the ExportAlembic.py example in Cinema 4D R20 but the application crashes.

      The same example works in R19.

      Doing it manually via File > Export... > Alembic (*.abc) does work.

      Tried in both Windows 10 and macOS.

      While in macOs the crash reporter makes a log, in Windows, the applications freezes with "Preparing Project for Export" in the status bar.

      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by m_adam

        Hi @dev-vfxboat, first of all, welcome in the plugincafe community.

        This is a known bug and already fixed for SP2 (the next Service Pack). It's impacting both Python and C++.
        The workaround is to pass the flag c4d.SAVEDOCUMENTFLAGS_DIALOGSALLOWED to the SaveDocument function.

        Moreover, don't worry, but please make sure to read and use How to Post Questions (Especially about tagging system)

        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        1 Reply Last reply Reply Quote 2
        • R
          ryangordon
          last edited by

          This seems to still be happening in R20 for me and the workaround didn't seem to help. I don't see any mention of it in the release notes. This method succeeds (successful export) but Cinema freezes. I am on R20 059 (SP2 HF1) on Windows 10

          void ExampleDialog::exportObj(BaseObject* obj) {
          	AutoAlloc<BaseDocument> virtualDoc;
          	virtualDoc->InsertObject(obj, nullptr, nullptr);
          	String filepath = "D:\\Dropbox\\model.obj";
          	SaveDocument(virtualDoc, filepath, SAVEDOCUMENTFLAGS::DIALOGSALLOWED, 1030178);
          }
          
          1 Reply Last reply Reply Quote 0
          • M
            m_adam
            last edited by

            Hi @ryangordon, the Id (1030178) correspond to FORMAT_OBJ2EXPORT. So consider that both ABC and OBJ exporter is crashing in your case.

            Here I'm not able to reproduce with the next code

            AutoAlloc<BaseDocument> virtualDoc;
            AutoAlloc<BaseObject> obj{Ocube};
            virtualDoc->InsertObject(obj, nullptr, nullptr);
            String filepath = "C:\\Users\\m_adam\\Desktop\\model.obj";
            SaveDocument(virtualDoc, filepath, SAVEDOCUMENTFLAGS::DIALOGSALLOWED, FORMAT_OBJ2EXPORT);
            

            So I'm wondering if you really own the BaseObject pointer and if the issue is not there. Maybe the object is already inserted. If you can provide a full example it will help me to reproduce.

            Cheers,
            Maxime.

            MAXON SDK Specialist

            Development Blog, MAXON Registered Developer

            1 Reply Last reply Reply Quote 2
            • R
              ryangordon
              last edited by

              Ah I think you're right - I take the object right from the document without a clone or anything. Thank you!

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