I have the model of a vehicle body with its wheels and empty coordinates systems at the wheels which are all parented sequentially to the vehicle body. I would like to ask how it is possible to duplicate all the objects and the subsequent relationships using the Python API. In the following image, you can see the relationships that I described; I would like to duplicate this.

enter image description here

  • $\begingroup$ This copies all objects in a collection, and reparents to a copy if parent also copied. blender.stackexchange.com/a/157855/15543 $\endgroup$
    – batFINGER
    Commented Feb 13, 2021 at 15:11
  • $\begingroup$ thank you @batFINGER for your comment. I am new to Blender, so it is still not so clear to me what the script that you provided is doing; I will play with it. If I am not mistaken though, it duplicates a collection. In my case, I would want to just duplicate an object along with its children as I would do from the GUI after selecting everything and copying and pasting them. $\endgroup$
    – Chris Patr
    Commented Feb 13, 2021 at 16:41
  • $\begingroup$ In particular, I want to duplicate the ChassisAM (seen in the picture) along with its subsequent relationships. $\endgroup$
    – Chris Patr
    Commented Feb 13, 2021 at 16:44

1 Answer 1


I used to bpy.ops.object.duplicate to duplicate the selected objects coming from the select_set() method. In this way, the underlying parent/children relationships are maintained during the duplication.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .