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

    Avoid creating new field object as child from plugin

    Cinema 4D SDK
    r21 r20 python
    2
    6
    947
    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 with a field input. if i create a new field object, cinema automatic create its as a child. is there a way to force new field objects spawns nexts to my plugin not under ?

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

        hi,
        There's no parameter or way to do it, you have to do it yourself.
        Of course this will modify the scene, so you have to be sure you are on the mainthread. (don't do it on GetVirtualObject)

        you can override the GetDParameter function so you will know when a parameter is modified.

        You have to check for each fields if the field object is a child or your plugin. (just retrieving the field object and comparing the GetUp() object with your plugin should be enough)

        to retrieve the object you have to use GetLInkedObject

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

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

          okay

          so it might be an easier solution to just iterate over all childs from my generator plugin and check for the first BaseMesh.

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

            User can drag and drop the field in the hierarchy and in the field list. So you should have to check every child or every entry in the field list.

            MAXON SDK Specialist

            MAXON Registered Developer

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

              hi,

              without any further feedback from yourself, i'll set this thread as solved tomorrow 🙂

              Cheers,
              Manuel

              MAXON SDK Specialist

              MAXON Registered Developer

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

                Ah sorry.

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