So I know about the removeParent function but is there anything like that but it unparents all the children of the object? I can’t find anything online about this and it’d be really helpful if it existed
EDIT: I solved the problem about removing the parent, but now when I unparent the child it doesn’t recognize that the object has children because it considers them zombie objects. It isn’t a zombie object when i unparent it in the editor and then find it with scene.objects, but once I parent it it becomes a zombie object. Any ideas?
obj.children and obj.childrenRecursive are lists. just go
for child in obj.children:
child.removeParent()
that unparents all direct children.
Zombie object happens when you try to access an object that does not exist anymore. Just make shure you do things in order. Objects with obj.endObject() exist until the end of the frame, after that all references to them throw errors.