> For the complete documentation index, see [llms.txt](https://docs.dezignphreak.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dezignphreak.com/rigtrect/functions.md).

# Functions

![RigtRect button, anchor point position selector & help button](/files/-M0cJWXDkgQ38vDm-DBI)

The script depends on the numbers of selected layers:

#### No layer selected:

The script will create a fresh RigtRect setup in the selected composition. \
[More info →](/rigtrect/functions/rigtrect.md)

#### 1 layer selected:

The selected layer will be rigged as RigtSource layer. [More info →](/rigtrect/functions/rigtsource.md)

#### 1 layer selected + ALT click:

The selected layer will be rigged as RigtFill (constrain proportions while scaling) layer. [More info →](/rigtrect/functions/rigtfill.md)

#### 1 layer selected + SHIFT click:

Fix a broken rig of the selected RigtRect or RigtSource layer. [More info →](/rigtrect/functions/repair-a-broken-rig.md)

#### 2 layers selected:

The script will create a new RigtRect between the two selected layers.

{% hint style="info" %}
These layers can be any layers that have a position property.
{% endhint %}

#### 3 layers selected:

If the selection contains a RigtRect or RigtSource, the script tries to relink the rig to the other two layers.

{% hint style="info" %}
You can always change the handle layers in the RigtRect / RigtSource effect settings manually, but the 3 layers selection method is way more convinient.
{% endhint %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.dezignphreak.com/rigtrect/functions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
