Removing a layerSet (group) that contains the activeLayer

  • 1
  • Problem
  • Updated 4 years ago
If you remove a layerSet (group) that contains a group that contains the activeLayer, PS will give an error though the layerSet will still be removed.

Structure:
Group 1
Group 2
Layer 1 (active)
Background

app.activeDocument.layers[0].remove()

That remove call will return a 'General Photoshop error'. You can work around the bug by making a top level layer active before any removals. The 'General' error is less than helpful.
Photo of Sam Gannaway

Sam Gannaway

  • 2 Posts
  • 0 Reply Likes

Posted 4 years ago

  • 1

Be the first to post a reply!