# \[UXP\] \[Photoshop\] how can I get the layer style for a smartObject

**URL:** <https://forums.creativeclouddeveloper.com/t/uxp-photoshop-how-can-i-get-the-layer-style-for-a-smartobject/6389>\
**Category:** UXP Plugin API\
**Tags:** uxp, javascript\
**Created:** [June 9, 2023, 11:00am UTC](https://forums.creativeclouddeveloper.com/t/uxp-photoshop-how-can-i-get-the-layer-style-for-a-smartobject/6389 "2023-06-09T11:00:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cybta](https://avatars.discourse-cdn.com/v4/letter/c/b77776/32.png) [@cybta](https://forums.creativeclouddeveloper.com/u/cybta)\
**Post date:** [June 9, 2023, 11:00am UTC](https://forums.creativeclouddeveloper.com/t/uxp-photoshop-how-can-i-get-the-layer-style-for-a-smartobject/6389/1 "2023-06-09T11:00:10Z")

</div>

hello,

I am trying to export a report so I have a list of smartobject that each one have a stroke from the layer style how can I access the thickness and color of this stroke I tried this

```auto
import { app } from "photoshop";
const doc = app.activeDocument;
const rootLayers = doc.layers;

rootLayers.map((layer) => {
// I can't access the layer effects from here
})

```

is it applicable on batchPlay side?

---

<div class="post-metadata">

**Author:** ![Karmalakas](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/karmalakas/32/1048_2.png) [@Karmalakas](https://forums.creativeclouddeveloper.com/u/Karmalakas)\
**Post date:** [June 9, 2023, 11:41am UTC](https://forums.creativeclouddeveloper.com/t/uxp-photoshop-how-can-i-get-the-layer-style-for-a-smartobject/6389/2 "2023-06-09T11:41:34Z")

</div>

Forum search usually helps. [This topic](http://forums.creativeclouddeveloper.com/t/access-smartobject-transform-properties/5349) might give some hints

> [@Access SmartObject transform properties?](http://forums.creativeclouddeveloper.com/t/access-smartobject-transform-properties/5349):
>
> Hi All, Is there any way to access the current transform properties of a smart object? I’m trying to make a real-time slider for rotating and scaling multiple smart objects… But I’m finding that using relative rotation and scale makes for unreliable results. Thanks! [Screen Shot 2022-10-14 at 8.34.56 PM]

---

<div class="post-metadata">

**Author:** ![cybta](https://avatars.discourse-cdn.com/v4/letter/c/b77776/32.png) [@cybta](https://forums.creativeclouddeveloper.com/u/cybta)\
**Post date:** [June 9, 2023, 1:04pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-photoshop-how-can-i-get-the-layer-style-for-a-smartobject/6389/3 "2023-06-09T13:04:05Z")

</div>

thanks for the reply @Karmalakas I will check it and give it a try, I found all the attribute of the layer except the stroke in this solution but it is a great start

---

<div class="post-metadata">

**Author:** ![AnthonyK](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@AnthonyK](https://forums.creativeclouddeveloper.com/u/AnthonyK)\
**Post date:** [June 10, 2023, 12:08am UTC](https://forums.creativeclouddeveloper.com/t/uxp-photoshop-how-can-i-get-the-layer-style-for-a-smartobject/6389/4 "2023-06-10T00:08:29Z")

</div>

> [@cybta](#):
>
> how can I access the thickness and color of this stroke?

Check `"layerEffects\":{\"frameFX\":` in the layer’s json property.

---

<div class="post-metadata">

**Author:** ![cybta](https://avatars.discourse-cdn.com/v4/letter/c/b77776/32.png) [@cybta](https://forums.creativeclouddeveloper.com/u/cybta)\
**Post date:** [June 12, 2023, 2:17pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-photoshop-how-can-i-get-the-layer-style-for-a-smartobject/6389/5 "2023-06-12T14:17:22Z")

</div>

thank you @AnthonyK , I will give it a try, just a quick question this is done by using “scenegraph” right?

---

<div class="post-metadata">

**Author:** ![AnthonyK](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@AnthonyK](https://forums.creativeclouddeveloper.com/u/AnthonyK)\
**Post date:** [June 12, 2023, 2:50pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-photoshop-how-can-i-get-the-layer-style-for-a-smartobject/6389/6 "2023-06-12T14:50:59Z")

</div>

I’m not sure what “scenegraph” is.

I’m talking about using the Alchemist plugin to get this information.

---

<div class="post-metadata">

**Author:** ![cybta](https://avatars.discourse-cdn.com/v4/letter/c/b77776/32.png) [@cybta](https://forums.creativeclouddeveloper.com/u/cybta)\
**Post date:** [June 12, 2023, 3:05pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-photoshop-how-can-i-get-the-layer-style-for-a-smartobject/6389/7 "2023-06-12T15:05:31Z")

</div>

ah great I will check it and git it a try thanks you!

---

<div class="post-metadata">

**Author:** ![cybta](https://avatars.discourse-cdn.com/v4/letter/c/b77776/32.png) [@cybta](https://forums.creativeclouddeveloper.com/u/cybta)\
**Post date:** [June 12, 2023, 5:49pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-photoshop-how-can-i-get-the-layer-style-for-a-smartobject/6389/8 "2023-06-12T17:49:36Z")

</div>

yes that fixed it, I couldn’t see the layerEffects earlier
