# `GSLayer indexOfObjectInShapes:`

*Instance Method*

Returns the linear shape index of a shape.

## Declaration

```objc
- (NSUInteger) indexOfObjectInShapes:(GSShape *) shape;
```

```python
indexOfObjectInShapes_(shape: GSShape) -> int
```

## See Also

### Shapes

- [`GSLayer.shapes`](/Core/GlyphsCore/GSLayer/shapes) — An array of the shape objects defining the visual part of the layer.
- [`GSLayer setShapesFast:`](/Core/GlyphsCore/GSLayer/setShapesFast:) — Replaces the shapes without undo registration or KVO notifications.
- [`GSLayer setShapes:hints:`](/Core/GlyphsCore/GSLayer/setShapes:hints:) — Replaces the shapes and hints together.
- [`GSLayer getCopyOfContentFromLayer:doSelection:`](/Core/GlyphsCore/GSLayer/getCopyOfContentFromLayer:doSelection:) — Copies shapes, hints, anchors, and optionally selected nodes from another layer.
- [`GSLayer countOfShapes`](/Core/GlyphsCore/GSLayer/countOfShapes) — The number of shapes in the layer.
- [`GSLayer objectInShapesAtIndex:`](/Core/GlyphsCore/GSLayer/objectInShapesAtIndex:) — Returns the shape at the given linear shape index.
- [`GSLayer objectInShapesAtIndexFast:`](/Core/GlyphsCore/GSLayer/objectInShapesAtIndexFast:) — Returns the shape at the given linear shape index without locking.
- [`GSLayer clear`](/Core/GlyphsCore/GSLayer/clear) — Removes shapes, anchors, hints, and selection from the layer.

