# add_layer()

Creates a new user layer. Same as Add on the layer panel.

If you omit the name, it uses `Layer N`, the same rule as the screen. [layer](layer.md) only picks up a layer that already exists. It does not create one.

No scene is `no_scene`. On Trial, hitting the cap is `trial_locked`.

### Signature
```python
api.add_layer(name=None) -> result
```

| Field | Meaning |
|---|---|
| `ok` | True on success. |
| `error` | Failure code. Empty on success. The path is not included. |
| `no_scene` | There is no scene to hold a layer. |
| `trial_locked` | The Trial layer cap was hit. |

### Example
```python
api.add_layer("Cloth")
layer = api.layer("Cloth")
``