quickest way to get the layer from the selected object is:
rs.ObjectLayer(obj)
, but this does not follow the philosophy of Rhinoscriptsyntax and instead of returning the id of the layer it returns the fullpath.
From this full path there is no easy way to get the name of the layer (assume it is sub-layer of sub-layer of sub-layer)
if you want to get the id of this layer rs.LayerId() this accepts the layer name as argument and doesn’t accept the fullpath
and rs.LayerName() accepts the id as argument which you cannot get as shown above.
What am I missing here?