Also, I don’t know if you can get the full layer name, that should be something like
B-parent::c-child (with double colon in between)
If your layer name itself does not contain a double colon (which is possible) you could split the name at the double colon and get the layer hierarchy like that.
This looks like a bug (if you will). The function should return the full path of the layer name (e.g. Default::Layer 01::Layer 02). Ideally, layer-related methods should return GUIDs, not strings. But that is another issue.
You can fix this yourself by editing object.py - it can be found here: