> 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 %}
