Question
Null visibility with no parent layer
I can check to see if a parent (group) of a Photoshop layer is visible or not with:
if (theParent.visible == false)
{
// do something? Like switch it on?
theParent.visible = true;
}
And you can find the name of that parent group with
alert(theParent.name); // Group 1
If it's a layer that's just on it's own the parent name will be the name of the document.
Err ok.
And parent.visible will be null.
Can it be safe to assume if if the parent === null it's an "orphan layer" or is there a better way of determining that?
- Got you all thinking now 😄
