photoshop-python-api icon indicating copy to clipboard operation
photoshop-python-api copied to clipboard

ps.active_document.layers layer.kind is random and error value!

Open laughingg opened this issue 8 months ago • 2 comments

Describe the bug A clear and concise description of what the bug is.

Image

Image

for layer in ps.active_document.layers: print("layers: layer.kind:", layer.kind, LayerKind(layer.kind))

layer.kind is random value and error!

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Windows10, Windows7]: Windows11
  • Photoshop Version: [e.g. Photoshop-2020]: Photoshop-2021
  • Python Version: [e.g. python-3.6] python-3.10.11

Additional context Add any other context about the problem here.

laughingg avatar Apr 16 '25 10:04 laughingg

@loonghao help me!

laughingg avatar Apr 23 '25 06:04 laughingg

@laughingg

Can you describe what functionality you ultimately end up wanting to achieve? Getting types through the COM interface can sometimes give undesired results. The default is actually an artLayer. If you want to manipulate a specific layer you can get it by the layer name. If you want to manipulate a specific layer you can get it by its name.

loonghao avatar Apr 25 '25 14:04 loonghao