How can one reference a sublayer in functions like setLayerVisibility
, that accept layer names as arguments?
I tried
setLayerVisibility("MyLayerName.MySublayerName", true)
, but that was ineffective.
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It only takes a minute to sign up.
Sign up to join this communityHow can one reference a sublayer in functions like setLayerVisibility
, that accept layer names as arguments?
I tried
setLayerVisibility("MyLayerName.MySublayerName", true)
, but that was ineffective.
the function may not be set up to look for sublayers, even if you pass the correct sublayer name. If it is, you can do something like...
var myLayer = app.activeDocument.layers["myLayerName"];
var mySublayer = myLayer.layers["mySublayerName"];
alert(mySublayer.name);