Hi,
After last update of beta version: Adobe Photoshop: 24.7.0 20230718.m.2245 afb5f03 x64
I can't get information about background layer (previous build works fine).
I'm using a Automation plugin in macOS.
This is a code sniped:
SPErr error = kSPNoError;
PIActionDescriptor result = NULL;
PIActionReference reference = NULL;
// BACKGROUND
error = sPSActionReference->Make(&reference);
if (error) goto returnError;
error = sPSActionReference->PutProperty(reference, classBackgroundLayer, keyBackground);
if (error) goto returnError;
error = sPSActionReference->PutEnumerated(reference, classDocument, typeOrdinal, enumTarget);
if (error) goto returnError;
sPSActionControl->Get(&result, reference);
if (result != NULL)
{
hasKey = false;
// Name
error = sPSActionDescriptor->HasKey(result, keyName, &hasKey);
if (error) goto returnError;
if (hasKey)
{
memset(&data, 0, sizeof(data));
// Name
ASZString ztitle = NULL;
error = sPSActionDescriptor->GetZString(result, keyName, &ztitle);
if (error) goto returnError;
if (!ASZString2CString(ztitle, data.name, sizeof(data.name)))
error = kBadParameterErr;
if (ztitle)
sASZString->Release(ztitle);
if (error) goto returnError;
// Index
error = sPSActionDescriptor->GetInteger(result, keyItemIndex, &data.index);
if (error) goto returnError;
// Background
data.background = true;
// Visible
error = sPSActionDescriptor->GetBoolean(result, keyVisible, &data.visible);
if (error) goto returnError;
// ID
error = sPSActionDescriptor->GetInteger(result, keyLayerID, &data.ID);
if (error) goto returnError;
// Selected
data.selected = false;
// Kind
data.kind = kLayerKind_PixelSheet;
// Bounds
data.empty = false;
// Data
data.data = NULL;
}
}