1
Vote

Consider adding a "Path" property to layers

description

The current method of referring to layers simply by ID has been rendered inadequate with the addition of support for group layers. In many controls, developers may specify layers by ID. If a layer is part of a group layer, the result will not typically work as developers may expect. In most cases, only the layers at the root level are traversed.
 
A better approach may be to adopt a "Path" property which exposes the full path of the layer from the root. This could operate in a similar fashion to file system paths and would also be easy to evaluate using built in IO objects. This would also allow developers to specify the path to multiple layers with the same ID but different parents, a scenario which is not currently supported.
 
Ex:
 
Parent 1\Child 1
Parent 2\Child 1
 
An ideal approach may be to introduce the new "Path" property as well as support for it in associated controls while deprecating support for specifying IDs in controls (ex: EditorWidget). Each layer would retain an ID property as well as a read only "Path" property. The path property should be used by controls when evaluating layers (ie EditorWidget.LayerPaths instead of EditorWidget.LayerIds).
 
Alternative:
 
Add a "DisplayName" property to the layer object. This will allow a layer to use a unique key such as a guid to allow easier identification of layers while maintaining a readable value.

comments