How to remove ancestral prim

Hi,

I try to use from omni.isaac.core.utils.prims import delete_prim to delete the prims in multiple environments, but I have gotten the error “Cannot remove ancestral prim.” I am not sure how to fix this problem. Thank you.

That usually happens due to the prims being references to other files. If you open your USD, and then do File → Saved Flattened As …, and then open that saved file, you’ll probably be able to remove the prim because it’ll no longer be a reference to another file.

In general I wish there was a utility that replaced references with their “referentee” when the referentee was only used in one place.

1 Like