# Library

## Hair Strand Builder Library

You can now **store your hair strands in a library** and easily share them across different scenes.\
You have the flexibility to save an **entire hairstyle**, specific **sections**, or even a **single strand**.

{% hint style="danger" %}
If your library assets were saved before V15.04. After import, strands will not work if you select them. Please update them by Menu > Update V14.03/14.05 to current. Once they are updated, you can then save them back to the library. Unfortunately, there's no way to automate this process.
{% endhint %}

<figure><img src="https://454332562-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGyyK7o0fNRXvtva8vEkG%2Fuploads%2Fnn6fG3OcRehTHsWmOM8Y%2Fimage.png?alt=media&#x26;token=489d4669-b86e-46ed-8bba-9813b4e04fc1" alt=""><figcaption></figcaption></figure>

### Creating a Category and Saving a Library Item:

1. Click on **‘New Category’** to create a folder for your library items.
2. Select the hair strands you want to save.
3. Isolate selected hairs (by clicking on the Isolate Button). This is optional, but will frame your strands better in the preview .png screenshot.&#x20;
4. Give your selection a name and click **‘Save’**.

<figure><img src="https://454332562-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGyyK7o0fNRXvtva8vEkG%2Fuploads%2F12pHJ3W0ZjpOsfhkZcQ4%2Fht_tube_library.gif?alt=media&#x26;token=f83cd105-8fc2-485f-b964-ab3ba78489e8" alt=""><figcaption><p>Create a Category first, select strands, isolate, enter a name and save</p></figcaption></figure>

<figure><img src="https://454332562-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGyyK7o0fNRXvtva8vEkG%2Fuploads%2F3iu9qAluxI5b8uYSlXmR%2Flibrary_saving_cards.gif?alt=media&#x26;token=fe362a69-b93c-4271-b800-823cb35aca88" alt=""><figcaption><p>Saving a group of card coils as an library item can be useful the next time you need it.</p></figcaption></figure>

### Importing:

* Choose an item from the library and click the **‘Import’** button.
* The strands will be automatically loaded into the **Hair Strand Layer UI**.

Imported strands will include a "**randomly generated** **prefix"** to avoid overwriting existing elements. You can **rename the layers** or **move the strands** to another layer as needed.

{% hint style="info" %}
It's best practice to 'Rename' the layers as soon as they are imported to keep the scene clean. This will also avoid long prefix names if you decide to 'Save' the imported strands as another library item as well.
{% endhint %}

<figure><img src="https://454332562-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGyyK7o0fNRXvtva8vEkG%2Fuploads%2FdpOWcCKggZVDrj2CwE97%2Fht_tube_library_import.gif?alt=media&#x26;token=c05a23de-b67f-4583-aa76-86ae75c88d07" alt=""><figcaption><p>Imported Hair Tube Strands will be imported with the layers that they were saved to, with a prefix.</p></figcaption></figure>

* If the strand layers have textures assigned, those will also be imported.

<figure><img src="https://454332562-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGyyK7o0fNRXvtva8vEkG%2Fuploads%2FDbXMfhC8OuYluywGm0Cl%2Flibrary_importing_cards.gif?alt=media&#x26;token=b08978a6-6997-4b19-b0b7-c1203f59426d" alt=""><figcaption></figcaption></figure>

* When the same library items are imported, a copy of the material will be made.

<figure><img src="https://454332562-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGyyK7o0fNRXvtva8vEkG%2Fuploads%2FxdWGAZgo7Zz6sdPkBm45%2Fimage.png?alt=media&#x26;token=268a1d2e-dbb4-4178-b4ff-20c8ee62b919" alt=""><figcaption></figcaption></figure>

* You can also save groups of strands that has a helper curve linked as a library item. Importing it back in will allow quick access and control to the strands as a whole.

<figure><img src="https://454332562-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGyyK7o0fNRXvtva8vEkG%2Fuploads%2F4WEEoIiFEoUMY5xY3M0a%2Flibrary_helper_import.gif?alt=media&#x26;token=d8beb77f-47b5-46c5-8a3e-4f3fc38d8cf0" alt=""><figcaption></figcaption></figure>

### Deleting Library Items or Categories

{% hint style="danger" %}
**Important:** Deleting a file is permanent. Once deleted, the file cannot be recovered or restored from your system.
{% endhint %}

Deleting items

* Simply select the items and click on Delete.

<figure><img src="https://454332562-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGyyK7o0fNRXvtva8vEkG%2Fuploads%2FGV1g6My8c5AsRxZZtioy%2Flibrary_delete_items.gif?alt=media&#x26;token=1a265521-b7ff-449e-8140-b85eef6d8eaa" alt=""><figcaption></figcaption></figure>

Deleting entire Category

* Right click on the category list, and delete.

<figure><img src="https://454332562-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGyyK7o0fNRXvtva8vEkG%2Fuploads%2FtVyoXV5HJULMs7eClrax%2Flibrary_delete_category.gif?alt=media&#x26;token=563a1374-00de-4f9e-a4b9-e27e67994eb5" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you need to switch Maya version, or share between artists, you can copy the entire folder from

**Tube Builder Library:**&#x20;

`\user\Documents\maya\<Maya Version>\presets\xgtc_tube2_lib\`&#x20;

**Card Builder Library**:&#x20;

`\user\Documents\maya\<Maya Version>\presets\xgtc_card2_lib\`&#x20;

Or simply prints out `cmds.internalVar(userPresetsDir = True)` in the script editor for the preset path , and look for **xgtc\_tube2\_lib** or **xgtc\_card2\_lib** folder
{% endhint %}
