My question is how to clear parent of an particular object lets say its name is 'Cube'. I don't want to use


Because this only clear parents for the selected objects. and that is not my case. as I want to remove parents of objects with particular name and also keep the transformation. Is there any method without the above line of code.

And also I want to do it with a code not using Alt+P, thank you.

  • $\begingroup$ obj.parent = None ? docs.blender.org/api/current/… $\endgroup$
    – pyCod3R
    Feb 11, 2022 at 8:28
  • $\begingroup$ I updated my question. lets say the parent of the object is 'a' if a has some uniform scale. and when I use the line u suggested it clears the parent but it doesn't preserve the transformation which I need $\endgroup$
    – NamanDeep
    Feb 11, 2022 at 8:29
  • 1
    $\begingroup$ Clear Parent and Keep Transformation $\endgroup$
    – pyCod3R
    Feb 11, 2022 at 8:30
  • $\begingroup$ actually I found another way. If you apply transform of the parent object and then set obj.parent=None. then it keeps the transformation. Can u tell me a code for applying scale and rotation without using bpy.ops.object.transform_apply(location=False, rotation=False, scale=True) $\endgroup$
    – NamanDeep
    Feb 11, 2022 at 8:51


You must log in to answer this question.

Browse other questions tagged .