ScriptSpot home

Forum topic · General Scripting

About BitmapLayerManager trying to get the value of the number of layers in the PSD file.

By andrej · 2020-08-04

Description

Good day.

I am trying to get the value of the number of layers in the PSD file.
The file is attached.
If you look at this file in Photoshop, the number of layers is 4.
But the script

testmap = "D:\\FPSD.psd"
BitmapLayerManager.getLayerCount testmap

returns 0.

Am I doing something wrong?

In work I use 3ds Max 2015 and Photoshop CC 19.1.5

Comments (3)
andrej

Attached file

Attachments
Reply to andrej
Panteleev Sergey

.

Most likely Adobe has changed the way this information is stored in PSD file headers so the BitmapLayerManager can't access it anymore.