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

    Merging external files into plugins

    Cinema 4D SDK
    python
    2
    4
    783
    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.
    • merkvilsonM
      merkvilson
      last edited by merkvilson

      Hello Plugincafe! 💙

      What's the most appropriate way of merging external files (e.g. c4d scene which is located in the res directory) into the OBJECT_GENERATOR plugins?

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

        Hi Merkvilson, I'm wondering, are you trying to load multiple files, only one time, and display these files? Or does the files are loaded according to some users choice?

        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        1 Reply Last reply Reply Quote 1
        • merkvilsonM
          merkvilson
          last edited by

          I want to import spline objects only once, from c4d file to draw them by using DrawPolygonObject() command as a part of object handle.

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

            Hi Merkvilson, the best way would be in the NodeData.Init method to load the scene with LoadDocument(). This will give you a BaseDocument.
            Then you can retrieve the LineObject or whatever you need from this document. Then get a Clone of these things and draw it inside your Draw method.

            Just in case, if you would have to return everything in the GetVirtualObject methods, you would need to insert everything under a null and return this null. And to manually handles/tracks material (this part can become very tedious)

            If you have any questions, please let me know.
            Cheers,
            Maxime.

            MAXON SDK Specialist

            Development Blog, MAXON Registered Developer

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