You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by mortisj December 17, 2024
Based on a recent discussion about creating custom part objects I tried to convert some existing naive part classes to subclass BasePartObject:
With the first (incorrect) version it is strange that the connect_to succeeded without a KeyError. It looks like the super.init() copies the joints dict from the subpart to the new object, but it doesn't adjust the joints' parent attribute appropriately. I'm not sure if that is a bug, but it certainly tripped me up!
Cheers.
The text was updated successfully, but these errors were encountered:
Discussed in #822
Originally posted by mortisj December 17, 2024
Based on a recent discussion about creating custom part objects I tried to convert some existing naive part classes to subclass BasePartObject:
After I did this any attempt to connect_to an instance of the custom part silently failed. The call succeeded but the part was not moved.
The trick was to change to order of things slightly:
With the first (incorrect) version it is strange that the connect_to succeeded without a KeyError. It looks like the super.init() copies the joints dict from the subpart to the new object, but it doesn't adjust the joints' parent attribute appropriately. I'm not sure if that is a bug, but it certainly tripped me up!
Cheers.
The text was updated successfully, but these errors were encountered: