Page 1 of 1

Layer Styles in CS4

Posted: November 6th, 2009, 3:13 am
by Yenaphe
I'm working on an XML exporter for CS4, and while parsing and analysing the layers, all the property groups are always exported, including the Layer Style group. No matter if I have layer styles on my layer, all the properties for all layer styles are always exported.

I would like to know if there is a way to know if a layer have Layer Style or not, so I can avoid exporting unnecessary data.

Re: Layer Styles in CS4

Posted: November 6th, 2009, 4:22 am
by Yenaphe
Okay, so after knocking my head against walls I've found a workaround.

I do a try/catch with myProperty.selected = true. When it fails it means that the property cannot be set to true because it's parent or itself is hidden.

Not really beautiful, but at least, it works... for now.