Open DanRathbun opened 4 years ago
So changing the layer's page_behaviour doesn't update the viewport (entity visibility) based on the current scene (page)?
So changing the layer's page_behaviour doesn't update the viewport (entity visibility) based on the current scene (page)?
Please be careful in dialogue here. We are taking about the layer visibility property not direct object visibility which is a separate feature saved by scene pages.
The layer's visibility state (as shown in the Layer inspector) is not updated to reflect the change in behavior, ... so yes ANY entity or object using this layer is still visible.
AND ... I am assuming that none of the other scene pages have been updated as well, until a change of scene page is made (manually, in code or triggered using the "trick" I show above.)
I am wondering if explicitly setting ...
pages.selected_page.use_hidden_layers= true
... must be called before the change in behavior statement ?
TESTED. Result = no help. Same problem.
SU-45930
SketchUp Ruby API Issue
New Layer/Tag do not immediately follow set behavior when added via Ruby API.
Reported bug in: 20.0.363, also in 18.0.16975
Reportedly works as expected in SU2017, but testing shows the bug is also present in version 17.2.2555 and 16.1.1449.
Creating a new layer/tag and setting it's scene page behavior does not immediately get applied by
Sketchup::Layer#page_behavior=
method.Either a manual change of scene page and back again is required to have the layer be correctly applied across the scene pages collection, ... or a undocumented Ruby "trick" that causes SketchUp to refresh the scene layer/tag behaviors by setting the selected page to itself ...
REF Forum topic: https://forums.sketchup.com/t/layer-tag-layer-hidden-by-default-not-working/121203/