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

    GetContour and GetVirtualObjects in one Plugin

    Cinema 4D SDK
    python
    3
    4
    820
    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.
    • P
      pyr
      last edited by

      I got a plugin which returns, base on its settings a mesh or a spline. If i create an instance from my plugin using only GetVirtualObjects the Instance of my spline doesn't work.

      so is there a way to use both in one plugin?

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

        Hi @pyr first of all, in Cinema 4D there is no object that behaves like that. So it's not officially supported but you can get it to work.

        With that's said I would like to ask for more information.

        • Do you need input objects?
        • Should your object be considered as a spline object or only returning a spline is enough (aka returning a spline into a null)?

        Note that few examples in the GitHub repository can help you:

        • double_circle, outputs a spline, like a circle spine.
        • osffset_y_spline, offsets a spline, based on another input spline.
        • rounded_tube, creates an object like the cube object.

        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

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

          @pyr You can have both. GetVirtualObjects() is called first, and if you return nullptr GetContour() is called.

          But you need to register your object with OBJECT_GENERATOR | OBJECT_ISSPLINE.

          1 Reply Last reply Reply Quote 2
          • P
            pyr
            last edited by

            @rsodre works flawless!

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