> 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/model.md).

# Model

## Summary

A 3D model widget

## Instance Properties

<table data-full-width="false"><thead><tr><th>Name</th><th>Return Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>number<br>Read-only</td><td>The index of the active Model Widget</td></tr><tr><td>layer</td><td><a href="/open-brush-plugin-scripting-docs/readme/layer.md">Layer</a><br>Read/Write</td><td>The layer the model is on</td></tr><tr><td>group</td><td><a href="/open-brush-plugin-scripting-docs/readme/group.md">Group</a><br>Read/Write</td><td>The group this model is part of</td></tr><tr><td>transform</td><td><a href="/open-brush-plugin-scripting-docs/readme/transform.md">Transform</a><br>Read/Write</td><td>The transformation of the Model Widget</td></tr><tr><td>position</td><td><a href="/open-brush-plugin-scripting-docs/readme/vector3.md">Vector3</a><br>Read/Write</td><td>The 3D position of the Model Widget</td></tr><tr><td>rotation</td><td><a href="/open-brush-plugin-scripting-docs/readme/rotation.md">Rotation</a><br>Read/Write</td><td>The 3D orientation of the Model Widget</td></tr><tr><td>scale</td><td>number<br>Read/Write</td><td>The scale of the Model Widget</td></tr></tbody></table>

## Class Methods

### Model:Import(filename)

Imports a new model from the MediaLibrary/Models folder

**Returns:** [Model](/open-brush-plugin-scripting-docs/readme/model.md) (Returns the Model instance)

**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>filename</td><td>string</td><td></td><td>The filename of the model to be imported</td></tr></tbody></table>

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>Model:Import("Andy.obj")
</strong></code></pre>

## Instance Methods

### model:Select()

Adds this model to the current selection

**Returns:** nil

#### Example

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

### model:Deselect()

Removes the model from the current selection

**Returns:** nil

#### Example

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

### model:Delete()

Deletes this model

**Returns:** nil

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>myModel:Delete()
</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/model.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.
