# HairSettings

> Human Generator for Blender documentation. Web version: https://humgen3d.com/docs/api/hairsettings

Reached as: `human.hair`

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/hair/hair.py#L37

Class for accessing hair types of human and common functionality.

## Attributes

### eyebrows

```python
human.hair.eyebrows: EyebrowSettings
```

*read-only*

Property for accessing eyebrow settings.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/hair/hair.py#L72

### eyelashes

```python
human.hair.eyelashes: EyelashSettings
```

*read-only*

Property for accessing eyelash settings.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/hair/hair.py#L81

### face_hair

```python
human.hair.face_hair: FacialHairSettings
```

*read-only*

Property for accessing facial hair settings.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/hair/hair.py#L90

### regular_hair

```python
human.hair.regular_hair: RegularHairSettings
```

*read-only*

Property for accessing regular hair settings.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/hair/hair.py#L99

### hair_types

```python
human.hair.hair_types: list[BaseHair]
```

*read-only*

The hair types this human can have: regular hair, eyebrows, eyelashes and, for male humans, facial hair.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/hair/hair.py#L108

### children_ishidden

```python
human.hair.children_ishidden: bool
```

*read-only*

Check if hair children of systems are hidden.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/hair/hair.py#L121

### particle_systems

```python
human.hair.particle_systems: bpy_prop_collection
```

*read-only*

All particle systems of human body.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/hair/hair.py#L135

### modifiers

```python
human.hair.modifiers: PropCollection
```

*read-only*

All modifiers on human body.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/hair/hair.py#L144

## Methods

### estimate_haircards_triangles()

```python
human.hair.estimate_haircards_triangles(quality: str = 'high') -> int
```

Estimate the triangle count of the haircards of all hair of this human.

The cards are assumed to use the full triangle budget of the quality, which
they do unless the hair is very short.

Parameters:
- `quality` (str, default 'high'): Quality of the haircards, "ultra", "high", "medium", "low" or "haircap_only".

Returns: int — Triangles of the haircaps and haircards for all hair this human has.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/hair/hair.py#L43

### set_connected()

```python
human.hair.set_connected(connected: bool, context: C = None)
```

Shortcut for using `connect_hair` and `disconnect_hair` operators.

This should be used when modifying the body mesh (the actual mesh, not the shape
keys).

Parameters:
- `connected` (bool): True if hair should be connected, False otherwise.
- `context` (C, default None)

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/hair/hair.py#L158

### children_set_hide()

```python
human.hair.children_set_hide(hide: bool)
```

Set the visibility state of the children of all hair systems.

If you will do a heavy computation on the human body, you should hide the
    children. This is already implemented for builtin heavy operations.

Parameters:
- `hide` (bool): True if children should be hidden, False otherwise.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/hair/hair.py#L176

### remove_system_by_name()

```python
human.hair.remove_system_by_name(name: str)
```

Remove a certain particle system from the human by its name.

Parameters:
- `name` (str): Name of the particle system to remove.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/hair/hair.py#L192

### update_hair_shader_type()

```python
human.hair.update_hair_shader_type(shader_type: Literal['fast', 'accurate'])
```

Set the shader type between accurate (Eevee comp.) and fast (Cycles only).

Parameters:
- `shader_type` (Literal['fast', 'accurate']): Type to set the shader to.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/hair/hair.py#L201

### set_hair_quality()

```python
human.hair.set_hair_quality(hair_quality: Literal['high', 'medium', 'low', 'ultralow'])
```

Makes hairs thicker and lowers chileren amount for lower qualities.

Parameters:
- `hair_quality` (Literal['high', 'medium', 'low', 'ultralow']): Quality to set all hair types on this human to.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/hair/hair.py#L220

### as_dict()

```python
human.hair.as_dict() -> dict[str, dict[str, Any]]
```

Return a dictionary representation of the hair settings.

Returns: dict[str, dict[str, Any]] — dict[str, dict[str, Any]]: Dictionary representation of the hair settings.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/hair/hair.py#L248

### set_from_dict()

```python
human.hair.set_from_dict(data: dict[str, dict[str, Any]]) -> list[str]
```

Set the hair settings from a dictionary representation.

See `as_dict` for structure.

Parameters:
- `data` (dict[str, dict[str, Any]]): Dictionary representation of the hair

Returns: list[str] — list[str]: List of errors that occurred during setting.

Source: https://github.com/OliverJPost/HumGen3D/blob/main/human/hair/hair.py#L262
