When using layer.FullPath on the DocObject layer it is returning the layer.Name rather than the full path. However once the layer has been added to the document, doc.Layers[layerIndex].FullPath gets the correct value.
Is this how the layer.FullPath was intended to function? Below is some example code.
import Rhino
import scriptcontext
parent = Rhino.DocObjects.Layer.GetDefaultLayerProperties()
parent.Name = "Parent"
parentIndex = scriptcontext.doc.Layers.Add(parent)
parentId = scriptcontext.doc.Layers[parentIndex].Id
child = Rhino.DocObjects.Layer.GetDefaultLayerProperties()
child.Name = "Child"
child.ParentLayerId = parentId
childIndex = scriptcontext.doc.Layers.Add(child)
childLayer = scriptcontext.doc.Layers[childIndex]
print child.FullPath ## prints Child ##
print childLayer.FullPath ## prints Parent::Child ##
Thanks,