SDPPP Get Layer By ID
Grab one specific layer out of a Photoshop document
- document
- layer_or_group
- layer boundary
- layer_info
Once you've got a DOCUMENT handle from SDPPP Get Document, this is how you reach inside it and grab a specific layer by name. It hands you three things at once: the LAYER handle for that layer, a mask of its boundary, and its metadata - which is usually more than you need, but it means one node covers both "get me this layer" and "tell me about this layer."
How it works
You feed it the document you're working on plus the layer's name - which, like the document picker, is a live dropdown populated from the connected Photoshop instance, so you're choosing from the actual layers in that file rather than typing names that might not match. On run, it calls the plugin's getLayerInfo action over the Socket.IO bridge. Photoshop resolves the layer, and the node wraps what comes back into a LAYER handle and a boundary mask at document resolution.
Inputs and outputs
- document - a
DOCUMENThandle fromSDPPP Get Document. Required, and worth saying: this is whyGet Documentexists. Without a document to anchor to, "which layer?" is meaningless. - layer_or_group - the layer picker. Select by name from the dropdown.
Outputs:
- layer_or_group - the
LAYERhandle. Wire it intoSDPPP Get Layers In Group(if it's a group),SDPPP Get Linked Layers,SDPPP Get Text From Layer, or the send nodes. - layer boundary - a
MASKof the layer's bounds, handy for regional prompting or compositing. - layer_info - the
LAYER_INFOblob. Feed it toSDPPP Parse Layer Infoto get opacity, bounds, and name as plain numbers.
When you'd bother
This node earns its keep in stable, repeatable workflows where the same named layer is your anchor every run - say, a "character" layer you always pull to drive a ControlNet, or a "subject" layer whose boundary becomes your regional prompt mask. Because the picker is by name, it survives minor layout changes in the PSD as long as the layer keeps its name.
Install and the usual traps
Via ComfyUI Manager (search sd-ppp / Photoshop) or git clone https://github.com/zombieyang/sd-ppp into ComfyUI/custom_nodes, then restart; the pack auto-installs python-socketio and jsonpatch. The Photoshop plugin comes from sdppp.zombee.tech as a .ccx (double-click with Creative Cloud, or rename to .zip and extract into the Plug-ins folder).
And the pack-wide rule: plugin and custom node versions must match or Photoshop won't connect ("version mismatch, please reinstall PS plugin") and the layer dropdown stays empty. If the dropdown is empty, the plugin isn't attached - connect it in Photoshop before anything lists.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| document | DOCUMENT | — | |
| layer_or_group | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| layer_or_group | LAYER | — |
| layer boundary | MASK | — |
| layer_info | LAYER_INFO | — |