Mobile app version of vmapp.org
Login or Join
Reiling762

: Add class to layer in Photoshop How can I simply add a class to a layer in Photoshop CS5? That class should hold properties like "fill color", "size", etc. I'm very new to scripting Photoshop

@Reiling762

Posted in: #AdobePhotoshop #PhotoshopScripting

How can I simply add a class to a layer in Photoshop CS5? That class should hold properties like "fill color", "size", etc.

I'm very new to scripting Photoshop so please bear with me =)

Thanks!

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Reiling762

1 Comments

Sorted by latest first Latest Oldest Best

 

@Michele215

You don't. The classes that are provided by the applications you are working with aren't extensible. But, what you can do to get around this is to create a record making use of Applescript's dynamic typing.

set myLayerInformation to {layer:psLayerObj, fill color:fillColorObj, width:mWidth, height:mHeight}
set targetLayer to layer of myLayerInformation
-->RESULT: psLayerObj


The records, in turn, could be held in a list that you can maintain along side the layers. It isn't elegant, but it should get the job done.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme