# Trying To Get Layer Kind

**URL:** <https://forums.creativeclouddeveloper.com/t/trying-to-get-layer-kind/2172>\
**Category:** UXP Plugin API\
**Created:** [November 4, 2020, 6:37pm UTC](https://forums.creativeclouddeveloper.com/t/trying-to-get-layer-kind/2172 "2020-11-04T18:37:29Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![simonhenke](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/simonhenke/32/957_2.png) [@simonhenke](https://forums.creativeclouddeveloper.com/u/simonhenke)\
**Post date:** [November 7, 2020, 12:29pm UTC](https://forums.creativeclouddeveloper.com/t/trying-to-get-layer-kind/2172/3 "2020-11-07T12:29:13Z")

</div>

```
export enum LayerKind {
  any = 0,
  pixel = 1,
  adjustment = 2,
  text = 3,
  vector = 4,
  smartObject = 5,
  video = 6,
  group = 7,
  threeD = 8,
  gradient = 9,
  pattern = 10,
  solidColor = 11,
  background = 12,
  groupEnd = 13
}

```

Groups actually occupy two layer spaces internally (group start and group end), so if that’s your setup…  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/3/34e9552372c8688d88dae2f0c64ee297662a8bd2.png)  
…the layerKind at indices 0-3 would be  
0: Pixel (LayerKind 1)  
1: Group End (LayerKind 13)  
2: Group (LayerKind 7)

Seems like backgrounds only result in LayerKind 12 when they’re the only layer in the document

---

_[View the full topic](https://forums.creativeclouddeveloper.com/t/trying-to-get-layer-kind/2172)._
