Returns or modifies the parent layer of a layer.
rhinoscript.layer.ParentLayer (layer, parent=None)
rhinoscriptsyntax.ParentLayer (layer, parent=None)
layer |
Required. String. The name of the layer. |
parent |
Optional. String. The name of the new parent layer. To remove the parent layer, thus making a root-level layer, specify an empty string "". |
String |
If parent is not specified, the name of the current parent layer if successful. |
String |
If parent is specified, the name of the previous parent layer if successful. |
None |
If the layer does not have a parent. |
import rhinoscriptsyntax as rs
layers = rs.LayerNames()
for layer in layers:
parent = rs.ParentLayer(layer)
print "Layer:", layer, ", Parent:", parent