ps.active_document.layers layer.kind is random and error value!
Describe the bug A clear and concise description of what the bug is.
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:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- 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.
@loonghao help me!
@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.