SDPPP Get Linked Layers
Get every layer linked to the one you picked
- layer_or_group
- layer_or_group
- layer_boundary
- layer_info
Photoshop's layer-linking feature is easy to forget about, but it's a tidy way to group layers that should move together without wrapping them in a group folder. This node is the one that respects that relationship: give it a LAYER handle and it returns every layer linked to it, plus each one's boundary mask and metadata, as parallel lists. It's the same shape as SDPPP Get Layers In Group, just keyed off the link chain instead of the folder tree.
How it works
You feed it a layer handle - from SDPPP Get Layer By ID, SDPPP Get Document-anchored sources, or a send node's output. It asks the PS plugin for that layer's linked siblings over the Socket.IO bridge, with the same select filter applied: all returns every linked layer, text or image narrows to those types, and first takes just the first one. Results come back as three index-aligned lists.
Inputs
- layer_or_group - the anchor layer. The node returns the layers linked to it, not the layer itself.
- select -
all(default),text,image, orfirst. Filtering happens in Photoshop, so on big files it's also a bandwidth save.
Outputs
- layer_or_group - a
LAYERlist of the linked layers. - layer_boundary - a
MASKlist of their bounds. - layer_info - a
LAYER_INFOlist, ready forSDPPP Parse Layer Info.
Index alignment matters - layer_info[i] describes layer_or_group[i] - same contract as Get Layers In Group.
When it's the right tool
Honestly, this is a niche node. It shines when a project was organized with links instead of groups - common when someone's assembling a composite where linked layers move as a unit but live in different parts of the stack. If the linked set is what you want to batch-process (say, all the linked layers are frames or variants), this gets you the whole set in one call. If your document doesn't use linking at all, the output will simply be empty - in that case you want SDPPP Get Layers In Group instead.
Install and the usual traps
ComfyUI Manager, search sd-ppp (or git clone https://github.com/zombieyang/sd-ppp into ComfyUI/custom_nodes), restart. The pack auto-installs python-socketio and jsonpatch on first import - no manual pip. The Photoshop plugin comes from sdppp.zombee.tech as a .ccx (double-click with Creative Cloud, or rename to .zip and extract into the Photoshop Plug-ins folder).
The pack-wide gotcha applies here too: plugin and custom node must be on matching versions, or Photoshop won't attach ("version mismatch, please reinstall PS plugin") and you'll get nothing from this node. And if a layer is linked to nothing, an empty result isn't a bug - it's Photoshop telling you there's no chain to follow.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| layer_or_group | LAYER | — | |
| select | COMBO | all | 4 options: all, text, image, first |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| layer_or_group | LAYER | — |
| layer_boundary | MASK | — |
| layer_info | LAYER_INFO | — |