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

    Function 12144 (connect objects)

    Cinema 4D SDK
    python
    3
    9
    1.8k
    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.
    • Passion3DP
      Passion3D
      last edited by Passion3D

      Hi

      I have a null object containing 2 parametric objects
      With the R18 version:
      Function 12144 (connect objects) creates a polygonal object combining the 2 parametric objects.

      With the R14.014 and R15.008:
      The function creates a polygonal object, but empty. On the screen I see only the axes

      How to solve this problem?

      1 Reply Last reply Reply Quote 0
      • CairynC
        Cairyn
        last edited by

        Apparently the behavior of the earlier versions was found to be fairly useless (as the result is empty) so the R18 version now performs a virtual "make editable" before combining the polygon meshes. (I do not have any of these versions left installed, so this is theoretically speaking.)

        Now, what do you want as the result, and what version are you in? If you want R14/15 to replicate the newer behavior, you could e.g. go through the selected objects and perform the "make editable" on a copy first, before executing the "connect objects" on the copies. If on the other hand you are in R18 and do not want this function to work on parametric objects, you'd need to go through the selected objects as well and refuse execution of "connect objects" if there is any parametric object found.

        1 Reply Last reply Reply Quote 2
        • Passion3DP
          Passion3D
          last edited by

          Hi Cairyn
          The behaviour that suits me is that of the R18, which I would also like to see in R14,R15. For the plugin to be compatible from R14 to R20.
          So I will follow your instructions;)

          A quick question, however:
          From which version was the R18 behavior implemented? In order to put a condition in my code depending on the version of C4D used

          1 Reply Last reply Reply Quote 0
          • CairynC
            Cairyn
            last edited by

            I actually don't know when this was implemented. I can't remember even having used the connect functionality on parametrics, normally I use that only later in the process when I have edited the meshes manually and therefore the objects to connect were already editable.

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

              Hi Passion3D as you discovered the behavior of MCOMMAND_JOIN has changed in R18.048.

              You can find more information about it in this post. https://developers.maxon.net/forum/topic/9836#52423
              So before R18.048, you have to pass a list of all objects.
              After R18.048, you have to pass the null that holds all the hierarchy.

              Cheers,
              Maxime.

              MAXON SDK Specialist

              Development Blog, MAXON Registered Developer

              1 Reply Last reply Reply Quote 1
              • CairynC
                Cairyn
                last edited by

                so, if I understand that thread correctly, @Passion3D has passed the null (mentioned in original post) so the function works properly in R18, but the same code will not work in R14/15 because these versions will not look at the children and interpret the null as the only object to join, which is naturally empty?

                And R14/15 would have made the objects editable as well if they had just been passed as a list? (I would test that but I don't have older versions installed...)

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

                  Before R18.048 MCOMMAND_JOIN will join all selected objects, children as well, but have some issue (sometimes when object matrice is shifted, stuff went wrong, or if the object is not a PolygonObject)
                  After R18.048 MCOMMAND_JOIN will join all children of the passed null.

                  Last note, we do not support more than year version, so if you have an issue in this particular version, please run your test and try some workaround if possible.

                  Cheers,
                  Maxime.

                  MAXON SDK Specialist

                  Development Blog, MAXON Registered Developer

                  1 Reply Last reply Reply Quote 1
                  • CairynC
                    Cairyn
                    last edited by

                    I'm just asking because of @Passion3D 's original description - personally, I don't work with anything older than R19. If the MCOMMAND_JOIN has general issues, his idea of supporting both R18+ and lower versions might not be feasible (even when following my original idea to check the selected objects and making them editable if needed...).

                    But then, supporting a plugin with the same code base over more than 5 C4D versions (7 up to R20) is challenging anyway. @Passion3D : good luck with your endeavour!

                    1 Reply Last reply Reply Quote 0
                    • Passion3DP
                      Passion3D
                      last edited by Passion3D

                      Thank you for all these details Maxime 😉
                      I solved the problem with a small loop that checks if the object has been converted or not 😉
                      The test reports I got are all positive 🙂
                      My plugin will therefore remain compatible from R13 to R20:)

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