Notifications
Clear all
[Closed] Exclude all nested layers within a specific layer
Page 2 / 2
Prev
Feb 12, 2018 10:38 am
fn setAllLayersOn state =
(
for k=0 to layerManager.count-1 do (layerManager.getlayer k).on = state
)
fn getNestedLayers layer layers:#() =
(
append layers layer
for k=1 to layer.getnumchildren() do getNestedLayers (layer.getchild k) layers:layers
layers
)
fn setLayerOn name state nested:on =
(
if (layer = layerManager.getLayerFromName name) != undefined do
(
if nested then (getNestedLayers layer).on = state
else layer.on = state
)
)
setAllLayersOn on
setLayerOn "MainLayer" off nested:on
Feb 12, 2018 10:38 am
Almost there
This works, almost. When I say, exclude switching “Mainlayer” and its nested layers on, I meant to ignore it no matter what the current state is.
So not switching them on, doesnt mean switching them off, just need it to be ignored or excluded from any operation
1 Reply
Page 2 / 2
Prev