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

    SceneSaverData document

    Cinema 4D SDK
    r23 c++
    3
    5
    637
    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.
    • rsodreR
      rsodre
      last edited by

      Hello,

      I was having a strange problem having different resutls when exporting a scene using a custom SceneSaverData.

      If we export from the main menu File, Export..., it works fine, and I can see it calls SceneSaverData::Save() with the active document.

      If we export from the Objects Manager File, Export Selected Object As..., it will fail in some of my objects when trying to retrieve a BaseLink, and I can see it's using another (cloned?) document. I fixed it by trying with ForceGetLink() if the link is null.

      Is that difference in the documents passes to the exporter by design?
      Shouldn't my BaseLinks just work?

      Thanks,
      Roger

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

        Hi @rsodre this is expected since the document is cloned first (via IsolateObjects). You can notice the same behavior if you call IsolateObjects with a Mograph Cloner but don't pass the effector, obviously the link will be lost.

        Note that you may have properly selected both, and in this case, if this still fails, you have to be sure to properly implement CopyTo to also forward the BaseLink to the new copy or to expose the BaseLink in the object's BaseContainer so Cinema4D will be able to update it properly.

        Hope this help,
        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        rsodreR 1 Reply Last reply Reply Quote 0
        • rsodreR
          rsodre @m_adam
          last edited by m_adam

          @m_adam said in SceneSaverData document:

          you have to be sure to properly implement CopyTo to also forward the BaseLink to the new copy or to expose the BaseLink in the object's BaseContainer so Cinema4D will be able to update it properly.

          If my object have BaseLinks defined in the resource file, shouldn't C4D take care of passing it to the cloned document?

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

            Are you speaking about a LINK? Normally it should handle it without issue.

            MAXON SDK Specialist

            Development Blog, MAXON Registered Developer

            1 Reply Last reply Reply Quote 0
            • ferdinandF
              ferdinand
              last edited by

              Hi,

              without further feedback, we will consider this thread as solved by tomorrow and flag it accordingly.

              Cheers,
              Ferdinand

              MAXON SDK Specialist
              developers.maxon.net

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