Function 12144 (connect objects)
-
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 axesHow to solve this problem?
-
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.
-
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 -
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.
-
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. -
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...)
-
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. -
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!
-
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:)