I want to catch data that looks like this: over “foo” {}. That example would be considered “empty”
However these are not empty:
over “foo” (some=”thing”) {}- Defines some metadata, could be anythingover SomeType “foo” {}- Defines a typeover “foo” { over “child” { … } }- Has a childover “foo” { variantSet “thing” = { … } }- Has a variantSet
In my case, the entry-point is a Sdf.Layer and I’m trying to delete all “empty” overs recursively until there are no empty overs left.
For example for a layer like this:
over “foo” { over “child” {} }
The first iteration would detect and remove “/foo/child”, then the second iteration would detect and remove “/foo” because it no longer has anything in it. If something like that doesn’t already exist, I can handle removing the PrimSpecs but I need something to discover them.
I saw some references to “IsInert” in the code-base but so far haven’t found exactly what I’m looking for. Does anyone know an easy way to find empty-overs (Sdf, ideally)?