> For the complete documentation index, see [llms.txt](https://icosa.gitbook.io/open-brush-plugin-scripting-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://icosa.gitbook.io/open-brush-plugin-scripting-docs/readme/strokelist.md).

# Stroke List

## Summary

The list of Strokes in the scene. (You don't instantiate this yourself. Access this via Sketch.strokes)

## Instance Properties

<table data-full-width="false"><thead><tr><th>Name</th><th>Return Type</th><th>Description</th></tr></thead><tbody><tr><td>lastSelected</td><td><a href="/open-brush-plugin-scripting-docs/readme/stroke.md">Stroke</a><br>Read-only</td><td>Returns the last stroke that was selected</td></tr><tr><td>last</td><td><a href="/open-brush-plugin-scripting-docs/readme/stroke.md">Stroke</a><br>Read-only</td><td>Returns the last Stroke</td></tr><tr><td>this[index]</td><td><a href="/open-brush-plugin-scripting-docs/readme/stroke.md">Stroke</a><br>Read-only</td><td>Returns the Stroke at the given index</td></tr><tr><td>count</td><td>number<br>Read-only</td><td>The number of strokes</td></tr></tbody></table>

## Instance Methods

### strokeList:Select()

Adds these strokes to the current selection

**Returns:** nil

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>myStrokes:Select()
</strong></code></pre>

### strokeList:Deselect()

Removes these strokes from the current selection

**Returns:** nil

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>myStrokes:Deselect()
</strong></code></pre>

### strokeList:Delete()

Deletes all the strokes in the list

**Returns:** nil

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>myStrokes:Delete()
</strong></code></pre>

### strokeList:SetShaderClipping(clipStart, clipEnd)

Hides the section of the stroke that is outside the specified range

**Returns:** nil

**Parameters:**

<table data-full-width="false"><thead><tr><th>Name</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>clipStart</td><td>number</td><td></td><td>The amount of the stroke to hide from the start (0-1)</td></tr><tr><td>clipEnd</td><td>number</td><td></td><td>The amount of the stroke to hide from the end (0-1)</td></tr></tbody></table>

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>myStroke:SetShaderClipping(0.1, 0.9)
</strong></code></pre>

### strokeList:SetShaderFloat(parameter, value)

Changes a shader float parameter.

**Returns:** nil

**Parameters:**

<table data-full-width="false"><thead><tr><th>Name</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>parameter</td><td>string</td><td></td><td>The shader parameter name</td></tr><tr><td>value</td><td>number</td><td></td><td>The new value</td></tr></tbody></table>

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>myStrokes:SetShaderFloat("_EmissionGain", 0.5)
</strong></code></pre>

### strokeList:SetShaderColor(parameter, color)

Changes a shader color parameter

**Returns:** nil

**Parameters:**

<table data-full-width="false"><thead><tr><th>Name</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>parameter</td><td>string</td><td></td><td>The shader parameter name</td></tr><tr><td>color</td><td><a href="/open-brush-plugin-scripting-docs/readme/color.md">Color</a></td><td></td><td>The new color</td></tr></tbody></table>

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>myStrokes:SetShaderColor("_TintColor", Color.red)
</strong></code></pre>

### strokeList:SetShaderTexture(parameter, image)

Changes a shader texture parameter

**Returns:** nil

**Parameters:**

<table data-full-width="false"><thead><tr><th>Name</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>parameter</td><td>string</td><td></td><td>The shader parameter name</td></tr><tr><td>image</td><td><a href="/open-brush-plugin-scripting-docs/readme/image.md">Image</a></td><td></td><td>The new image to use as a texture</td></tr></tbody></table>

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>myStrokes:SetShaderTexture("_MainTex", myImage)
</strong></code></pre>

### strokeList:SetShaderVector(parameter, x, y, z, w)

Changes a shader vector parameter

**Returns:** nil

**Parameters:**

<table data-full-width="false"><thead><tr><th>Name</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>parameter</td><td>string</td><td></td><td>The shader parameter name</td></tr><tr><td>x</td><td>number</td><td></td><td>The new x value</td></tr><tr><td>y</td><td>number</td><td>0</td><td>The new y value</td></tr><tr><td>z</td><td>number</td><td>0</td><td>The new z value</td></tr><tr><td>w</td><td>number</td><td>0</td><td>The new w value</td></tr></tbody></table>

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>myStrokes:SetShaderVector("_TimeOverrideValue", 0.5, 0, 0, 0)
</strong></code></pre>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://icosa.gitbook.io/open-brush-plugin-scripting-docs/readme/strokelist.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
