> For the complete documentation index, see [llms.txt](https://docs.gta.clothing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gta.clothing/plugins/creator-link/blender/add-to-a-project.md).

# Add to a Durty Cloth Tool Project

Send a game-ready cloth from Blender, with its colour variations, as a new cloth to the project open in Durty Cloth Tool

{% hint style="warning" %}
**Add to Project** is experimental. Durty Cloth Tool shows every cloth before it is added, and you can remove an added cloth in Durty Cloth Tool at any time. Test the built clothing in game before you publish it.
{% endhint %}

## Introduction

**Add to Project**, the fifth and last stage of **Garment Fitting** in Blender's **DCT** tab, adds the cloth you made as a **new cloth** to the project open in Durty Cloth Tool, with all its colour variations. Blender checks the cloth, puts it on the freemode skeleton, exports it with Sollumz and sends it to Durty Cloth Tool on this computer. Durty Cloth Tool shows the cloth on the ped with its checks, and nothing is added until you choose **Add to project** there.

### When to use it

* You fitted a cloth with [Garment Fitting](https://docs.gta.clothing/plugins/creator-link/blender/garment-fitting.md) and made it [game ready](https://docs.gta.clothing/plugins/creator-link/blender/game-ready.md), and want it in your project.
* You modelled clothing or a prop in Blender and want it in your project without exporting files by hand. The slots are the ones of the [garment types](https://docs.gta.clothing/plugins/creator-link/blender/garment-fitting.md#garment-types).

### When something else fits better

* To update a cloth that is already in your project, use **Push Model** and **Save Model to Cloth**, see [Live Preview and Models](https://docs.gta.clothing/plugins/creator-link/blender/live-preview-and-models.md).
* For YDD or CodeWalker XML files you already exported, use **Add from file(s)** in Durty Cloth Tool, see [Exporting and Validation](https://docs.gta.clothing/cloth-modding/exporting-and-validation.md#add-the-item-to-durty-cloth-tool).
* Other slots, such as hair, and custom ped projects cannot take a cloth this way. To turn a character into a custom ped, see [Custom Ped](https://docs.gta.clothing/plugins/creator-link/blender/custom-ped.md).

## What you need

* Durty Cloth Tool running and connected to Blender, with a **freemode project** open. A custom ped project takes no clothing this way.
* A GTA V installation set up in Durty Cloth Tool: the freemode skeleton comes from your own game files.
* [Sollumz](https://docs.sollumz.org) 2.8.0 or later in Blender.
* One material with a colour texture on the cloth. **Combine Materials** makes one, see [Game Ready](https://docs.gta.clothing/plugins/creator-link/blender/game-ready.md#combine-materials).
* Weights for the freemode skeleton: vertex groups named after its bones, such as `SKEL_Spine3`. **Fit on gta.clothing** and **Transfer Weights** give them, or you weight the cloth yourself. See [Game Ready](https://docs.gta.clothing/plugins/creator-link/blender/game-ready.md#weight-the-cloth). A prop needs none: it hangs from its anchor bone.

## Plans and limits

Adding a cloth from Blender is free on every plan. Durty Cloth Tool applies the same project limits as to any other cloth you add:

| Plan         | What you can add                                                                                                                                                     |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Free**     | Up to 10 cloth drawables per drawable type and gender, 30 in total, and 15 texture variations per cloth. A cloth with more colour variations than that is not added. |
| **Advanced** | No project size limits.                                                                                                                                              |
| **Ultimate** | No project size limits. You can also update the added cloth from Blender with **Push Model** and **Save Model to Cloth**.                                            |

A cloth has at most 26 colour variations, whatever your plan.

{% hint style="info" %}
A project within the free limits builds without a license; a bigger one needs an active license, see [License Activation](https://docs.gta.clothing/getting-started/license-activation.md).
{% endhint %}

## The fields

<figure><img src="https://2130288373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsXe3tqSiAvM8iKYjngE%2Fuploads%2Fgit-blob-0c2b07c3a115fa393905c2853977744b7ce6d997%2Fgarment-add.png?alt=media" alt="The Add to Project stage with the project Forge Studio Test, the Cloth Name Male 16 top, It goes in as Top (jbib), Male, Shows Skin, the open Colour Variations section with the hoodie&#x27;s texture named Burgundy, and Add to Project."><figcaption><p>Add to Project with the hoodie's colour variation.</p></figcaption></figure>

**Add to Project** shows the project the cloth goes into (**Project:** with its name), then:

* **Cloth Name**: the name the cloth gets in Durty Cloth Tool, up to 128 characters. When the field is empty, the garment's name is used.
* The line below it says where the cloth goes, for example **It goes in as Top (jbib), Female. Change both under Setup.**
* **Shows Skin**: turn it on when the cloth shows some of the ped's skin, so the game colours it with the ped's skin tone. It is on for **Shorts**, **Skirt** and **Sandals**, see [Garment Fitting](https://docs.gta.clothing/plugins/creator-link/blender/garment-fitting.md#bare-legs-and-feet), and [Skin Tone Data](https://docs.gta.clothing/game-mechanics/skin-tone-data.md). A prop has no **Shows Skin**.

### Colour Variations

Open the closed **Colour Variations** section. The cloth's own colour texture is the first colour variation. The field next to it is its name in Durty Cloth Tool; when it is empty, the image's name is used.

* **Add Colour Variation** adds a row: pick another image in the same UV layout and give it a name. The **X** at the end of a row removes it.
* The line below counts them, for example **Variations: 2 of at most 26.**
* Each side of a picture must divide by four and be at most 4096 pixels. Powers of two up to 2048 pixels work best, and pictures smaller than 16 pixels on a side get a warning.
* Each image can be used for one colour variation only.

The model and all its pictures together can be at most 64 MiB. Use smaller images or fewer colour variations when the add-on says the add is too large.

### The skeleton

The cloth goes in on the Durty Cloth Tool skeleton of the gender chosen under **Setup**. **Game Ready** says whether it is on it, and **Use Durty Cloth Tool Skeleton** there puts it on it, see [Game Ready](https://docs.gta.clothing/plugins/creator-link/blender/game-ready.md#use-durty-cloth-tool-skeleton). **Add to Project** does this by itself when it is needed.

A prop hangs from its anchor bone instead, placed from Durty Cloth Tool's freemode skeleton made from your game files, and keeps its position relative to it. **Add to Project** hangs it there.

## Add the cloth

1. Optionally run **Validate** under **Game Ready** first, so you see its warnings, see [Game Ready](https://docs.gta.clothing/plugins/creator-link/blender/game-ready.md#validate).
2. Select **Add to Project**. The add-on runs **Validate** and its own checks: the name, the material and its colour texture, the pictures and the vertex groups. Anything that blocks the add is listed under the button as **Fix these first**, and nothing is sent; the status bar says **The add is blocked: ... problems to fix first, listed under Add to Project.**
3. When the checks pass, the add-on puts the cloth on the freemode skeleton when needed (a prop: hangs it from its anchor), gives it the ped shader with its colour texture and exports it with Sollumz. Then it sends the model and the colour variations to Durty Cloth Tool. A progress bar shows each part, for example **Exporting the garment with Sollumz…** and **Writing the colour variations (1 of 2)…**. An export that Sollumz reports errors for, or one without the cloth's geometry, is not sent.
4. Durty Cloth Tool opens **Add a cloth from a connected app** (**Blender wants to add a cloth to your project**). It shows the cloth on the ped, with **Colour variation on the ped** to switch between the colour variations, its **Name**, **Slot**, **Gender**, **Skin**, **Colour variations**, the triangles of each of its **Levels of detail**, and its **Checks**. Meanwhile Blender shows **Durty Cloth Tool shows the cloth. Choose Add to project or Cancel there.**
5. Choose **Add to project** to add it, or **Cancel** to leave your project unchanged. **Cancel** in Blender withdraws the add while Durty Cloth Tool still asks. Before anything was sent, it stops the add, and **Ctrl+Z** undoes what the add changed on the garment.

<figure><img src="https://2130288373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsXe3tqSiAvM8iKYjngE%2Fuploads%2Fgit-blob-c41f01cc47b21c63af1a7cad1c8432b4799aa52a%2Fgarment-add-problems.png?alt=media" alt="Fix these first (2) under Add to Project: colour variation 2 has no image, and the vertex group Group is not a bone of the freemode skeleton."><figcaption><p>What blocks the add is listed under the button, and nothing is sent.</p></figcaption></figure>

<figure><img src="https://2130288373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsXe3tqSiAvM8iKYjngE%2Fuploads%2Fgit-blob-3e78a29d61c1234bb1ee05f854377a68ae1232c1%2Fgarment-add-waiting.png?alt=media" alt="Blender waiting while Durty Cloth Tool shows the cloth: the request to choose Add to project or Cancel there, the note that nothing is added until then, and Cancel."><figcaption><p>Durty Cloth Tool asks you before anything is added.</p></figcaption></figure>

{% hint style="info" %}
In Durty Cloth Tool's window, **Cancel** is the default answer, and **Add to project** becomes available after a moment, so a stray key press does not add the cloth. The project's limits apply as for any other add.
{% endhint %}

Once you choose **Add to project**, Durty Cloth Tool adds the cloth with all its colour variations, selects it and says in the status bar that Blender added it. The cloth is named and numbered like every other cloth when you build.

## The result

<figure><img src="https://2130288373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsXe3tqSiAvM8iKYjngE%2Fuploads%2Fgit-blob-05c0099aae46daa7f3fe3127631e9cb5f2ead203%2Fgarment-add-added.png?alt=media" alt="Blender after the add: Added Male 16 top to the project as Top (jbib), Durty Cloth Tool&#x27;s checks, and the note that the Drawable Dictionary is linked to the new cloth."><figcaption><p>The cloth was added, with Durty Cloth Tool's checks.</p></figcaption></figure>

Under the button, Blender says what happened:

| Message                                                                                                                                                              | What it means                                                                                                                                |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **Added ... to the project as ...**                                                                                                                                  | The cloth is in your project. Durty Cloth Tool's checks are listed below it.                                                                 |
| **Durty Cloth Tool did not add the cloth: Cancel was chosen there.**                                                                                                 | You chose **Cancel** in Durty Cloth Tool. The project is unchanged.                                                                          |
| **The add was cancelled. The project is unchanged.**                                                                                                                 | You chose **Cancel** in Blender while Durty Cloth Tool asked.                                                                                |
| **The add was cancelled, but Durty Cloth Tool did not confirm it. Check the project in Durty Cloth Tool.**                                                           | The cancel may not have arrived in time. Check the project in Durty Cloth Tool before adding the cloth again.                                |
| **Durty Cloth Tool added ... after all**                                                                                                                             | You chose **Add to project** in Durty Cloth Tool before the cancel from Blender arrived. The cloth is in your project and linked in Blender. |
| **... the project already has as many clothes as your plan in Durty Cloth Tool allows, or the cloth has more colour variations than the plan allows for one cloth.** | Your plan's limits refused the cloth. See [#plans-and-limits](#plans-and-limits "mention").                                                  |
| **Durty Cloth Tool could not use the model or a colour variation, so nothing was added.**                                                                            | Its checks below say why. Fix the cloth and add it again.                                                                                    |
| **This project takes no freemode clothes this way**                                                                                                                  | The open project is a custom ped project. Open a freemode project.                                                                           |

### Durty Cloth Tool's checks

Durty Cloth Tool checks the added cloth like any cloth in its [Error List](https://docs.gta.clothing/basics/essential-knowledge/cloth-analysis-report.md). Blender lists what it found as an **Error**, **Warning** or **Note**, for example:

* the weights or bone indices do not fit the freemode skeleton, so the cloth would move wrongly in game;
* one bone carries nearly all of a level of detail's weight, so the cloth would hardly move with the body;
* Durty Cloth Tool could not read the weights to check them;
* a hair cloth cannot take the hair colour the player picks;
* a colour variation is not a power of two, does not divide by four, is larger than 2048 pixels or smaller than 16 pixels on a side.

## After the add

* The Drawable Dictionary in Blender is linked to the new cloth, like a model opened from Durty Cloth Tool. **Push Model** and **Save Model to Cloth** under **Linked Cloth** (choose it under **Work On**) update that cloth, with Durty Cloth Tool Ultimate. See [Live Preview and Models](https://docs.gta.clothing/plugins/creator-link/blender/live-preview-and-models.md).
* **Undo** in Blender does not remove the cloth from the project. To undo an add, remove the cloth in Durty Cloth Tool. An add has no [History](https://docs.gta.clothing/basics/useful-to-know/project-history.md) entry of its own.
* Build and test the cloth like any other, see [Testing Addon Clothes](https://docs.gta.clothing/getting-started/testing-addon-clothes.md).

## Troubleshooting

* **Connect to Durty Cloth Tool to add the garment to a project.**: select **Connect** below that line, or connect under **Get Connected** the first time.
* **Open a project in Durty Cloth Tool to add the garment to it.**: open a freemode project in Durty Cloth Tool.
* **The garment has no weights for the freemode skeleton yet.**: weight the cloth, see [Game Ready](https://docs.gta.clothing/plugins/creator-link/blender/game-ready.md#weight-the-cloth).
* **... vertex groups are not bones of the freemode skeleton** (or **... vertex group is not a bone of the freemode skeleton**): rename or remove those vertex groups; the game would move them with the root.
* **The garment has ... materials. Combine Materials first**: each colour variation is one texture, so run **Combine Materials**.
* **The garment's material has no colour texture.**: run **Combine Materials**, or give the material an image texture.
* **The normal map ... is not a DDS file, so it is not sent with the model.** (or the specular map): the add goes on without it. Add the map to the cloth in Durty Cloth Tool after the add.
* **Sollumz has no ped shader (ped.sps)**: update or reinstall Sollumz.
* **Colour variation ... has no image.**: choose an image for that row, or remove the row.
* **Durty Cloth Tool needs both sides to divide by four.**: resize that image, for example to 2048 x 2048.
* **The model and its pictures are larger than 64 MiB together**: use smaller images or fewer colour variations.
* **Sollumz reported errors while exporting** or **Sollumz exported the Drawable Dictionary without the garment's geometry.**: check Sollumz's Info log, fix the cloth and add it again.
* **The skeleton's bones are not in the game's order** or **The skeleton has ... bones**: use **Use Durty Cloth Tool Skeleton** again instead of changing the skeleton's bones.
* **This Durty Cloth Tool cannot add clothes from Blender yet. Update Durty Cloth Tool.**: update Durty Cloth Tool from **Options > Updates** (or press **Ctrl+K** and paste `>Check for Updates`).
* **Durty Cloth Tool is busy (a build runs, or another add waits for an answer).**: wait for the build, or answer the other add first.
* **Too many adds in a short time.**: wait a few seconds, then try again.
* **Durty Cloth Tool did not answer the add in time.** or **The connection to Durty Cloth Tool was lost during the add.**: check the project in Durty Cloth Tool before you add the cloth again, so you do not add it twice.
