We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Cloning an object without its children

Home Forums Programming Cloning an object without its children

  • This topic has 9 replies, 5 voices, and was last updated 1 month ago by c4cc.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #32081
    origgin
    Participant

    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

    #32083

    Hi,

    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)

    Chief 3D Verger | LinkedIn | Twitter

    #32099
    origgin
    Participant

    Hi,
    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?

    #32112

    Hi,

    what if you try unparenting first, then cloning the parent and the children separately, and finally parenting the clones?

    Chief 3D Verger | LinkedIn | Twitter

    #32136
    origgin
    Participant

    Hi,
    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 ;)

    #32142
    GLiFTeK
    Customer

    Hi,
    Curious,
    Which browser dev tools are you using to show object relationships?
    Thanks

    #32639
    origgin
    Participant

    Hi, 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.

    #38096
    xeon
    Customer

    Oh…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.com

    #38113
    GLiFTeK
    Customer

    Oh…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…
    :good:

    #71898
    c4cc
    Participant

    Oh…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…
    :good:

    I apologize for answering an old thread, but may I see those puzzles?

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.