Photoshop插件:使用C ++访问图层信息

时间:2014-07-31 15:44:50

标签: c++ plugins adobe photoshop layer

我目前正在编写一个Photoshop插件,用于将图层数据保存到.xml文件中,到目前为止,我没有遇到任何问题(除了黯淡的Adobe SDK),查找图层名称,图层数量等信息,文档名称,文档的尺寸等。但是,我无法找到如何访问图层的尺寸和位置,SDK一直没有帮助,我想知道是否有人对此有任何经验?
作为参考,这里是访问图层名称的代码:

    OSErr PIGetLayerName(const int32 index, string & layerName)
    {
        Handle h = NULL;

        OSErr error = sPSProperty->getPropertyProc(kPhotoshopSignature, 
                                           propLayerName,
                                           index, NULL, &h);

        if (!error && h != NULL)
        {
            error = HandleToString(h, layerName);
            sPSHandle->Dispose(h);
        }

        return error;
    }

“propLayerName”和“kPhotoshopSignature”在“PIProperties.h”中定义(包含在SDK中) 类似的“propTitle”定义(获取文档名称)也在那里。 然而,没有这样的定义来找到层的尺寸,边界,宽度和高度 - 无论它是什么 - 。

如果有人有任何信息,我会非常感激,如果你能发布它。
提前谢谢,
哈利

0 个答案:

没有答案