Home › Forums › Programming › Cloning an object without its children
- This topic has 9 replies, 5 voices, and was last updated 9 months ago by c4cc.
-
AuthorPosts
-
2020-08-27 at 1:45 pm #32081origginParticipant
Hi guys,
I have a scene with hundreds of cloned objects and this week I tried to add some new objects to the scene, which have to be cloned as well, and they it did not work as expected.
After a lot of research I realized that the problem is that these new objects have children and when I clone any of them, the parent object gets normally cloned but the generated object keeps referencing to its original children.
This means that when I manipulate the cloned parent object, its changes affect the children of the original parent object.
I am wondering what would be the best way to resolve this problem.
For me, the best solution overall would be a kind of deep cloning, like cloning the children objects and linking them to the new parent object, but I still do not how to do it and even if this is possible.
I hope you guys can help me find a solution.
Thanks
2020-08-27 at 1:50 pm #32083Yuri KovelenovStaffHi,
you can possibly clone the child objects as well, and then unparent the original children and parent the newly cloned children to your parent object. This can be done with this puzzle:
https://www.soft8soft.com/docs/manual/en/puzzles/Objects.html#parent
(for unparenting just leave the second slot empty)2020-08-27 at 4:54 pm #32099origginParticipantHi,
you can possibly clone the child objects as well, and then unparent the original children and parent the newly cloned children to your parent object. This can be done with this puzzle: https://www.soft8soft.com/docs/manual/en/puzzles/Objects.html#parent (for unparenting just leave the second slot empty)Hi Yuri, I tried what you suggest but unfortunately did not work.
As you can see in the screenshot from the console, the original children objects keep appearing under the cloned parent object.
Is there a way to do the inverse from what you suggested? Removing the children from the parents instead removing the parent from the children?
Or did I do something wrong?
2020-08-28 at 7:57 am #32112Yuri KovelenovStaff2020-08-28 at 5:51 pm #32136origginParticipantHi,
what if you try unparenting first, then cloning the parent and the children separately, and finally parenting the clones?Yope, this worked fine, thank you ;)
2020-08-29 at 4:31 am #32142GLiFTeKCustomerHi,
Curious,
Which browser dev tools are you using to show object relationships?
ThanksVisit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-09-09 at 9:00 pm #32639origginParticipantHi, Curious, Which browser dev tools are you using to show object relationships? Thanks
Sorry for the late response, I use chrome and everything logged there was generated in JS and puzzles.
2021-02-06 at 5:30 am #38096xeonCustomerOh…please tell me this is going to get fixed. I have a project with deep hierarchy of parents and children. Top Level Parent has 30 children and under each of those there are 3 more and under those three there are at least a dozen more. The process of unparenting and losing all their relations seems unimaginable. Will this be fixed in future releases? Not to mention animation and all the stuff that goes with that. Fingers crossed this gets a fix.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2021-02-07 at 3:02 am #38113GLiFTeKCustomerOh…please tell me this is going to get fixed. I have a project with deep hierarchy of parents and children. Top Level Parent has 30 children and under each of those there are 3 more and under those three there are at least a dozen more. The process of unparenting and losing all their relations seems unimaginable. Will this be fixed in future releases? Not to mention animation and all the stuff that goes with that. Fingers crossed this gets a fix.
Hi Xeon,
I have a whole suite of puzzles that I’ve developed that solve all your problems with this.I’m preparing to bring them out Soon.
Please stand by…
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2024-03-22 at 9:45 am #71898c4ccParticipantOh…please tell me this is going to get fixed. I have a project with deep hierarchy of parents and children. Top Level Parent has 30 children and under each of those there are 3 more and under those three there are at least a dozen more. The process of unparenting and losing all their relations seems unimaginable. Will this be fixed in future releases? Not to mention animation and all the stuff that goes with that. Fingers crossed this gets a fix.
Hi Xeon,
I have a whole suite of puzzles that I’ve developed that solve all your problems with this.I’m preparing to bring them out Soon.
Please stand by…
I apologize for answering an old thread, but may I see those puzzles?
-
AuthorPosts
- You must be logged in to reply to this topic.