Layer names of sub-nested reference blocks not recognized by rhinoscriptsyntax

In 3LevelDeepRef.zip (56.7 KB),
D.3dm is referenced in C.3dm with a linked definition and a reference layer style. C.3dm is referenced similar in B.3dm, which is referenced similar in A.3dm.

In V5’s Layers panel:

V6:

When this script is run in V5 and V6:

import rhinoscriptsyntax as rs

layers = rs.LayerNames()

if layers:
    for layer in layers:
        print rs.IsLayer(layer), layer

V5’s rs.IsLayer() recognizes all the layer names returned by rs.LayerNames():

True Default
True UniqueLayerNameInA
True B.3dm
True B.3dm::Default
True B.3dm::UniqueLayerNameInB
True C.3dm
True C.3dm::Default
True C.3dm::UniqueLayerNameInC
True D.3dm
True D.3dm::Default
True D.3dm::UniqueLayerNameInD

Whereas V6 doesn’t with layer names in sub-nested references:

True Default
True UniqueLayerNameInA
True B.3dm
True B.3dm::Default
True B.3dm::UniqueLayerNameInB
True C.3dm B.3dm : C
False C.3dm B.3dm : C::Default
False C.3dm B.3dm : C::UniqueLayerNameInC
True D.3dm B.3dm : C.3dm : B.3dm : D
False D.3dm B.3dm : C.3dm : B.3dm : D::Default
False D.3dm B.3dm : C.3dm : B.3dm : D::UniqueLayerNameInD

This problem doesn’t occur when the ID’s of the layers are used instead of their names:

layers = rs.LayerIds()

Thank you,
Steve

@piac, can you look into this?

Thank you @spb for this clear explanation! It allowed to pinpoint a problem spot.

I reported RH-40498. We will work more on this.

Giulio


Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

The double colon “::” in the V6 names is one of the main problems. I’m working on the bug now.

RH-40498 is fixed in the latest WIP