Holo
January 9, 2020, 11:24am
#1
Hi guys, for some reason this doesn’t make B a child of A:
import rhinoscriptsyntax as rs
rs.AddLayer("A")
rs.AddLayer("B", parent="A")
but this does:
import rhinoscriptsyntax as rs
rs.AddLayer("A")
rs.AddLayer("B", color=(255,0,255), parent="A")
So not adding a color messes something up.
Cheers
Hi Jørgen,
rs.AddLayer("A")
rs.AddLayer("B", parent="A")
seems to be working here…
wim
(Wim Dekeyser)
January 9, 2020, 12:19pm
#3
On my end, you are both right.
It seems to be working on Rhino 6 but not the Rhino 7 WIP. Is that where you were trying this, Jørgen?
-wim
I tried in both… I maybe don’t have the latest WIP though.
Edit - just WIP’ed up the latest version - and it still works here…
wim
(Wim Dekeyser)
January 9, 2020, 3:12pm
#5
Now updated both Rhino versions to the latest BOTD and running from a factory-default template, using the same script in both versions (saved to disk in RH6 and opened in RH7)
Now, this does not work in Rhino 6 but works fine in Rhino 7
(6.23.20008.15521, 01/08/2020)
(7.0.20009.2435, 2020-01-09)
Then, shutting down and relaunching Rhino 6 with different templates a couple of time, this now works fine again. I dunno…
-wim
1 Like
Holo
January 9, 2020, 3:47pm
#6
Thanks for looking into it.
Strange stuff, I’ll judt add colors as I don’t have time to bugtrack
Oh, and I was on v6.
Alain
(Alain Cormier)
January 10, 2020, 6:30am
#8
I can’t reproduce this on v6 or v7 with different templates. @wim , if you can reproduce this again let me know.
wim
(Wim Dekeyser)
January 10, 2020, 12:31pm
#9
@Alain , I can’t reproduce this now. Unassigning you but will report back when I see this again…
-w
emilio
January 10, 2020, 1:12pm
#11
FWIW …
I use a script with AddLayer() every day on Rhino 6.
Usually it works, but ‘sometimes’ it fails.
I have not been able to understand when/why …
EDIT:
I mean: setting a parent layer sometimes fails.
The layer is always created.
2 Likes